Packt Publishing has kindly given me a free review copy of the eBook edition of
I'll be reading it and publishing my review here and on the PyATL Book Club blog.
Back to flipping out...
The Home for People Who Like to Flip Out and Write Code
Packt Publishing has kindly given me a free review copy of the eBook edition of
I'll be reading it and publishing my review here and on the PyATL Book Club blog.
Back to flipping out...
Posted by
Hank Gay
at
10:48
View Comments
Labels: book_review
I ported the dark-background variant of the Solarized project to Pygments. You can see the results here.
Back to flipping out...
Posted by
Hank Gay
at
21:21
View Comments
Labels: open-source pygments solarized
I discovered this after a curious problem led me to email my VPS provider and get back a pointer to mailing list exchange. Possibly more interesting than the original problem, I also learned that this exists.
Back to flipping out...
Posted by
Hank Gay
at
06:27
View Comments
Labels: entry, man, NetBSD, note-to-self
bash Completion Automatically
If you're using Doug Hellman's awesome virtualenvwrapper to manage your Django projects—and you really should be—try adding the following line to your $VIRTUAL_ENV/bin/postactivate script:
source "$VIRTUAL_ENV/build/Django/extras/django_bash_completion"
If you used the --no-site-packages option to create the virtualenv, that should automatically source the Django bash completion script everytime you workon into your project. If you didn't, you just need to figure out where the Django bash completion script is squirreled away on your system and use that path instead. BTW, --no-site-packages should really be the default.
Back to flipping out...
Posted by
Hank Gay
at
22:16
View Comments
Labels: django, note-to-self, python, virtualenv, virtualenvwrapper
Do you use MacPorts? Ever switch from one version of PostgresQL to another, e.g., 8.4 to 9.0? Did you notice that it started complaining about a non-existent home directory for the postgres system user? Me, too.
My first instinct was to edit the user, but there is no entry for postgres in /etc/passwd. That led me to this excellent article. Using that info, I cooked up the following command:
sudo dscl localhost change /Local/Default/Users/postgres NFSHomeDirectory /opt/local/var/db/postgresql84 /opt/local/var/db/postgresql90
Back to flipping out...
Posted by
Hank Gay
at
10:28
View Comments
Labels: mac, note-to-self, postgresql, user-management
Excellent article on code smells.
Back to flipping out...
Posted by
Hank Gay
at
07:40
View Comments
Labels: sneak_attack
Ever forget to sudo before you started editing that file in vim? Here's a nifty, tee-based trick to save you some hassle.
Back to flipping out...
Posted by
Hank Gay
at
08:37
View Comments
Labels: sneak_attack, sudo, tee, vim