Downtime and DDoS against PowerDNS.net

This site is back to normal now, after problems caused by a DDoS were resolved earlier today. The attack was not against the site/server directly, but against the DNS service I’ve used until this morning, PowerDNS.net, resulting in my domains not being accessible for around 12 hours between 09:12:06PM GMT yesterday and 09:07:06AM GMT today (according to Pingdom). Luckily this is just a personal blog and not a business, otherwise it could have cost me money. Nevertheless I am glad that … [Continue Reading]

backup duplicity xtrabackup

Easier backups with duplicity and xtrabackup

A little while ago I wrote a couple of scripts to take backups with duplicity and xtrabackup more easily; I am a little allergic to all the options and arguments you can use with both duplicity and xtrabackup, so these scripts use simple configuration files instead. You can find these scripts on Github at https://github.com/vitobotta/admin-scripts. xtrabackup I wrote a post on xtrabackup some … [Continue Reading]


Using Nginx to comply with a third-party API’s rate limits

API rate limits: the problem I have just started a little pet project today that involves the integration of APIs of various social networks. In order to prevent abuse, among other reasons, these APIs usually restrict the number of requests that a client (normally identified by IP address) can make in a given amount of time, through rate limiting practices; an example is the Reddit API, which … [Continue Reading]

Recent entries


Jenkins CI with Rails projects

I've had to set up a Jenkins server for Rails projects today so I thought I'd write a post about it. Hopefully it will save someone time - I'll assume here that your already know what Jenkins and CI are, and prefer setting up your own CI solution … [Continue Reading]

multi tenancy

Multi tenancy with Devise and ActiveRecord’s default scope

Multi tenancy with default scope Multi tenancy in a Rails application can be achieved in various ways, but my favourite one is using ActiveRecord's default scope  as it's easy and provides good security. Essentially, the core of this technique is to … [Continue Reading]


Top level methods in Ruby

How top level methods work in Ruby There are many quirks in the Ruby language which IMO show funny behaviours. Take the top level methods, for example - that is, methods defined outside of a class or module. There is something weird about them that … [Continue Reading]

Microsoft buys Nokia

Microsoft buys a chunk of Nokia. Surprise!

We saw this coming, didn't we? It was all planned, and well orchestrated; it's been a good strategy: send someone to the other company, help it sink, then buy it at a discount price. It was all a con. I love conspiracies. The "mole" ex-Microsoft … [Continue Reading]

wordpress logo

Why I switched from Jekyll back to WordPress

Back in 2011 I wrote a couple of posts -which became very popular- on why I had migrated from Wordpress to Jekyll, and on how to perform such migration in great detail. I had become a big fan of Jekyll, so it may surprise that this site is now … [Continue Reading]


Copy files via an intermediate server with SSH/SCP

Sometimes I need to copy files from a remote server, but I can only access it through an intermediate server due to some restrictions. I can't remember always how to do it so I thought I'd add some notes here which may hopefully save time to others; … [Continue Reading]


MySQL Cluster with Percona/Galera

Sections: Why a MySQL cluster SSH setup Firewall with iptables Dependencies Installing the Percona packages MySQL configuration Adding nodes to the cluster Load balancing Testing ConclusionWhy a MySQL cluster I have been using MySQL for many … [Continue Reading]


L2TP IPSec VPN, iOS compatible

Why an L2TP IPSec VPN I use VPNs all the time these days to access resources that I have restricted on the servers I manage. I also want to be able to watch live TV programs from various countries regardless of where I am; in most cases live TV is … [Continue Reading]


FileVault: User’s home directory on an encrypted second drive

FileVault 2 Using encryption on a laptop gives you peace of mind that if the laptop gets lost or stolen, others won't be able to snoop inside your precious data. To this end, I've been using FileVault for years to encrypt my home directory; so I was … [Continue Reading]


Bitwise operations in Ruby, and an example application to testing with Rspec

I often need to test that something should happen or should be possible depending on a variable number of conditions that are linked together in some arbitrary way. In one application, for example, I have a model called License, and one of the … [Continue Reading]