• Google Reader, so pretty...

    Today being RSS feed backlog-clearing day, I came across Jon Hicks' Google Reader Theme, installed the Stylish extension for Firefox, added his user style for Google Reader to Stylish, and have been wow-ed ever since. Here's a rough idea how it looks (click the thumbnail for a bigger picture):

    Google Reader with Jon Hicks' theme


    If you're a Google Reader user like me, you'd probably like Jon's theme. I don't have to say that it does look very much better than the original Google Reader theme (oops, I said it). Amazing what a talented designer can do with user style sheets.

  • Axel - lightweight command line download accelerator

    I never really fancied download accelerators but Axel is different - it's a command line application and is naturally significantly more lightweight then those graphical download managers I've stopped using since 1996 (teh intraweb was slower then, and I was sucking bits of it through a state of the art 33.6kbps dial-up modem).

    I've been using wget for its auto-resume support, but have switched to using Axel since one of my colleagues at Bezurk introduced me to it. If you're a wget or curl fan, Axel is almost a drop-in replacement (although it doesn't handle multiple redirects or broken connections too well).

    Install it:

    
    # On a Mac, with Darwin Ports.
    sudo port install axel
    
    # On Ubuntu.
    sudo apt-get install axel
    

    Windows users would require cygwin to get Axel to work for them (what, a Windows user and you don't have cygwin installed already?).

    Now go download some files. If you need a good place just to test the speeds, go to YUI Theater and download some videos (watch them too, most of them are pretty good, like Douglas Crockford's and the Firebug videos). Run it on the command line by typing:

    axel -n 10 http://example.com/some_file.mov

    The -n 10 option tells Axel to use a maximum of 10 simultaneous connections when downloading the file. Another useful option is -a, which outputs a wget-like report of download progress in a few lines rather than filling up your screen with download progress messages.

    Check out the speeds I managed to get:

    Check out the 1MB+/s download speed with Axel


    250MB in 3 minutes, with an average download speed of 1339KB/s. That's pretty damn fast. Comparatively, I could only get speeds of around 40KB/s using Firefox. It's hard not to love this raw speed and I think you might too.

    Oh, and to go off-topic here, it's nice to know we are steadily chipping away at the Windows user base in Bezurk. The colleague who introduced me to Axel recently switched to Ubuntu (he's been waiting for Ubuntu 7.04). It was painful to set it up correctly (the KDE part of Kubuntu, not Ubuntu itself), but I think he's much happier working on Linux for some inexplicable reason.

  • Thunderbird 2.0 and Gmail integration

    I haven't been following Thunderbird development like I used to so I was presently surprised to see how far Thunderbird has come when I tried a beta of Thunderbird 2 a while back (of course, Thunderbird 2 has been released for over a week, but I'm still clearing a backlog of blog drafts).

    One of the things I noticed was how Gmail POP integration is baked right in when creating a new accounts:

    Thunderbird - Gmail mailbox creation step 1


    Step 2: tell Thunderbird your Gmail ID.

    Thunderbird - Gmail mailbox creation step 2


    Step 3: there isn't really a step 3, just confirm your Gmail settings.

    Thunderbird - Gmail mailbox creation step 3


    How's that for time-saving? Gone are the days of looking for POP client configuration documentation on Gmail. My only gripe is that there isn't a similar wizard interface for Gmail for your domain.

    Oh and there're tons of other nice features in Thunderbird
    2
    : Advanced Folder Views lets you configure "Favorite Folders" and has a view for unread folders as well, tags (a la Gmail labels or GTD organization) and of course, a well-tuned Saved Searches feature (which has been there since version 0.9).

    I'm back to using Thunderbird again after a brief fling with Apple Mail, for no particular reason actually. Well, actually, I did reinstall Mac OS X Tiger (it got really crappy in terms of performance - must be the tons of software I was installing) and found it much less work to get a satisfactorily working email client with Thunderbird than with Apple Mail.

  • If you're having problems with script/console on edge Rails...

    If you're on edge Rails and are having problems starting script/console, it may be caused by spaces in your Rails working directory (see ticket 7955: Console environment load broken when RAILS_ROOT contains spaces). Basically the lack of quoting on RAILS_ROOT causes console.rb to pass incorrect paths to IRB (it gets split on the spaces in your directory path).

    Just in case anyone runs into this problem and doesn't want to start debugging the problem like I did. Changeset 6512 fixes things. If you do update Rails to revision 6512 (or higher) though, be aware of changest 6507. Ahh the joys of living on the edge.

    
    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /Data/Working (LoadError)
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
            from /opt/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
            from /opt/local/lib/ruby/1.8/irb/init.rb:250:in `each'
            from /opt/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
            from /opt/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
            from /opt/local/lib/ruby/1.8/irb.rb:54:in `start'
            from /opt/local/bin/irb:13
  • Get your Rails tests results via Growl notifications

    I've been using Autotest (part of the ZenTest package) while testing my Rails applications and never thought of asking for more. After all, getting my tests (well, specs actually) run automatically whenever I make a relevant change and having diff-level granularity on which tests Autotest re-runs is pretty damn useful enough. That is, until I came across this RSpec and Autotest with Growl notifications blog entry (on JavaBlogs, no less!)

    How're these for red/green test results?

    Tests (specs) passing!

    Growl notification of tests passing


    Tests (specs) failing :(

    Growl notification of tests failing :(


    Much better! Now I don't have to glance at my terminal window (I recently realized how painful it is while coding with a single monitor) and get unobtrusive notifications.

    Unfortunately, this is Mac-only (or wherever Growl is supported). I had to follow links to several blog entries to get it setup nicely (see Growl + Autotest Rails with Zentest 3.4.0 and Green goodness with autotest + growl - those are my references).

    Basically you need Growl installed, and the growlnotify tool in your path. growlnotify can be found in the Extras/growlnotify directory in the Growl dmg (for example, after you've mounted the Growl-0.x.x.dmg, you can find it here: /Volumes/Growl/Extras/growlnotify). Just copy the growlnotify executable into your path (I copied it into /opt/local/bin since I'm using Darwin Ports and don't have a /usr/local/bin directory). Verify it's running by entering:

    growlnotify -m "Testing growlnotify" Boo Ya!

    into a terminal window. You should see a Growl notification.

    Now, you need to create an Autotest hook by creating an autotest init file in your home directory named .autotest, and copy this chunk of text in:

    
    module Autotest::Growl
      def self.growl title, msg, img, pri=0, sticky="" 
        system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}" 
      end
    
      Autotest.add_hook :ran_command do |at|
        output = at.results.last.slice(/(\d+)\s.*specifications?,\s(\d+)\s.*failures?/)
        if output =~ /[1-9]\sfailures?/
          growl "Test Results", "#{output}", "/Data/Pictures/Icons/rails_fail.png", 2, "-s" 
        else
          growl "Test Results", "#{output}", "/Data/Pictures/Icons/rails_ok.png" 
        end
      end
    end

    Replace the paths to the pass/fail icons (as you can see, mine are in /Data/Pictures/Icons/) with the correct paths to any images you want to display (grab them from Green goodness with autotest + growl or roll your own). You can change the parameters passed to growlnotify however you want (use growlnotify -h to see what parameters it acccepts). The pri parameter sets the priority level of the message (test failures come up with a priority of 2, hence the red background of the Growl notification). Passing -s to sticky tells Growl to keep the notification sticky. If you're running your (auto)tests on a remote server (e.g. in a Continuous Integration system), you can even use growlnotify to send remote notifications (see the -H switch) to your development workstations!

    Lovely! I love you, MacBook Pro serial no. W86280NAVWW (despite your broken DVD drive and you randomly freezing up on me when you get too hot).

subscribe via RSS