Tuesday, August 10, 2010
Cyberpunk coding fonts - monofur on Linux
If you ever grow weary of Inconsolata, try monofur. Adding Truetype fonts to Linux is a piece of cake with fontypython. Just install it via Synaptic or apt-get.
Sunday, August 8, 2010
Tuesday, May 11, 2010
Wednesday, May 5, 2010
Friday, April 16, 2010
SQL for removing invalid foreign keys and typecasting in Postgres
DELETE FROM session_data WHERE session_data.name = 'user_id'
AND NOT EXISTS
(SELECT * FROM users WHERE CAST(session_data.value AS integer) = users.id);
Friday, January 8, 2010
Debugging nosetests with ipdb
Ever wanted to debug Python with tab completion and syntax highlighting? Then you'll love ipdb:
sudo easy_install ipdb
The only thing you have to do is use ipdb instead of pdb:
import ipdb; ipdb.set_trace()
With a little trick it will even work with nosetests:
import sys; sys.stdout = sys.__stdout__; import ipdb; ipdb.set_trace()
Subscribe to:
Posts (Atom)