Let’s automate that deployment – CodeKit Compiler

In the process of automating deployments at Tattoodo I found myself having to integrate with CodeKit. After scouring Google for a tool that could automate the compilation, reading a list of files and such from CodeKit, I came to the conclusion, that so such tool exists.

I would hereby like to introduce codekit-compiler, a python hack which will read codekit’s config file, and compile the files using the sameish tools.

Currently it only supports .less compilation, and .js minification, which is only some of what CodeKit can do, but it’s enough for me, for the time being.

I’ll be using it as an intermediate step, before rolling a friendlier compilation/minification step.

Usage: Download the script, run it from a directory where config.codekit is located, hope it doesn’t break. You’ll want to either change the path to lessc and uglifyjs or run npm install less uglify-js to install them locally.

I would like to thank the people who made CodeKit, for storing their configuration file as JSON. Makes reading it all the much easier.

Feel more than welcome to send a pull request, rewrite this as a gulp/grunt task.

vim-gutentags – automatic tags file generation

Today I’m going to add vim-gutentags to my .vimrc file.

It promises to simplify the cumbersome maintenance of ones tags file, which in turn enables you to use vim’s tags features such as C-] for go to tag, t to go backwards in the tag-stack and so fourth.

Installing the plugin with NeoBundle, I ran into an issue, which has been reported by someone else. I updated this issue, and am about to start working with gutentags enabled.

The .vimrc at this point.

Change something in your vimrc every day

This morning, I thought about how to get to know vim. As in really know it.

I’ve been using vim for many years, but there are many things I don’t use because I don’t know about them.

So I’m going to try changing something every day and write about why, so I’ll learn about it in the process.

If you use vim (or another editor), and like me don’t really know it, you should consider doing the same. For science!

A short story about power and spark plugs

So I’m building a storage server. It’s got a very nice supermicro x9sri-f-o motherboard with IPMI and it’s got a redundant PSU.

Last Friday I got all the parts together and started tinkering. Upgraded the BIOS and IPMI firmware. Installed FreeBSD, turned the power off at the PSU’s and went home for the weekend.

Fast-forward to monday, and I’m feeling just a little bit lazy and thought to myself “I’m not going to go into the room next door to boot the server, I’m going to boot it via IPMI for fun and profit”.

So I open the IPMI control panel in my browser, and click “power on”. Nothing happens. “That’s odd” I thought “must be an issue with the firmware I updated”.

I glanced at the README.doc and found a difference between the way I updated the firmware. “Doesn’t work without this” it said.

I re-flashed the firmware and waited for the IPMI card to reboot and then clicked the “Power on” button.


“Odd. Very odd.”

I went in to the server to give the power button a push manually.


I looked at the PSU’s. They had power, but was not switched on. Flipped the switches and power came on.

I’m not really sure how that happened, but I figure that the PSU’s have fairly large capacitors on the internal circuit and that had enough power left to keep the IPMI working.

Always check the spark plugs.

Converting a south 0.7 migration back to 0.6

I had a minor fight with south earlier today, where someone had created a migration with south 0.7, and I needed it to work with south 0.6.

Needless to say that it would be a pain to manually convert it from the better 0.7 format back into 0.6, so I wrote a fairly small python script, that does the job.

Continue reading Converting a south 0.7 migration back to 0.6

iptables throughput on Soekris net4801

Earlier today I had to find out what the capacity of a soekris net4801 running openwrt.

Using a fairly normal rule set, it can forward 51.8 Mbits/sec which is alright for a 266 MHz processor.

Sadly for me, we’ll be getting a 100 Mbit fiber optic connection at work in a few months, so I guess I’ll have to move to a net5501 unit in order to max out the connection.

Continue reading iptables throughput on Soekris net4801

How to resize ext3 partition on LVM

From time to time I have to resize the file systems on various systems which are primarily using ext3 on top of LVM.

Resizing such an ext3 file system is not a complex task at all. For starters, make sure you shut the domU down (or unmount the file system – unless you feel brave enough to do an online resize, in which case you should not be reading this).

Continue reading How to resize ext3 partition on LVM