This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
import operator | |
from itertools import islice | |
types ={} | |
# | |
objs = gc.get_objects() | |
for x in objs: | |
types[type(x)] = (types.get(type(x)) or 0) +1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_boost(){ | |
wget -c "http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.gz" | |
[ $? -ne 0 ] && exit 1 | |
tar xf boost_1_57_0.tar.gz | |
[ $? -ne 0 ] && exit 1 | |
pushd ./boost_1_57_0 | |
[ $? -ne 0 ] && exit 1 | |
./bootstrap.sh --with-python=$(which python) --prefix=$VIRTUAL_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start vim ctrlp from zsh | |
ctrlp() { | |
</dev/tty vim -c CtrlP | |
} | |
zle -N ctrlp | |
bindkey "^p" ctrlp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### setup | |
## you should use a virtualenv... | |
## use the branch CCM of pycrypto | |
# git clone -b ccm git://github.com/Legrandin/pycrypto.git . | |
# cd pycrypto | |
# python setup.py build | |
# python setup.py install | |
# | |
# pip install sjcl | |
######################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gitpp='git pull && git push' | |
alias gits='git status' | |
alias gitd='git diff' | |
alias gita='git add' | |
alias gitc='git commit' | |
alias gitck='git checkout' | |
alias gitpl='git pull' | |
alias gitps='git push' | |