A few of my recent projects:

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

Cleaning / Fixing 4Runner Door Switches

30 Dec 2023

If you have a 3rd Gen 4Runner (1996-2002) that no longer lights the dome light when the doors are opened, chances are your door switches are dirty or in need of repair. Luckily, it’s a very easy fix.

Replacing 4L80e TCC Regulator Valve

18 Jun 2023

The TCC clutch on my Chevy Express van has shuddered and had poor engagement ever since I purchased it. A common wear item is the TCC regulator valve bore, which causes fluid to leak past the valve. TransGo makes a repair kit which has a scarf cut o-ring to seal the valve bore and improve TCC engagement, even with substantial wear.

Replacing Individual Cells in a Gen 2 Prius Battery

14 Jun 2023

I purchased a 2006 XW20 Prius (Gen 2) from a trucking company that had used it as a shuttle vehicle. The red triangle warning light was on with codes for a bad hybrid battery. To save money, I decided to try repairing the battery using individual cells purchased from Ebay instead of immediately paying for a whole refurbished pack.

Diagnosing a light, random misfire on a Jeep XJ 4.0l Engine

20 Dec 2020

I recently bought a 2000 Jeep Cherokee (XJ) with the 4.0l inline-6 engine. It had a light misfire at idle and would blink the check engine light under heavy acceleration. Here is the procedure that I used to diagnose and solve the problem.

Recovering a bricked Dell Precision 5510

30 Dec 2019

My Dell Precision 5510 (more or less an enterprise XPS 15 9550) recently updated itself to BIOS version 1.12.0. Apparently this BIOS version has a known issue where pressing F8 during boot will cause a no-POST, no display condition which effectively bricks the laptop.

Resealing and Upgrading Trim on a '78-'90 Volvo 240 Windshield

13 Jun 2018

The 1990 and earlier Volvo 240 windshields are known for their frustrating trim design which was held on by 22 plastic clips, set into the butyl rubber used to mount the windshield. My 1989 240 developed a leak near the top right of the windshield due to a combination of rust and shoddy resealing done by the previous owner.

Migrating a Subsonic Database from HSQLDB to MySQL

15 May 2017

The Subsonic project recently added support for databases other than the built in HSQL database that has always been packaged with the Subsonic server. My Subsonic server manages about 40,000 media files and has ~40 users with hundreds of favourites and ratings. It was starting to perform slowly and index scans in particular were taking ~3 hours, so I was looking forward to moving away from the outdated HSQLDB system to MySQL.

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.