The Cattle Grid

Michele Beltrame's corner

Me on facebook Me on GitHub Me on Twitter


I am Michele Beltrame, I love computer programming, Unix systems, languages, hiking in the mountains and playing the bass guitar.

This personal web site contains a blog with mainly tech-related articles, plus some extras. Most blog posts (all the tech stuff) are in English, but there's also the occasional Italian language writing.

Latest blog posts

Two-factor authentication (2FA) in Perl with TOTP algorithm (Microsoft or Google Authenticator or others)

Two-factor authentication is now essential for a lot of web sites, as it ensures that - even if someone gets your access credentials - he/she cannot login, because a token from your mobile phone is required. Therefor, the hacker should also have access to your phone and to the code to unlock it, which is highly unlikely.

Read article »

Cleaner code with perl 5.36 and defer

Version 5.36 of perl was recently released. Amid the new features it contains, there is a very interesting, and maybe lesser-know one: the new defer keyword.

Read article »

Properly transferring away mail from Gmail via IMAP

I wanted to name this article How to finally do away with Gmail, but such a title wouldn’t have revealed the technical content of the writing, which represents its most relevant part.

Read article »

Quick and dirty Apache and mySQL "watchdog"

Continuing the “quick&dirty” series, here’s a solution I implemented on a server where sometimes (once a week or so) mySQL just dies.

Read article »

Quick and dirty Apache log analysis

One hosting service I have contains several domains. In order to understand which of these web sites was the most trafficked, I needed to analyze the logs a bit. There are sever Apache log analysis solutions out there, but frankly I just needed some basic information, and didn’t want a software bloated with a lot of feature 99% of which I didn’t need.

Read article »