99 years out of code: Y2K was so five years ago

plastic water bottle: bottled 1904, use by 1906
As seen on bottled water in a Holiday Inn Express: Produced 1904, Use By 1906. Either some grand conspiracy has kept the Edwardian invention of PET bottles and computerised inkjet printing out of the public eye, or somebody somewhere hasn’t quite got their date printing right.

m4p2mp3 – helper to turn an iTunes protected m4p to an mp3

m4p2mp3 — helper to turn an iTunes protected M4P to an MP3, so I can play music I have bought on my MP3 player. Probably runs best on a Unix-like OS.

You will need Perl, some M4Ps, mono, FairKeys, DeDRMS, faad, and lame. You’ll need to edit the script to say where the DeDRMS.exe file is. You’ll need to have run FairKeys to pick up your account details from Apple’s server.

Does the conversion via WAV, so you’ll definitely lose something. As written, MP3 file sizes are about 15% larger than the M4P. Doesn’t handle invalid MP3 genres gracefully at all; there is the beginnings of a mechanism to do this in the code, though.

This script doesn’t know anything about decryption, and thus contains no code to circumvent DRM.

Just their two cents …

I see that Froogle has started to place value on people’s opinions:

Handspring Treo 180 Review Comments – The Gadgeteer Bulletin Board
$0.02Add to list

“action” value=”AddResearchItem” type=”hidden”>
VoiceStream had told me that they did not have service in Canada, but I found that GSM service is very good everywhere up there, provided by MicroCel.

www.the-gadgeteer.comMore from store  

now that’s what I call an URL!

Yes, there really is a HugeURL.com. Here’s one for this blog:

http://hugeurl.com/?MDRlNjU1YTRjMjZiZGMxOThiMjUxZTM5ODQwMDFiYmUmMTImVm0wd2QyUXlVWGxXYTJoV1YwZG9WVll3Wkc5alJsWjBUVlpPV0Zac2JETlhhMUpUVmpGYWMySkVUbGhoTWsweFZqQmFTMk15U2tWVWJHaG9UVmhDVVZadGVGWmxSbGw1Vkd0c2FsSnRhRzlVVjNOM1pVWmFkR05GZEZSTlZUVkpWbTEwYTFkSFNrZGpTRUpYVFVad1NGUlVSbUZqVmtaMFVteFNUbUY2UlRGV1ZFb3dWakZhV0ZOcmJGSmlSMmhZV1d4b2IwMHhXbGRYYlVaclVsUkdXbGt3WkRSVk1rcElaSHBHVjJFeVVYZFpWRVpyVTBaT2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oYVJXUlZZbXR3YUZWdE1WTmpSbFp4VW10MFYxWnNjRWhXVjNSTFlUQXhSVkpzVGxaU2JFWXpWVVpGT1ZCUlBUMD0=

aarggh! delivery.ca and pizzaville.ca suck monkey bum!!

We like Pizzaville pizzas. We are shy, and can order them online at delivery.ca with no human interaction.

We ordered our favourite pizzas tonight, and waited. And waited. And waited! And waited!! So I call them. After getting hung up on once, they explain that the store we order from is closed, and so we can’t get deliveries. They claim that they called us. We don’t think so.

This is, frankly, crap customer service. We’re going elsewhere. The pizzas from 241 may taste of cardboard, but at least they deliver.

Oh yeah, and delivery.ca seriously endanger your credit card information by sending your data unencrypted to the server. I’d make that illegal, if I could. It’s the dumbest thing ever.

livemp3 – convert those big old audio torrents to something listenable

You’ll need Perl, and Config::IniFiles.

Program: livemp3.

A sample ini file so you can see how to set this up: welch_rawlings_shepherds_bush.ini.

At the moment, this just generates output that you’ll need to feed to sh, but it handles renaming, converting and tagging MP3s to my satisfaction.

Update: it doesn’t handle FLAC tags, even though they’d be a good source of metadata. I may look into implementing that some day.

Blog Torrent – Simplified bittorrent by Downhill Battle

Blog Torrent – Simplified bittorrent by Downhill Battle. It’s supposed to work on any PHP-enabled website.

I don’t understand their #1 feature priority:

Mac version. A high percentage of the best bloggers, video artists, and filmmakers use macs. It is crucial to make a mac version of Blog Torrent.

Those bloody Mac users, with their creative haircuts …

(via Boing Boing)

CF Card Undelete for Linux

I hope you never need this. But this worked for me.

I accidentally deleted a bunch of files from the CF card that was in my card reader. I recovered them all perfectly.

First, before you do anything else, unmount the card’s file system. This will stop any additional changes being made to the card.

You’ll need to know:

  1. the device name of the card’s file system. It could be something as simple as /dev/sda1, or it could be something complex, like /dev/scsi/host1/bus0/target0/lun0/part1 (as it is with me).
  2. the names of the files you accidentally deleted. For example, if you deleted dsc_1017.jpg and dsc_1018.jpg in the dcim/100ncd70 directory, you’ll specify these as /dcim/100ncd70/dsc_1017.jpg and /dcim/100ncd70/dsc_1018.jpg.

First, check that the files can be undeleted:

# fsck.vfat -u /dcim/100ncd70/dsc_1017.jpg -u /dcim/100ncd70/dsc_1018.jpg /dev/scsi/host1/bus0/target0/lun0/part1

If you get the message Warning: did not undelete file ..., that’s a file that has been overwritten, perhaps in your camera. It’s gone; only the name remains. You won’t get it back.

Then, you can actually restore the files:

# fsck.vfat -r -u /dcim/100ncd70/dsc_1017.jpg -u /dcim/100ncd70/dsc_1018.jpg /dev/scsi/host1/bus0/target0/lun0/part1

If all goes well, your files will be back. Makes backups, and don’t do it again.

Ol’ Pointy-Nose Is Back …

Ben Hammersley’s Daily Doonesbury Feed, refactored:

#!/usr/bin/perl -w
use strict;
use integer;
use XML::RSS;

my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) =
  localtime(time);

my $this_year   = 1900 + $year;
my $todays_date = sprintf( "%02d%02d%02d", $this_year % 100, 1 + $mon, $mday );
my $db_url      =
    'http://images.ucomics.com/comics/db/'
  . $this_year . '/db'
  . $todays_date . '.gif';

my $rss = XML::RSS->new();
$rss->channel( title => "Doonesbury" );
$rss->add_item(
    title => 'Doonesbury for '
      . sprintf( "%05d/%02d/%02d", $this_year, 1 + $mon, $mday ),
    link        => $db_url,
    description => '<img src="' . $db_url . '" />'
);

print "Content-type: application/xml+rss\n\n", $rss->as_string;
exit;

An RSS generator for CBC Channels

This isn’t perfect (seems to fail on some feeds), but mostly works for me:


#!/usr/bin/perl -w
# cdf2rss - converts CBC KlipFarm CDF to crude RSS
# created by scruss on 02004/11/12
# RCS/CVS: $Id: cdf2rss,v 1.3 2004/11/13 03:59:21 scruss Exp $
# takes one argument, a stream name. Currently known streams are:
#
# Arts Business Calgary Canada
# Edmonton Montreal Ottawa
# Science Sports Toronto
# Vancouver Winnipeg World
#
# returns a crude RSS 1.0 stream fashioned from the CBC CDF output.
use strict;
use integer;
use XML::Simple;
use XML::RSS;
use LWP::Simple;
use constant CDFURL => 'http://www.cbc.ca/cdf/servlet/getCDF';
my $cdf = get( join( '?lineup=', CDFURL, $ENV{'QUERY_STRING'} ) );
my $xs = new XML::Simple;
my $ref = $xs->XMLin($cdf);
my $rss = new XML::RSS( version => '1.0' );
$rss->channel(
title => join( ' ', 'CBC', $ref->{category} ),
description => join( ' ', 'CBC', $ref->{category} ),
link => $ref->{href}
);
foreach my $cdf_item ( @{ $ref->{item} } ) {
my $tmp_abstract = $cdf_item->{abstract};
$tmp_abstract =~ s/\s+/ /g;
$tmp_abstract =~ s/^ //;
$tmp_abstract =~ s/ $//;
$rss->add_item(
title => $cdf_item->{title},
link => $cdf_item->{href},
description => $tmp_abstract
);
}
print "Content-type: application/xml+rss\n\n", $rss->as_string;
exit;

bad and wrong things about Firefox and Thunderbird

I just installed Firefox and Thunderbird. They have some major suckage points:

  • there’s no site navigation bar
  • typeahead find doesn’t work in “View Source”
  • e-mail file attachments have been moved to the bottom of the message view, eating screen real estate
  • clicking a link in Thunderbird opens a new Firefox window; it should use an existing one

Mind you, what do you expect when they name their products after a crap movie and cheap wine?

thunderbird icon
A logo that looks like a levitating disembodied blue haircut?

Brautiganish

Is Seraphim Proudleduck the new ‘Trout Fishing In America’?

Seraphim Proudleduck is a google challenge created by Salmonbones Marketing worth almost $2,000 in prize money. The seraphim proudleduck champion will be crowned on January 1st 2005. Seraphim Proudleduck does not stop there though, a PR7 website and a year of hosting will be awarded for the top seraphim proudleduck image in google images.

NRG Symphonie SQL

I’ve been using the Symphonie Data Retriever utility for the NRG Symphonie wind dataloggers. I just discovered that the *.NSD site files in C:\NRG\SiteFiles are MS Access databases. This could mean that users could write their own custom data analysis tools outside NRG’s software.

And I though they were just big ol’ binary files, too.