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 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:": cannot open shared object file: No such file or directory. The problem is quite easy to fix, see below. more

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

Battleship engine room This post describes a deployment and maintenance method for Django projects that was designed with scalability in mind. The goal is to push new releases into production at any moment with minimal or no downtime. Upgrades can be performed with unprivileged access to the production server, and rollbacks are possible. I use Gunicorn, Fabric and Supervisord in the examples. more

I have a few old Django projects still running MySQL/MariaDB. Getting docker-compose to work with MySQL images is a little tricky, as the database needs too much time to start up. Below is a configuration that starts one application host and one database host. /usr/bin/mysql is used for MariaDB because … more

I needed protected downloads for a project using S3 on a HTTPS Django site. There are various ways to solve this problem, but I thought the most obvious was to offload access control to S3. Boto can generate signed download links that are only valid for a limited time. Great. … more

One of my client uses google apps, so I use that account to send out mails with Django, which works just fine. However, google silently drops all error mails to the admins, for whatever reason you can't debug and will never hear anything about anyway. As those mails only go … more

Iceland Django was always great for developers out of the box, but creating friendly admin interfaces was always a little too much work. This post explains why I now consider using Wagtail to make this task easier. more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confusedMoneyHackerUpset confusedX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerNginxSilenceTorWorldInternet securityFont