Huwshimi

Mar 07

Listing directory sizes from a terminal

To get a list of directory sizes (only the parent folders):

du -h —max-depth=1

Feb 03

Batch export svg to pdf

If you have a directory full of Inkscape svg files and want to convert them all to pdfs you can use the following command:

for i in $(find . -name ‘*.svg’) ; do j=$(basename $i .svg) ; inkscape -zf $i -A $j.pdf ; done

Oct 23

Exposing object keys in python

A helpful debugging tip for Python if you’re stuck trying to find out what attributes an object has is to use:

 

obj.__dict__.keys()

Aug 27

The elevator pitch

Here are my notes from watching this video: http://vimeo.com/14465385, where Adeo Ressi gives feedback on a few startup elevator pitches. I found it quite insightful and Adeo is hilarious. Hopefully these notes are helpful for future reference.

Aug 08

Launchpad makefile error

If you’re trying to set up Launchpad you might run into this error:

ERROR: Site local-vostok does not exist!
make: *** [enable-apache-launchpad] Error 1
ERROR: Unable to install apache config appropriately

One way around it is to edit ”lp-branches/devel/Makefile”. Replace any instances of “vosok” with “vostok” then re-run “./rocketfuel-setup” and you should be good to go. There may be a better way and I’m sure a fixed makefile is on its way, but until then this should get you by.

Hopefully this will help some lost googlers.