Code Archive

I run multiple desktop environments, and they all come with their own screen locking tool. Sometimes I want to unlock a system remotely, that means from the command line. The script below can unlock mate, gnome and i3lock. more

I recently added OTP authentication using pam_google_authenticator.so to most of my machines. It's non-trivial to set up, especially if you have system users with limited capabilities that need to be able to log in non-interactively, but all in all it feels good to have a little more security. When logging … more

Books There are various ways to send an ebook to a kindle, I use a tiny script. The only tricky part is to set the correct content type. You can get your kindle email address from your devices list on amazon. Don't forget to whitelist your from address in your Amazon … more

Firefox sync script

2020-04-30

I don't know about you, but I'm not satisfied with the firefox sync. Some addons don't sync at all, sometimes sync breaks entirely without a visible error. The size limit is understandable, but then why is it so hard to set up your own sync server. Anyway, here is a … more

I have a vero 4k armhf box I wanted to do some programming on, and as I use salt to configure all my work machines I tried to install a salt minion. The problem is that the machine comes with a preinstall Debian stretch which only has an outdated salt … more

When Firefox always redirects local sites to https change the following setting in about:config more

Recently I started working on a Django project, loaded the prod database into it, and ran the tests. Then the data was gone. I know some people intentionally want to run tests on the "main database", and there is a very simple way to achieve this. Simply inherit from a … more

I recently was at a tech event where there was some discussion about newlines in templates. I pointed out that relying on implicit newlines in template files can lead to problems. The short discussion ended with a statement that files always end in a newline, and people moved on. So, … more

This is an update for my post about automated django deployments Edit 09-2020: I've expanded the script to fetch remote data and load it into the local Django dev instance. Make sure you never run this script anywhere except than a development environment. more

Frankfurt Hauptbahnhof Connecting to the WIFI on the ICE train in Germany didn't work for me. I was using Debian GNU/Linux, and Docker was running. It turns out the train's wireless network uses the same subnet as Docker by default. The solution is pretty simple, kill containers, stop docker, purge networks. Yeah, … more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo