GitLab vs GitHub

Considering GitHub after the recent GitHub announcement that private repositories would be free for unlimited users? You might want to think again. You can find great detailed comparisons already, but to me the key advantages of GitLab over GitHub are:

  • Free reliable self-hosting. This includes upgrades that have gone flawlessly every time. I actually feel a bit guilty that we have benefited so much from GitLab and have paid them exactly $0.
  • Fully integrated CI/CD. Others are playing catch up but GitLab essentially invented the idea.
  • Commitment to Open Source. This goes beyond just code openness. For example the GitLab employee handbook on remote working was a useful resource during the COVID-19 quarantine transition.

Posted in Uncategorized | Tagged , | Comments Off on GitLab vs GitHub

A software retrofit for keyboards without multimedia keys

When using a simple keyboard that lacks multimedia keys, here’s a solution for Windows systems that add custom key mappings that in turn generate simulated multimedia key presses. Any application that supports multimedia keys won’t know the difference.

  1. Install AutoHotkey.
  2. Create multimedia_keys.ahk file containing:

Double click multimedia_keys.ahk to activate it immediately. Test it out by pressing WindowsKey+NumPad8 to turn up volume.

To activate the AutoHotKey mapping every time you login:

  1. Create a shortcut to multimedia_keys.ahk
  2. Click Start -> Run and type “shell:startup” and hit enter.
  3. Move the shortcut created in step one to this startup folder
Posted in Uncategorized | Comments Off on A software retrofit for keyboards without multimedia keys

Exception Handling in Bash

Here’s a convenient pattern for anyone doing Bash scripting: Use a subshell with the Bash halt-on-failure feature enabled to execute a set of commands but break as soon as any one of them fails.

The above example will print only “foo” because the false command returns a non-zero error code which causes the subshell to exit.

For quick and simple scripts it’s easy to just enable the halt-on-failure feature at the beginning of the entire script, but for anything more advanced, you want to be able to “catch” the error and handle it in a more sophisticated way.

Another similar mechanism that Bash provides is a way to run a command or function when the script exits:

This is also a great way to make your Bash scripts more robust, but is best reserved for standard cleanup, like removing temporary files that may have been created.

Posted in Uncategorized | Comments Off on Exception Handling in Bash

Great advice

that I’m clearly not following.

Posted in Uncategorized | 1 Comment

The Laptop-with-Roaming-Services Problem

This is a quick solution to the problem of hosting services on a roaming laptop that need to be semi-reliable and available. When switching connections from wired to wireless (or vice versa), services like ssh need to remain available and active connections should remain connected (albeit with maybe a brief disruption). The solution is to transfer an assigned static IP to some secondary interface (e.g. wlan0) whenever the primary interface (e.g. eth0) becomes disconnected.

The result is nm-connection-delegation, a simple set of scripts that hook into Network Manager events if-up and if-down. To use, simply extract into /etc/network on any Debian or Ubuntu based system:

sudo tar -C /etc/network -zxf nm-connection-delegation-0.1.tar.gz

And configure a few values in /etc/network/connection-delegation. Note that this solution only works when both primary and secondary interfaces are on the same subnet.

Posted in Uncategorized | Comments Off on The Laptop-with-Roaming-Services Problem

Saving Orphaned Terminal Applications

No longer does it require a degree in UNIX voodoo to save shell processes which have become detached from a controlling TTY. Meet reptyr.

Posted in Uncategorized | Tagged , | Comments Off on Saving Orphaned Terminal Applications

Dedication to Open Source Software

Ran across this comment in Eye Of Gnome bug #78514:

I would like to extend my thanks to the gnome team/community for a great last
moment with my dad.

Adrian Hands (my father) wrote the patch above to improve the usability of
gnome for himself and others. You see my dad was suffering from ALS and his
hands were so crippled he could no longer use a keyboard. Thus we used a Darci
usb morse code keyboard emulator to help him type. Even the morse code device
was a struggle as the sensitivity adjustment and positioning of the nice two
paddled key would fall out of whack. I rigged up a pvc cage that wrapped around
his knee and fixed remote switches to the cage so that he could use the
remaining strength in his legs to operate the Darci morse code device. He used
this last bit of body movement to write this patch.

Here is a photo of him using it:

My father passed away yesterday. I went back through my email to find our last
correspondence (he was in India for treatment, and I live in Raleigh). I would
like to share the email with you.

On Sun, Jan 30, 2011 at 12:16 PM, Adrian Hands wrote:
> commit 0b209b1ff16e863e60a1d86413aa57c5fbde76b0
> Author: Adrian Hands
> Date: Fri Dec 31 14:34:58 2010 +0100
> Add Copy Image and Copy Path to clipboard functionality
> Fixes bug 78514.
> data/eog-ui.xml | 9 +++++++
> src/eog-window.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 0 deletions(-)

I have the coolest Dad in the world!

I am so glad that my last comment to my Dad was something like this.

Adrian Hands loved free software / open source. I do as well.

Thanks so much for the great software, and a new great memory.
-Ian Page Hands

Posted in Uncategorized | Comments Off on Dedication to Open Source Software


A Slashdot gem:

Oh, the jobs people work at! Out west, near Hawtch-Hawtch, there’s a Hawtch-Hawtcher Bee-Watcher. His job is to watch… is to keep both his eyes on the lazy town bee. A bee that is watched will work harder, you see.

Well…he watched and he watched. But, in spite of his watch, that bee didn’t work any harder. Not mawtch.

So then somebody said, ‘Our old bee-watching man just isn’t bee-watching as hard as he can. He ought to be watched by another Hawtch-Hawtcher! The thing that we need is a Bee-Watcher -Watcher!’

Well… The Bee-Watcher-Watcher watched the Bee-Watcher. He didn’t watch well. So another Hawtch-Hawtcher had to come in as a Watch Watcher-Watcher!

And today all the Hawtchers who live in Hawtch-Hawtch are watching on Watch-Watcher-Watchering-Watch, Watch-Watching the Watcher who’s watching that bee.

You’re not a Hawtch-Watcher. You’re lucky, you see.

Posted in Uncategorized | 1 Comment

My Feeds

Sounds and Pictures


Posted in Uncategorized | Comments Off on My Feeds

Localization is a lot of work!

But satisfying. I’m finally calling localized enough and I have to say that it is cool to have an identical feature set in two fully localized versions (en_US and fr_FR). Just some of the tasks to get the site fully localized:

  • Make the FreeDream theme localizable by wrapping all the text in __(…) or _e(…) GNU gettext wrappers. Ironically, the theme was written by a French lady who hard-coded some French strings that I had to first translate to English so that I could then …
  • Translate the FreeDream theme to French. I used Poedit which has a mediocre UI, but it met my minimum requirements. This tool scanned the theme’s PHP source and generated a .pot/.po. I commissioned some help to get the strings translated then generated the .mo file (poedit actually does this automatically every time you save) and uploaded to the theme’s directory. Things looked good, but there were still some miscellaneous strings still in English. To zap those, I had to…
  • Install WPML and translate some more. WPML is the key ingredient that makes translating a WordPress site manageable. And it does so without mucking up the default WordPress SQL tables. Aside from providing nice interfaces that allow you to translate all your own content (posts, categories, and pages), it also hunts down those miscellaneous strings that I mentioned and provides a web interface to translate them. You can even export .po/.mo files when you’re done. Very cool. This is the feature that makes it easy to…
  • Localize custom site features. Since WPML can translate Text widgets (which can hold HTML and even PHP) I was able to add a growth chart generated by Google Chart that displayed inches or centimeters based on the locale. In the same way, I added a MailChimp RSS-to-Email subscription form that subscribed users to the correct list – an English one connected to and a French one connected to

And voilà.

Posted in Uncategorized | Tagged , | Comments Off on Localization is a lot of work!