Category Archives

Archive of posts published in the category: Software

Count number of lines in a Git repository

Have you ever wondered how many lines you have developed in the past month? There is an easy way to calculate it using cloc.

Monitor the progress of dd command

dd is a very useful command to clone disks; however, given the typical size of modern disks, it can easily run for hours without any output. A simple trick allows us to monitor the progress of the cloning.

Recursive replacement with sed

Sometimes one needs to recursively replace some old expression with a new expression. This can be done very efficiently with sed command.

RegExp: an online tool for testing

From the website self-introdutcion: “RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).” Just try it at http://www.regexr.com/.

A simple procmail blacklist

This is a simple procmail configuration to create a blacklist filter.

WordPress: colored categories (updated 22/01/17)

Want to have colored categories in your WordPress site, just like I have here? Follow me in these simple steps!

SSH: how to avoid timeout freeze

Sometimes a SSH connections simply hangs up: it doesn’t accept input, doesn’t disconnect, and you can’t Ctrl-C to kill the SSH process – or anything else.

Linux: change Bash history size

Whenever I get a new gadget I start experimenting, writing lots of commands in the console. I use Bash history to keep a log of everything I try, but sometimes I run out of history space…

Firefox: register new protocols

Sometimes Firefox does not know hot to handle certain protocols, such as ed2k. This is the shortest way to have it recognize them.

Ubuntu 14.04: cleaning up Unity Dash

I typically use Dash to search for programs and, less often, files. The default behaviour of Unity Dash is to return thousands of results among not only your documents, but also online shops, search engines, social networks, music and so on.