Archived Posts

Displaying posts 41 - 50 of 649

Larch 1.0.1 released

Sunday May 10, 2009 @ 04:29 PM (PDT)

Larch 1.0.1 has been released. Notable changes in this release include the following:

  • Ruby 1.9.1 support.
  • Much more robust handling of unexpected server disconnects and dropped connections.
  • Added --all option to copy all folders recursively.
  • Added --all-subscribed option to copy all subscribed folders recursively.
  • Added --dry-run option to simulate changes without actually making them.
  • Added --exclude and --exclude-file options to specify folders that should not be copied.
  • Added --ssl-certs option to specify a bundle of trusted SSL certificates.
  • Added --ssl-verify option to verify server SSL certificates.
  • Added a new “insane” logging level, which will output all IMAP commands and responses to STDERR.
  • Fixed excessive post-scan processing times for very large mailboxes.
  • Fixed potential scan problems with very large mailboxes on certain servers.
  • POSIX signals are no longer trapped on platforms that aren’t likely to support them.

To install Larch via RubyGems, run:

sudo gem install larch

Visit Larch’s GitHub page for usage information and other documentation. If you have questions or need help with something, please use the Larch mailing list.

A decade of wonko.com

Sunday April 12, 2009 @ 12:03 AM (PDT)

I’ve been so busy lately that this slipped my mind: April 1st was wonko.com’s 10th birthday. Here’s some useless trivia to celebrate the occasion:

  • The domain name wasn’t my idea. It was a birthday present from Mom on my 16th birthday.
  • WonkoSlice, which was born sometime around April 1st, was a clone of Slashdot (which was big back then) that I built as an excuse to learn ASP.
  • WonkoSlice was originally hosted on my desktop PC running Windows 98 and Microsoft Personal Web Server, a toy version of IIS that was limited to 10 simultaneous connections. Traffic quickly became too much for PWS to handle, so within a few months I upgraded to a beta version of Windows 2000 Server.
  • Before the site was moved to a dedicated machine, I would often take it down for an hour or two so I could boot Windows 98 to play Quake or Half-Life. Nobody ever complained.
  • During the height of the dot-com bubble, a few advertising and blog network startups made attempts to “purchase” WonkoSlice in return for phantom stock. None of them exist anymore.
  • wonko.com became my personal blog on February 11, 2003, with this post.

If you’re really interested, I posted a more detailed account of wonko.com’s early history back in 2006.

On second thought...

Wednesday April 01, 2009 @ 03:47 PM (PDT)

It has been brought to my attention that the ferocious Australian Dropbear (a type of carnivorous koala known for dropping out of trees onto their prey) is particularly fond of pale, balding web developers.

In light of this new information, Felicity and I have decided to call off our move.

Switching Portlands

Wednesday April 01, 2009 @ 11:40 AM (PDT)

Last October, Felicity and I moved back to Portland, Oregon, our home of many years. We had been longing for the Pacific Northwest’s cold winter air and constant drizzly greyness since moving to California, and it felt wonderful to be home again.

Over the long winter, though, our joy gradually diminished. We were snowed in for much of December, and the permanent overcast and unavoidable moistening upon venturing outdoors have really been getting us down. At times, we’ve wondered if we would ever see the sun again, or experience the glorious feeling of our skin gently baking in a dry heat.

That’s why, after a lot of careful planning and consideration, we’ve decided to move to Portland, New South Wales. We’ll swap drizzle for sunshine and America for Australia, but without having to leave Portland behind. And, as a bonus, we’ll be just a few hours drive from our dear friends Loren and Caitlin.

I’ll continue working for Yahoo! remotely just as before, but now I’ll be one day ahead due to the time difference, which means I’ll hear the latest Microsoft takeover rumors a day before everyone else.

Larch mailing list

Thursday March 26, 2009 @ 05:53 PM (PDT)

I’ve created a mailing list for questions, comments, and discussion about Larch.

HTPC bliss with a Mac Mini and Plex

Thursday March 19, 2009 @ 10:55 PM (PDT)

I bought a Mac Mini last week to use as an HTPC running Plex (replacing a noisy old PC laptop running MediaPortal), and I couldn’t be happier with it. I’ve cobbled together quite a few HTPCs over the years, and they generally left much to be desired. The Mini blows them all out of the water for a pretty reasonable price.

What I bought

I went for the smallest hard drive in the Mini since I stream my video from a Drobo. If you don’t plan to use an external drive or a NAS, I’d recommend getting a bigger drive.

What I already had lying around

Putting it all together

  1. Plug the Mini into the wall and the HDMI and TOSLINK cables into the Mini (via the aforementioned adapters). Plug the other ends into your receiver or TV.
  2. Boot up OS X. You’ll want a keyboard and mouse for this part, and possibly a monitor if OS X doesn’t automatically figure out a good resolution to use for your TV.
  3. Configure the display settings to match your TV’s native resolution. Check your TV’s manual for this number or, if you can’t find it, go for a standard HDTV resolution like 1280×720 (720p) or 1920×1080 (1080i/p). If OS X doesn’t list your TV’s native resolution (my Vizio LCD’s is 1366×768), you may need to use SwitchResX to get it working, but it’s not hard.
  4. Install and configure Plex.

You may have noticed that I haven’t mentioned anything about a TV tuner. That’s because there’s really not much point to having one these days. I download all my TV off the Internets. It’s so much more convenient.

If, like me, you want to stream HD video over an 802.11n network, I strongly recommend setting Plex’s Local Network Video Cache to 16MB. There’ll be a few seconds of buffering when you start a video, but it’ll save you from annoying pauses and dropouts if the signal quality fluctuates while you’re watching something.

If you want to stream HD video over anything less than 802.11n, you’re probably going to be disappointed.

Once you’ve got Plex installed, be sure to check out the Plex App Store, where you’ll find apps that seamlessly integrate Hulu, YouTube, and other awesome content into Plex. There’s even an app that will stream recorded content directly from a TiVo if you have one. Despite the name, all the apps in the App Store are free, just like Plex itself.

I’ve already watched a ridiculous number of hours of video on this thing, and I couldn’t be more pleased with it. If you’ve been looking for an awesome, relatively inexpensive, easy to set up HTPC, I highly recommend the Mac Mini and Plex.

I’ve just released Larch, a Ruby application that syncs messages from one IMAP server to another quickly and safely. It’s smart enough not to copy messages that already exist on the destination and robust enough to deal with ornery or misbehaving servers.

A couple years ago I posted a quick and dirty script that did this. Larch is a much more mature tool that does essentially the same thing (only faster and more reliably).

Larch is particularly well-suited for copying email to, from, or between Gmail accounts. During its development, I used it to sync over 25,000 messages from a Dovecot IMAP server to Gmail.

To install Larch via RubyGems, run:

sudo gem install larch

Visit Larch’s GitHub page for usage information and other documentation.

Update: Larch now has a mailing list where you can post questions and comments and find answers to questions that have already been answered.

Pretty JSLint output for TextMate

Thursday March 05, 2009 @ 03:48 PM (PST)

My coworker Stoyan Stefanov wrote a helpful blog post a few weeks ago describing how to create a simple TextMate bundle that allows you to quickly run the current file through JSLint. I’ve extended Stoyan’s bundle command to prettify the JSLint output for display in an HTML window.

Here’s what the ouput looks like (click for full size):

Screenshot of TextMate JSLint bundle output

To use this command, just follow the instructions in Stoyan’s blog post using the script below in place of his bundle command, then select “Show as HTML” from the Output dropdown below the command edit box.

#!/usr/bin/env ruby
require 'cgi'

lint = `java org.mozilla.javascript.tools.shell.Main ~/Library/JSLint/jslint.js "$TM_FILEPATH"`

lint.gsub!(/^(Lint at line )(\d+)(.+?:)(.+?)\n(?:(.+?)\n\n)?/m) do
  "<p><strong>#{CGI.escapeHTML($1)}<a href=\"txmt://open?url=file://TM_FILEPATH&line=#{CGI.escapeHTML($2)}\">#{CGI.escapeHTML($2)}</a>#{CGI.escapeHTML($3)}</strong>#{CGI.escapeHTML($4)}" <<
    ($5 ? "<pre>#{CGI.escapeHTML($5)}</pre>" : '')
end

lint.gsub!(/^(jslint:)(.+?)$/, '<p><strong>\1</strong>\2</p>')
lint.gsub!(/TM_FILEPATH/, ENV['TM_FILEPATH']) 

print <<HTML
<!doctype>
<html>
<head>
  <style type="text/css">
    p { margin-bottom: 0; }
    pre {
      background: #f5f5f5;
      border: 1px solid #cfcfcf;
      font-size: 12px;
      margin-top: 2px;
      padding: 2px 4px;
    }
  </style>
</head>
<body>
  #{lint}
</body>
</html>
HTML

Update (2009-05-07): Added line number linkage courtesy of Steve Spencer.

Sanitize 1.0.6 released

Monday February 23, 2009 @ 10:14 PM (PST)

Sanitize 1.0.6 is now available. This release brings minor bug fixes and a new feature: you can now specify the symbol :all in place of an element name in the attributes config hash to allow certain attributes on all elements. This is useful if you want to allow all elements to have a class attribute, for example. Thanks to Mutwin Kraus for the patch.

To install or upgrade Sanitize via RubyGems, run:

gem install sanitize

It's never easy

Thursday February 19, 2009 @ 08:30 PM (PST)

Non-developers (or developers unfamiliar with the details of a particular feature) sometimes say that a seemingly straightforward change “should be easy to implement” without knowing whereof they speak.

Usually what they mean is that in the perfect world that exists in their imagination it should be easy. Sadly, this is an imperfect world full of shitty code, and even when the code’s not shitty it may not always be possible to accommodate new requirements without refactoring.

Never tell a developer something should be easy to implement unless:

  1. The universe is perfect, or
  2. You plan to implement it yourself

This blogget was inspired by my hellish week and a coincidental tweet by @AptanaLoriHC.

Copyright © 2002-2012 Ryan Grove. All rights reserved.
Powered by Thoth.