July 11, 2006

64-bit xine-lib fix

amaroK built for x86_64 was randomly crashing on me when playing AAC files through xine-lib. I tracked down the problem to an implicit pointer conversion in xine-lib (moral: always declare your functions), but someone had already found it:

CGI.pm bug

I've tried this on a number of Movable Type 3.2 blogs out there, and it doesn't happen on theirs, but when you pass a badly formed query string to a CGI script, such as the query string in the Select a Design using StyleCatcher link at the bottom of the Templates page, extlib/CGI.pm croaks with the error:

Use of uninitialized value in hash element at /mt/extlib/CGI.pm line 554

pair Networks

Maitreya and I host several domains and Movable Type blogs with a single Advanced Account at pair Networks. pair is a little more expensive than their competitors, like DreamHost, but I like them because they're based in Pittsburgh, don't oversubscribe, never have downtime, and provide easy-to-use configuration tools. They've also never implemented stupid policies like counting your CPU minutes. They've been in business a long time and understand the business of shared hosting.

Here's a trick I use to host several different websites on huangfamily.com without having to pay for additional virtual domains each month. I had to pay one-time vanity domain charges for each site, but I use the magic of mod_rewrite in an .htaccess file to provide the illusion that each site is hosted separately.

craftlog.org and princetonjudo.org are both Movable Type blogs stored in subdirectories of the huangfamily.com document root. Requests for the front pages of each site are rewritten to requests for their subdirectories. oomny.net is Ariel's website hand-coded in WordPad. Requests to Ariel's site are silently prepended with oomny/. I gave her full FTP access to the oomny/ subdirectory and just told her to code as if it were the document root of her server.

iTunes XML to M3U Converter

Specifically, I couldn't get any of them to convert my music collection to M3U for import into amaroK. Either the script didn't work, ran only on a Mac, didn't convert 8-bit filenames correctly, couldn't handle UTF-8 encoded track names, or all of the above. So I wrote my own Python script to do it.

My music resides on an NTFS partition that is obviously not mounted as C:/My Documents/My Music/iTunes/iTunes Music on my Linux partition. The script takes an option for automatically replacing the path to the Music Folder with an alternate path, e.g., /mnt/Music/ or something similar. It takes an iTunes XML file as input and writes the playlists to .m3u files.