Setting up my own Mastodon server
Posted on November 10, 2022. Reading time: 2 minutes
In light of the recent implosion of Twitter after its takeover, there's been an exodus of users to Mastodon, the distributed, open-source, social network alternative.
I have also set up an account and initially set it up on the largest server, mastodon.social, it did, however, not take long before there were severe delays and sporadic failed requests when using Mastodon, which is understandable considering the massive growth the network experienced.
The delays did make me wonder if I should make use of the distributed nature of Mastodon and set up my own server, so I did.
Replacing the icon of a Mac application
Posted on April 30, 2016. Reading time: 2 minutes
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. Since the icon takes up considerately less space and I don't need to know the temperature and fan speed, I opted for using the icon. It does however have a problem:
Generating Subresource Integrity Checksums
Posted on September 23, 2015. Reading time: 4 minutes
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.
Nginx with dynamic upstreams
Posted on July 26, 2015. Reading time: 5 minutes
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 http://service-1234567890.us-east-1.elb.amazonaws.com;
}
Test it out and - assuming the firewall/security group configuration is set up right - it should work just fine. Some hours later you may however find the service is no longer working, even though no changes has been made. Calling the ELB endpoint directly works just fine, but calling it through Nginx just times out.
Python Output Format
Posted on March 13, 2015. Reading time: 2 minutes
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. When you print out structures like lists, dictionaries and such, they will come out in a format that more or less resembles minimized JSON - not really the easiest thing to parse with your eyes, so I thought I would take a go at making a Pretty JSON plugin but for Python print()
output.
Guide: Docker Registry Frontend
Posted on January 17, 2015. Reading time: 3 minutes
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. It's a client-only AngularJS based web app which calls the Docker registry API directly and serves it up in a neat web interface (screenshots here).
Guide: Private Docker Registry
Posted on January 14, 2015. Reading time: 4 minutes
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.
New website
Posted on December 26, 2014. Reading time: 3 minutes
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.
Some thoughts about package dependencies
Posted on July 28, 2009. Reading time: 4 minutes
Last night I installed SqueezeCenter (the server software used with Squeezebox's) on my home server, since I want to use it together with SqueezeSlave running on my server. That way I can play music from my server while I have a webinterface to control it from all computers on my network.
For the installation of SqueezeCenter I downloaded the .deb package, since it was going to be installed on my home Ubuntu server. I ran sudo dpkg -i squeezecenter_7.3.3_all.deb
, which to my big disappointment showed that the dependency list for SqueezeCenter required MySQL server to be installed in either version 4.0 or 5.0. Since I already had MySQL server 5.1 installed, configured and running on the server, I didn't want that dependency to be met, since that would cause an uninstallation of my existing MySQL server instance, due to the packages claiming to conflict.
Zenphoto plugin: Zenphoto Sitemap
Posted on November 26, 2008. Reading time: 1 minutes
I have been coding a bit the last couple of days on a plugin for the gallery system Zenphoto. I wasn't very happy with how the images from my gallery where indexed, and I couldn't find any other decent coded sitemap generators for Zenphoto, so I decided to create one myself.
The result is a one-file plugin for Zenphoto, which is being activated by putting ?sitemap
in the URL for your Zenphoto gallery. When that is in the URL, a sitemap index will be generated, pointing to a new sitemap for each album in the gallery, which then contains links for each image in the album. The result is a sitemaps.org compatible sitemap structure which can be used with several search engines, ie. Google, Bing among many others.