# original work by Michael F. Lamb. License: GPLv3.
RFC2812Matcher = ///
^ # We'll match the whole line. Start.
# Optional prefix and the space that separates it
# from the next thing. Prefix can be a servername,
# or nick[[!user]@host]
(?::( # This whole set is optional but if it's
# here it begins with : and ends with space
([^@!\ ]*) # nick
View gist:2199506

Virtualenv's bin/activate is Doing It Wrong

I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.

Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.

This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.



Ideas for improvements to git log --graph

I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.

Make the graph for --topo-order less wiggly

Imagine a long-running development branch periodically merges from master. The git log --graph --all --topo-order is not as simple as it could be, as of git version

It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.


When are Python circular imports fatal?

In your Python package, you have:

  • an that designates this as a Python package
  • a, containing a function action_a() that references an attribute (like a function or variable) in, and
  • a, containing a function action_b() that references an attribute (like a function or variable) in

This situation can introduce a circular import error: module_a attempts to import module_b, but can't, because module_b needs to import module_a, which is in the process of being interpreted.

But, sometimes Python is magic, and code that looks like it should cause this circular import error works just fine!

Break input data into chunks and use 'dmtxwrite' to create a DataMatrix 2D
barcode for each chunk. Dump all these into an HTML page for easy printing.
The size of the chunk depends on the target size of the barcodes; see
Intended for making hard (paper) copies of small but highly important data,
like GPG keys, that can be retrieved faster and more reliably (one hopes) than

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"
View .gitignore

My ErgoDox Keyboard

I spent a lot of money ($236) on a computer keyboard. A computer keyboard that you can only buy a couple times per year, that you can't purchase in any store, which took three months to arrive after I placed the order, that I had to painstakingly solder together myself.

The design is called the [ErgoDox][]. [][] has periodic group-buying events where they solicit buyers for all the parts, as a cost savings measure. If you were to order in small quantities through electrionics retailers like or to build for yourself a single keyboard, the cost could be above $500.

I had been noodling around for a while on my own design for "the perfect keyboard" with very slow success, as I have very little experience with electronics. But, thanks to the recent "maker" movement the field of printed circuit board manufacturing is becoming more accessible to hobbyists, so I was giving it a go. Despite not getting very far into a design, I still managed to take down lots


This is an unmodified selection of code I wrote for and under contract to AT&T, so AT&T holds all copyright.

AT&T released it to the public under the terms of the Apache 2.0 License (as described in license headers in the source code) as part of a larger body of work.

I retrieved these copies from their public repositories on 1/9/2018 after I was no longer under contract to them. I am hosting it here in compliance with the terms of their license. The links below point to AT&T's public repositories.

  •, a simplistic Requests-based wrapper for the Ceph RADOS Object Gateway Admin Operations API.
  •, a little context manager to make it easy to perform some function within a temporary director

Toward a common Package Manager

This is a collection of notes, that I expect will progress from the perspective of a naive outsider to resigned pessimism. I started it as a naive outsider just to keep notes, and I hope that the document will remain accessible for other naive outsiders when complete. I suppose it's also a remote possibility that we might actually make progress toward the stated goal, as well.

One of the major incompatibilities between competing Linux distributions is their [package format][]. Red Hat uses rpm packages; Debian and Ubuntu use deb packages; slackware uses tarballs (following particular conventions?); experimental package formats cause whole new distributions to arise, for example NixOS. Non-Linux systems have package management tools as well: FreeBSD has a ports/packages system; MacOS uses pkg files; Windows uses MSI files.

Furthermore, most of the popular system package formats are built around the idea that the software they install will be the only version and only