• A simple keyboard remapper for Windows that uses the registry. I think this'll be handy for some issues running XP with parallels. [via Nelson]
    filed under: productivity, software
  • Why people hate domain registrars: "Domain name servers were not responsible for lost domain names if holders did not re-register in time, Xinhua quoted a center insider as saying, since the loss was an 'act of God.'"
    filed under: internet, ethics
  • Fantastic article about aggregating current emotion research. "Most neuroscientists now recognise six basic emotions: anger, disgust, fear, joy, sadness and surprise." (subscription req'd unfortunately)
    filed under: psychology, science

Command Line Zip for Windows

Windows doesn't have a command line utility for compressing files (that I know of), and I had to come up with a way to automate some file transfers today. So I whipped up a tiny Perl script that will zip up a file. I figure someone else might need it. (Or someone might know how to do this in one line.) You'll need the Archive::Zip module, and the following code—which is pretty much right out of the documentation:
# Grab the incoming file
my $argv = join(' ', @ARGV) or die "Usage: zipme.pl [file location]\n";

# Grab the file name
my($dir, $file) = $argv =~ m/(.*\\)(.*)$/;

# Create a Zip file
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $zip = Archive::Zip->new();

# Add the file
my $file_member = $zip->addFile($argv, $file);

# Save the Zip file
unless ( $zip->writeToFileNamed($argv.'.zip') == AZ_OK ) {
    die 'couldn\'t zip';
}
Save this code as zipme.pl, and you'll be set. Pass in a filename, and you'll get a compressed file of the same name plus the .zip extension. So:

C:\>perl zipme.pl C:\path\to\giant.file

will give you C:\path\to\giant.file.zip. It works well with Windows batch files, and will save me a bunch of bandwidth.
  • Remap your Home and End keys on a Mac so they operate on the current line rather than the current document. This has been bugging me forever!
    filed under: mac, software, hacks

My Year in Cities, 2006

Kottke did it, and here I go. 2006 was an interesting year for me because it was the first time I traveled outside of North America. International travel gave me a new perspective on the US that's hard to describe. I came back both loving it more, and wanting it to be more. (But that's a topic for another post.) Anyway, here's my list of cities I visited in 2006:

Corvallis, OR (Home)
Nelson, New Zealand
Kaikoura, New Zealand
Christchurch, New Zealand
Queenstown, New Zealand
Te Anau, New Zealand
San Diego, CA
New York City, NY
New Paltz, NY
Bend, OR *
Newport, OR *
Portland, OR *
Lincoln, NE
San Francisco, CA
Sebastopol, CA

As the rules state: one or more nights spent in each place. Those cities marked with an * were visited multiple times on non-consecutive days.

I don't have any international travel planned for the foreseeable future, but I'd like to make it back to New Zealand someday.
  • Cleans up your Mac desktop (or any folder) based on rules you write. Handy! [via 43 Folders]
    filed under: mac, productivity, software
  • Leonard Richardson and Sam Ruby are writing a book about designing REST web services.
    filed under: webservices, books, programming
« Older posts  /  Newer posts »