derwiki

Jan 22 2010

Completion audio alerts for long running, remote jobs

I do most of my development remotely, and sometimes I have long running commands (creating a branch, running make, long running DB query, etc). Usually, this is when I check email, Hacker News, or some other bright and shiny thing. The command almost certainly finishes before I finish my distraction, and as a result I waste a lot of time. The solution: an audio alert!

  1. Make sure your laptop has an ssh server running on it
  2. From your dev box, ssh-copy-id user@mylaptop (or if you don’t have ssh-copy-id, read this tutorial for passwordless ssh)
  3. Create an alias or a script in your path (I called mine beep and chmod +x’ed):
    ssh user@mylaptop ‘say “Command finished”’
  4. When executing a long running process from the command line, add your command:
    make && make install ; beep

When your command finishes (normally or with errors), the dev box will open an ssh connection to your laptop long enough to do one thing: run the ‘say’ command (standard on OS X, apt-get install epos on Ubuntu) and let you know “get back to work, slacker!” You can still have your sword fights, but now you’ll know when to finish them.

Note: this will work just as well if you do your development locally, you just don’t have to do the ssh part

Comments (View)
blog comments powered by Disqus