Skip to content

Instantly share code, notes, and snippets.

@slor
slor / gist:1171311
Created August 25, 2011 18:04
Add your pydev workspace projects to your pythonpath when activating with virtualenvwrapper
# Assuming your workspace is called "workspace" and at the root of your virtualenv
# In $WORKON_HOME/postactivate
###############################
export PREACTIVATE_PYTHONPATH=$PYTHONPATH
for f in $VIRTUAL_ENV/workspace/*
do
export PYTHONPATH=$PYTHONPATH:$f
done
@slor
slor / gist:1019683
Created June 10, 2011 20:21
Grep like a boss
# grep current directory recursively for foo
# case-insensitive
# ignore binary files
# show line numbers
# ignore svn cruft
# force color
grep -rIin --color=force foo . | grep -v svn