Python,Multiprocessing,Hyperthreading, and image resizing

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.

Continue reading →

Pretty view of hg diff

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.

here is the gist

Setting up pinax on Dreamhost Private Server

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.

Continue reading →

Restricting login to account based on IP address

At work we needed to have a standard local account that would work off campus, but not on campus. Here was my solution.

Continue reading →

Installing MySQL Python bindings on OS X Leopard server

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.

Continue reading →

Local editing of remote files

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.

Continue reading →

Marking all read in Mail.app

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.

Continue reading →

Launching OE-Cake

OE-Cake is still expired for OS X – lets work around that

Continue reading →

Making iPhone iTunes remote more useful

The iTunes remote is pretty slick – if only it could turn on the stereo

Continue reading →

Making Google Earth work for us

In our school environment, we had a couple issues with Google Earth’s default behaviors – here are my workarounds.

Continue reading →

simple weak password generator

There are times I need to create some easy to remember weak initial passwords for students – here is a quick script

Continue reading →

Managing mailman on the command line

Even though we moved our email from OS X server to google apps for education – we still manage our lists with a local mailman instance (still on 10.4). However the web based interface for adding new members can be a bit of a pain as it never seems to remember the right authorization when switching between lists – luckily mailman has some great command line tools.

Continue reading →

Editing long commands

Sometimes you get in a situation where you are editing a long command on the command line and you’d kill to be able to use your mouse to select a word or option in the middle. This tip makes it a pleasure

Continue reading →

Letting users get to (i)Work

iLife and iWork can throw up an awful lot of update dialogs and welcome screens for people who first launch them. For users on my network I wanted to prevent those from coming up

Continue reading →

Geek distractions

Tools are getting so sophisticated now – that they can be a distraction for the lightweight or part time coder.

You can get lost in the ins and outs of git vs hg, choosing a database engine (SQL vs Key-Value etc), javascript frameworks, PIP vs Buildout and integrating with virtualenv.

They all have their merit, especially to people who sit in this world all day long, but none of them directly produce work product for you. They are tools – and its best to learn them bit by bit, not all at once, or you will be overwhelmed.