A few of my recent projects:

Here are a few of my recent projects / snippets of code.

Simplified Multiprocess Concurrency in Python with Decorators

05 May 2016

Alex Sherman and I recently finished a project we call deco, which is a simplified way to run code concurrently in Python. Because of the CPython global interpreter lock, runnning concurrent code in Python currently requires using multiple independent processes and serializing and piping function calls and arguments to them.

Creating Udev Rules for Generating Persistent Device Names

09 Jun 2015

The poorly documented and understood udev system on Ubuntu now generates persistent device names for network hardware, which is a step up from the old system where device names would be reassigned at boot and hardware changes could make assosciating a name with a physical insterface very frustrating. I wanted to take this a step further and generate meaningful custom names for different classes of hardware.

Repairing a Dodge Grand Caravan Window Motor

24 Apr 2015

The Generation IV Dodge Grand Caravan (and its sibling the Chrysler Town and Country) is well known for requiring an annoying and expensive replacement of the front window regulators after a drawn out failure where they will gradually stop working. I finally got around to looking into the problem on my van this week and found the root cause to be easily fixable.

Making Flask Blueprint Templates Behave

16 Jan 2015

A lot of the work I do involves large Flask applications structured in the manner described by the excellent Digital Ocean guide How To Structure Large Flask Applications. A side effect of this is that for large applications with many blueprints you end up with a templates folder that is a jumble of subdirectories, each relating to a specific blueprint. On a recent project, I decided I wanted to start storing an individual templates folder inside of each blueprint’s Python module instead of jumbling them all together into a single folder. This would make things more modular, as a single blueprint could be deleted from or added to an application without needing to mess around with another set of templates being copied into the main templates folder.

Creating a linked clone in ESXi (the easy way)

30 May 2014

Linked clones are a neat feature in ESXi for installations with many virtual machines that need to be deployed off the same template, because once you’ve created a base image you can deploy many copies of it without consuming a few GB for each install. Linked clones only consume space for the diff between them and the base image. Currently, the process of creating a linked clone is somewhat tedious if you only have vSphere, and requires downloading vmx and vdmk files to your computer and manually editing and duplicating them. I wrote a bash script to automate the process on your server which saves a lot of time and messing about.

Relative performance of mySQL on an SSD vs. a spinning disk

06 Jan 2014

One of our embedded devices at work reports in to a central control server about once a second and several different pieces of diagnostic information are logged in a mySQL database by the control server. Recently as more devices have been added to the network we have been seeing poor performance on the control servers as queues of diagnostics fill up while waiting for database inserts to complete. I performed some benchmarks comparing the performance of a mySQL database stored on an SSD vs. one stored on a spinning hard disk.

Extending Deluge's Execute on Complete Functionality

08 Dec 2013

I run Deluge on one of my headless server instances to seed several different categories of torrent (Linux mint ISOs, etc) and I like to have completed torrents automatically copied back to my home NAS over FTP. To do this, I use the execute plugin for Deluge to execute a shell script upon download completion.

Creating timelapses with ffmpeg

06 Jan 2012

I recently ran into a project where I wanted to take a folder full of JPEG images and turn them into a timelapse.