Minimizing I/O when migrating from Virtualbox on Veracrypt to Proxmox on ZFS

I’m moving large-ish (half-TB or larger) files between hosts. It’s important to avoid extra copies in this workflow, since each pass over one of the larger files to read the whole thing (and there are several of them) takes hours. I managed to decrypt VM disk images, transform them from one disk image format to another, copy them from one host to another, calculate SHA-256 hashes on both sides to verify data integrity, compress and encrypt them on the destination, and to display a progress bar, all without any additional copies. One big block-device read on the source end and one big block-device write on the destination end is all of the disk I/O that’s happening.

See below for how I did this.

Continue reading “Minimizing I/O when migrating from Virtualbox on Veracrypt to Proxmox on ZFS”

Favorite monospaced coding fonts as of late 2018

As a professional software developer, looking at source code has been a huge part of my job for a couple of decades now. It’s really, really important that the display I’m looking at is sharp and properly color-calibrated for appropriate contrast, and that the font I’m using is clear not only when reading letters, but also when displaying various special characters that are commonly seen in source code (so that things like { and } are obviously different from ( and ) and [ and ], and so that @ is clearly different from & or * or %.).

For this reason, every few years I check out the latest and greatest “programmer fonts” and see which one will let me make the type really small while still being clearly legible, so I can get lots of source code on the screen at once.

Read on to see my current favorite programmer’s font, and the ones that I think are almost as good.

Continue reading “Favorite monospaced coding fonts as of late 2018”

Take back your control-space keybinding in Ubuntu w/ Cinnamon

I use Emacs and just switched to Cinnamon when upgrading to Trusty Tahr. It somehow stole the control-space keybinding, which I use in Emacs a lot; it is used for setting the current mark, so I can cut or delete a region of a buffer. This is also used for the autocomplete feature in Eclipse, which is one of the main reasons I use Eclipse.

Solution found: some built-in thing called IBus binds that for setting the input method. I like the input method I already have set up & I don’t need to change it, so here’s how to disable that: answer on askubuntu.com.

 

 

Patch to make Ubuntu’s GNU Screen bash completion work better

If you make a screen with a name using screen -S foo and then try and reattach later using screen -R f[tab] it doesn’t work. It only completes the full name as seen in screen -ls which starts with the PID of the detached screen, like 9972.foo. Not very convenient. Why can’t it just complete using the name you gave it?

Someone else solved this problem three years ago but nobody accepted their patch, and now /etc/bash_completion.d/screen has been overhauled and the patch no longer applies.

I updated the patch so it works and resubmitted it to Ubuntu.

If you don’t wanna wait, grab the code from this gist and do this:

This will probably work on Debian too since that’s where the completion script came from.

How to make Machinist and Autotest coexist

If you’ve tried to use Machinist and autotest (part of ZenTest) you have probably seen this exception that prevented you from using it:

It’s discussed in the machinist Google Group as well.

It’s because of a wacky hack that’s part of Machinist that overrides Module.name so you can do Sham.name, but ZenTest expects Module.name to do what it does normally.

I have a fix for this.
Continue reading “How to make Machinist and Autotest coexist”