Making a server - The plan

Posted on November 20, 2016

I currently have a virtual server running at Hetzner, it’s used for hosting this website plus a few other projects of mine. I’ve been contemplating rebuilding it from scratch, and think it could be good to blog about and to give you some tips in case you feel inspired to do the same. The current server has been ad-hoc configured over the years, I instead plan to make the new server a lot more structured and instead make use of configuration management for setting it up, a continuous integration server for checking and executing the configuration, “ChatOps” for day-to-day system administration and tools, metrics for the system and services, etc.

Continue reading →

Replacing the icon of a Mac application

Posted on April 30, 2016

I use a MacBook Pro for my daily computer needs. Not long after I got it, I installed smcFanControl in order to increase the idle fan speed, as the laptop otherwise got a bit too hot for my liking, even when doing non-CPU intensive tasks on the machine. There is one problem with smcFanControl though, the menu bar entry for the program can either be the temperature and/or fan speed or just an icon.

Continue reading →

Generating Subresource Integrity Checksums

Posted on September 23, 2015

The GitHub Engineering blog recently had a blog post on how they have added Subresource Integrity (SRI) tags on their third party assets. Long story short, this is integrity attribute you add to your <script> or <link rel="stylesheet"> tags which point to external (ie. not inlined) assets. Supporting browsers will then check the checksum in the attribute against the file it has downloaded before it parses the file. This is to make sure the file hasn’t been tampered with and to avoid the browser loading malicious files because some third party hoster got a security problem.

Continue reading →

Nginx with dynamic upstreams

Posted on July 26, 2015

I recently made a setup at work where I had a Nginx server facing the user, which would forward requests to a service running behind an AWS Elastic Load Balancer (aka. ELB). That in itself doesn’t sound like a difficult task, you just find the hostname for the ELB and point Nginx at it with a proxy_pass statement like this, right? location / { proxy_pass; } Test it out and - assuming the firewall/security group configuration is set up right - it should work just fine.

Continue reading →

Python Output Format

Posted on March 13, 2015

I use Sublime Text as my editor of choice, and I have loved how simple but effective the Pretty JSON plugin has been at making minimized JSON chunks into easy readable, neatly indented blocks of code with just one key press. Since I mainly do my programming in Python I found that I for debugging often print out variables from Python code, in order to get an easier glimpse of what data I am working on or what I have produced thus far.

Continue reading →

Guide: Docker Registry Frontend

Posted on January 17, 2015

If you have your own private Docker registry you might be wanting some kind of frontend for it, as docker search [...] can only get you so far in regards to getting an overview of what the registry contains. Fortunately all the information you might want about the registry contents can be aquired through the REST API, making it possible to present the data neatly on a website. Konrad Kleine has made the docker-registry-frontend project to do just that.

Continue reading →

Guide: Private Docker Registry

Posted on January 14, 2015

I got to play around with Docker lately at work, and for that we needed a private place to store Docker images. Since the other guides I found either were unnecessarily advanced, or hosted the registry inside a Docker instance, instead of making use of our existing server setup, I’ve gone ahead and made a guide for how I set it up. This guide shows the steps to take on an Ubuntu machine, but it should be easy to apply to other operating systems.

Continue reading →

New website

Posted on December 26, 2014

It has been in the making for some time but now it’s finally out. I’ve made a new design for my website and in the process also switched it from being based on Wordpress to now being a static site. Back in July my colleague Esben started work on his own static site generator, Beetle, and I got interested in the project shortly after. Within a month I made the first pull request to Beetle while also acting as a sparring partner to Esben’s development work.

Continue reading →

Setting up Tweet Nest in Nginx

Posted on November 23, 2012

Today I’ve set up Tweet Nest at Tweet Nest is a simple application that archives all your tweets, and make it easy to search for old tweets you’ve written that you might want to find again. Tweet Nest comes by default with .htaccess files containing an Apache mod_rewrite specific configuration, but since I’m using Nginx that configuration won’t work for me. The mod_rewrite rules are limited to rules for handling requests to /sort, /favorites, /search and pages to show tweets for a specific month and day.

Continue reading →

Football pictures and video

Posted on October 8, 2011

A few weeks ago I watched the Copenhagen Towers’ (the American football team I play for) U19 team play the semi-finals in the national championships, and I did of course take pictures of it. They can all be found in the Flickr gallery for the game. Tuesday this week Jens Rørbye - the media manager for Copenhagen Towers - contacted me and asked if I could help out with an interview of the teams American import quarterback player, JR Artozqui.

Continue reading →