Ssh

Working around flaky internet connections

Unfortunately not all WiFi connections work perfectly all the time. They’re fraught with unexpected problems including dropping out entirely, abruptly killing connections, and running into connection limits.

Thankfully with a little knowledge it is possible to regain productivity that would otherwise be lost to a flaky internet connection. These techniques are applicable to coffee shops, hotels, and other places with semi-public WiFi.

Always have a backup connection

Depending on a WiFi connections as your sole source of connectivity is a losing proposition. If all you’re doing are optional tasks it can work, although critical tasks demand a backup source should the primary fail.

Mozilla’s “try” repository

We have quite a bit of infrastructure around this including Tinderbox Pushlog (TBPL) and  more. This post deals with the infrastructure and problem we face while trying to scale the ’try’ repository.

A few statistics:

  • The try repository currently has 17943 heads. These heads are never removed.
  • The try repository is about 3.6 GB in size.
  • Due to Mercurial’s on-wire HTTP protocol, this number of heads causes HTTP cloning to fail
  • There are roughly 81000 HTTP requests to try per day
  • To fix problems (mentioned below), the try repository is deleted and re-cloned from mozilla-central every few months

There are a number of problems associated with such a repository. One particularly nasty one has been present through several years of Mercurial development, and has been tricky in that it is seemingly unreproducible. The scenario is something like:

IRSSI Push notifications to GNOME desktop and Android device

IRSSI configuration

Install these scripts into $HOME/.irssi/scripts (and symlink it in $HOME/.irssi/scripts/autorun) to have them autoloaded when IRSSI starts.

Android configuration

Sign up for a notifo account, download the android app, and sign in with it. Make note of the username and API key, as you’ll be configuring irssi to use them.

You’ll be loading the scripts in IRSSI and setting 2 notifo parameters:

/script load screen_away.pl
/script load socketnotify.pl
/script load notifonotify.pl
/set notifo_username $USER_NAME
/set notifo_api_secret $API_KEY

Now receiving highlights while you’re away (detached from the screen) will send them to your android device.