In a old, but still relevant post James Bennet argues for a way of handling the choice tuples used by Django. One of the reasons I haven’t always followed that advice was that it was just a lot of extra mundane keystrokes, and I’m lazy. It was well suited for a quick Python hack, and I now use the script below as a TextMate bundle so that I can just type in a list and have it converted to “the right way”.
Easy Django choices done right
May 10th, 2010 — Random Observation
Turning a Mac Lab into a disc burning machine
March 12th, 2010 — Random Observation
Have a lab of Macs – need to burn a bunch of CD or DVDs? Harness those monkeys!
Bash completion for diskutil (and others…)
March 12th, 2010 — Random Observation
A few of the tools I use have spent some time working up bash completing. django-admin and virtualenvwrapper to name two. As a Mac sysadmin I use a number of CLI tools for stuff, and was interested in working up some bash completion for these.
Integrating a paper based stage in a digital workflow with Django and QR code
March 8th, 2010 — Random Observation
There are several procedural things at work that still involve a signature, or hand written note on a piece of paper. This reality has made it hard to digitize these practices. While much of the process could be replace with a web app, with plenty of benefits. The reality is that because the paper step is required, the process would become disjointed. One way to reconcile the paper with the digital record, is to scan in the signed document and attach it to the digital record. However this doesn’t pass my “ugh” test in that even with ajax, manually attaching scanned documents to the correct record is still a tedious process. That is where qrcode comes in.
Kevin Nails it
February 15th, 2010 — Random Observation
The Django Advent site is proving to be some great writing. The recent piece by Kevin Fricovsky hits the nail on the head in so many ways.
a little tip on color
February 11th, 2010 — Random Observation
Not much to say other than I’ve been using this for a while and want to pass it on.
This post has a great tool for randomizing terminal colors.
If you have a lot of terminal windows open – this can make expose very handy (I don’t really use tabs).
I have this bound to CMD-Shift-C
Python,Multiprocessing,Hyperthreading, and image resizing
January 13th, 2010 — Random Observation
I have the occasional need to resize a set of images. I used to use Photoshop batch actions, then I used some droplets, and recently I’ve been using a simple python script with PIL (Python Image Library)
We recently got an 8 core Mac Pro, and I wanted to see if I could take more advantage of all those cores when resizing images.
Pretty view of hg diff
November 20th, 2009 — Random Observation
Been using hg, and like to use hg diff to help me make better commit notes – but been spoiled by bitbuckets HTML view of diffs
So here is a quick script that I keep on my path for viewing hg diff, formated with pygments – I’m sure it would be very easy to adopt this to git.
Setting up pinax on Dreamhost Private Server
October 29th, 2009 — Technology
using apache, mysql, mod_wsgi, and virtualenv
Dreamhost provides free hosting to nonprofits, and for now they seem to have thrown in a virtual private server. This is hard not to take advantage of, and I’m hoping that the VPS is better performing than the shared hosting – but my concern is that they all share the same mysql servers. So here is how I got pinax up and running in its comfy and modern Python web stack.
Restricting login to account based on IP address
October 28th, 2009 — Technology
At work we needed to have a standard local account that would work off campus, but not on campus. Here was my solution.
Installing MySQL Python bindings on OS X Leopard server
October 22nd, 2009 — Random Observation
Installing the mysql-python package on Leopard is relatively easy if you’ve installed MySQL from the mysql.org distribution – but installing on Leopard Server is a bit more problematic.
Local editing of remote files
October 15th, 2009 — Random Observation
So found this buried under some dust. I had forgotten that I had ever set this up, but in adding some stuff to a .bash_profile on an older server found some code that I’ve spruced up bit for this post that lets you locally edit a remote file initiated via command in a remote SSH session.
Marking all read in Mail.app
September 14th, 2009 — Random Observation
I’ve always been annoyed that the only way to mark all as read for a mailbox was with a contextual menu in the sidebar – lets change that.
Launching OE-Cake
September 9th, 2009 — Technology
OE-Cake is still expired for OS X – lets work around that
Making iPhone iTunes remote more useful
September 8th, 2009 — Technology
The iTunes remote is pretty slick – if only it could turn on the stereo
