Posts in 'tech'

Auto-refreshing Google Chrome on file changes

I am known for being an lazy ass, one of the ways of coping with this horrible disease is automating any repetitive task that takes more that 5 minutes of work. So, in my free time, when I’m not dreaming of eating cake on a magical dessert island, I ...

Ditching Wordpress and becoming one of the cool kids

I’ve been a Wordpress user and developer for a long long time but lately this nagging idea kept crawling in the back of my head, why not switch my website to a statically generated one? Well, a 3 hour train journey and a lot of boredom finally pushed me ...

Building a messaging framework for Django

As you might have noticed, one of the key usability features that we were missing on Iconfinder was the ability to display so called “flash messages.” Flash messages are one-time notification messages shown to the user after processing a form or handling other types of user input, so the user ...

Launching services after Vagrant mount

I recently had to set up a Vagrant project where all the configuration files for services like nginx, supervisor, mysql where symlinks pointing to files residing on the Vagrant synced folder. This turned out to be a bit of a problem, when the Vagrant box boots, one of the last ...

Getting the IP address of a specific interface in puppet using facter

One of the problems that I find annoying in puppet is that you can’t easily obtain the IP address of a specific network interface.

Let’s say that you want to define a class or type to which you wish to pass a interface name and use it’s ...

Vagrant and SSH agent forwarding

I haven’t even started yet and I can already hear you muttering over there, “What the hell is this Vagrant thing and why should I care?”. Well, Vagrant is a wrapper around VirtualBox, the virtualization software, that can create homogeneous development environments automatically without any effort from the developer ...

Generating password hashes with puppet

Puppet expects the user’s password to be encrypted in the format the local system expects, for most modern Unix-like systems (Linux, *BSD, Solaris, etc.) this format is a salted SHA1 password hash.

To generate a password hash to use with puppet manifest files you can use the mkpasswd utility ...

Testing print stylesheets using Google Chrome

Testing CSS print media queries is really difficult but a new featured was introduced in Google Chrome in December that allows you to apply different CSS media types like handheld, print, screen and so on.

  1. Open Developer Tools in Google Chrome by clicking the menu icon at the top-right of ...

Programing the STK600 AVR board on Linux using C

Setting up the developing enviroment

Note: I’m assuming you have a .deb based distribution and a AVR STK600 board with a ATmega2560 microcontroller that you are programming using an USB cable.

Installing the software

We need to install the following programs and their dependencies:

  • gcc-avr: The GNU C compiler ...

Usefull linux commands/tricks

These are some sort of notes to myself, this list will be constantly updated.

Sort directories by size (human readable size):

1
# du --max-depth=1 -h |sort -hr

Set tabsize to 4 in vim:

1
:set tabstop=4

Show failed login attempts on your machine:

1
# lastb -F

Print the ...