Code Archive

i3 window manager I use i3 with i3bar and sometimes I use external displays. When I do, I want to the systray to be on my primary monitor. I use the script below to reconfigure i3 on the fly. more

Django models are usually created with a get_absolute_url method, but Wagtail pages don't have one. On this site I mix Wagtail pages with other Django models and needed an url without a domain in some places, below is the solution I'm using right now. Most methods to get a page … more

Silence While interacting with gnupg on Debian/Ubuntu it is often necessary to input a passphrase. I found the most reliable way to do this from the command line is to use gpg-agent and configure the pinentry tool to be command line based. This may break GUI apps though that need a … more

I tried to look this up yesterday but couldn't find any current numbers for the size of the testnet blockchain. So here are my stats, with txindex enabled. more

Small changes to my arm salt install setup were needed on Debian Buster. more

Wagtail has the modeladmin module in contrib which allows you to edit any Django model through the Wagtail admin interface. Unfortunately it's not very flexible, the code calls the get_edit_handler method on the admin class and the panels property of the model can only be a list. In one project … more

Disk info I like to monitor disk usage from the command line using the df utility. However, the output can get overwhelming sometimes depending on the system. This is a tiny bash script I use as a df wrapper that does filtering, sorting and uses colors. It takes an argument nc to … more

Machine This bash completion script ensures that you always get the matching bash completions for the installed kubectl, minikube and helm. Simply source it and it will do the rest. more

Tux I run Debian unstable on a few machines and wanted to know if I was always running the latest kernel. I've added the script below to my shell startup. And then I went on and added it to some servers as well, after a few hundred days of uptime there … more

Emoji I recently played a bit with emojis, the result is this script which lets me search existing emojis and transform strings. It's a trivial Python script that leverages https://github.com/carpedm20/emoji more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityFontGnuPGThunderbirdJenkins