has_many :codes

Posts - Page 3 of 8

Manage active sessions in Rails

  • 5 min read

In an app I’m working on, I wanted users to be able to manage active sessions and sign out from any device they are signed in on, by invalidating logins. There’s a gem called authie that does this so you may want to…

Read More

Systemd timers configuration in Gentoo

  • 2 min read

Yesterday I configured backups with duplicity on a couple of servers using a 3rd party service, rsync.net, as the backup destination; since I am a little paranoid with backups I also wanted to schedule a daily task on my computer…

Read More

Postfix SMTP relay configuration in Gentoo

  • 1 min read

A Postfix SMTP relay configuration can be useful in several scenarios. Sometimes, for example, I want to have some email notifications sent to my email address by my computer at home, for example to receive reports of some…

Read More

Installing Gentoo on MacBook Pro

  • 13 min read

I recently decided to switch from OSX to Linux and went with Gentoo, so this post describes how install Gentoo on MacBook Pro. IMO the installation isn’t as complicated and difficult as many think it is, so I eventually…

Read More

Let’s Encrypt certificates with Nginx

  • 6 min read

SSL certificates can be quite cheap these days, but nothing beats free, and in this post I will show you how to use Let’s Encrypt certificates with Nginx (back in early 2011, I wrote a post on the most common reasons why…

Read More

Ubuntu server for Ruby and PHP apps

  • 12 min read

There are several guides on the Internet on setting up Ubuntu server, but I thought I’d add here some notes on how to set up Ubuntu server for Ruby and PHP apps at the same time. Ubuntu’s latest Long Term Support…

Read More

CentOS Parallels VM network configuration

  • 2 min read

This is how I fixed an issue with networking in CentOS Parallels virtual machines . Basically, after cloning the template, the clones appear to report only the loopback interface and one eth interface which seems to be inactive…

Read More