Code Archive

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

After installing the 0.16 release of bitcoin on my server that runs my testnet faucet, I was greeted with this error when starting it: bitcoind: "error while loading shared libraries: libgcc_s.so.1": cannot open shared object file: No such file or directory. The problem is quite easy to fix, see below. more

Piano I love quodlibet and have a big collection of music in it. Some time ago I wanted to transcode some big lossless files into the more mobile-friendly ogg format and wanted to query quodlibet for the songs. This is an example of a script that can access the quodlibet database … more

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