autocmd BufWritePre * :%s/\s\+$//e
(add-hook 'before-save-hook 'delete-trailing-whitespace)
git symbolic-ref HEAD refs/heads/newbranch | |
rm .git/index | |
git clean -fdx | |
<do work> | |
git add your files | |
git commit -m 'Initial commit' | |
is now | |
git checkout --orphan newbranch |
import socket | |
import time | |
HOST = 'localhost' # The remote host | |
PORT = 8888 | |
MSGLEN = 60 * 1000 | |
# create the socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
# connect to host and port | |
s.connect((HOST, PORT)) |
import socket | |
import time | |
HOST = 'localhost' # The remote host | |
PORT = 9999 | |
MSGLEN = 100 * 1000 * 1000 | |
# create the socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# connect to host and port | |
s.connect((HOST, PORT)) |
#!/usr/bin/env python | |
# | |
# Python version of picture downloader script | |
# | |
import sys | |
import urllib | |
# print usage if too less arguments are supplied |