Skip to content

Instantly share code, notes, and snippets.

View arianpasquali's full-sized avatar

Arian Pasquali arianpasquali

  • Antwerp, Belgium
View GitHub Profile
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@arianpasquali
arianpasquali / count_messages.py
Created March 6, 2018 19:40 — forked from yi-jiayu/count_messages.py
Using Telethon and the Telegram API to count the number of messages in each of your recent conversations
from telethon import TelegramClient
from telethon.errors.rpc_errors_401 import SessionPasswordNeededError
# (1) Use your own values here
api_id = 17349
api_hash = '344583e45741c457fe1862106095a5eb'
phone = 'YOUR_NUMBER_HERE'
username = 'username'
@arianpasquali
arianpasquali / elementaryos-postinstall
Last active April 12, 2018 16:08 — forked from gustavohenrique/elementaryos-postinstall
Post installation of Elementary OS
## Important tools and specific notes to setup elmentary os on my thinkpad
## First update:
sudo apt-get update && sudo apt-get upgrade
## Kernel updates:
sudo apt-get install linux-generic-lts-raring
## Essentials:
sudo apt-get install htop vim build-essential openjdk-8-jdk python-pip tmux msttcorefonts fonts-powerline apt-transport-https