I have been having internet speed problems lately (as always :P), which kept me from updating my Arch Linux system. Today I decided to go ahead and update the system anyway, only to find that the download speeds were excruciatingly slow. As always, whenever I need to update my system with a bad internet connection, I fall back to aria2.

Downloading from multiple servers with aria2

Somehow, I was getting decent speeds with concurrent outbound connections, so I decided to use multiple mirrors to download the packages. aria2 supports downloading a file from multiple sources (and protocols!) at the same time.

So, I decided to generate three download lists using three of my favourite mirrors. I first did:

# pacman -Su --print > mirror1.list

And, after editing pacman's mirror file: /etc/pacman.d/mirrorlist, I generated mirror2.list and mirror3.list in the same fashion.

The problem at hand

Now came the real problem. When using an input file with aria2 (as I was about to), aria2 expects all the sources for a file to be specified on the same line and separated using a <Tab> character.

So, I had three input files containing urls, and they needed to be merged linewise in the above mentioned fashion.

I was trying to get the total number of commits for a repository using the GitHub API. After scouring over the documentation, I was unable to find a way to do that. Searching the web revealed nothing, as well.

Obtaining hashes for the commits

We need the hashes of the first commit and the latest commit to get the total number of commits.

Hash of the first commit

Obtaining the hash of the first (initial) commit is tricky, as I couldn't find a way to do that through the API.

So, to do that you'll either have to visit the web interface of that repository on GitHub or clone that repository and find it through git log. The good thing is that under normal circumstances, the hash is unlikely to change, so you can save it and be done with it.

In our case, the hash of the first commit is:

041f4e99d95c70188f5d564f8af2c203b6a072ca

Note: If you need to get the hash of the first commit regularly, then this post is of no use to you. As you can simply clone the repository everytime, and find the number of commits locally.

An excellent interview with Ubuntu Founder — Mark Shuttleworth, which offers an insight into the motivation behind funding Ubuntu, and his vision for the future.

Vim 7.4 was released. It is the first stable version of Vim to come out in 3 years, after Vim 7.3 was released in 2010.

Privacy:

Lavabit — a popular email service among privacy advocates — was shut down by its founder Ladar Levison, in retaliation to unjust interferance by the USA government.

In case you haven't heard about this already — those who don't have a Facebook profile, might still have one!! This article explains, how Facebook creates shadow profiles of the people who don't have a Facebook account. The *best* part is that you cannot do anything about it...