TextMate command for paste.e-scribe.com

After seeing a similar offering from the Web 2.0 pastebin Attachr I couldn’t resist. So here’s a simple TextMate command that submits selected text to paste.e-scribe.com, opening the new URL in your default web browser. Bonus features: the filename is used as the title, and the language syntax is guessed from the file extension.

This is a very crude little script, but too much fun not to share. Download paste.tmCommand.zip and double-click the resulting .tmCommand file, that should be all there is to it.

New MacBook Pro

If you just bought a MacBook Pro (especially the 15"), this will hurt a little: the new ones out today (same prices) all have FW800 in addition to FW400, up to 200GB drives, up to 3GB RAM, and a 6x dual-layer SuperDrive. Oh, and that Intel Core 2 Duo thing.

Pastebin update: Pygments

This past spring I posted about a simple pastebin app I wrote using Django. This week I updated it to use the excellent Pygments syntax-coloring library (formerly known as Pykleur).

Pygments has support for a healthy number of languages/syntaxes, offers a great deal of flexibility, ships with several different color schemes, and can produce output in HTML/CSS, LaTEX, or ANSI terminal colors. I created a “pcat” alias to take advantage of that last one when working in the shell.

Python MySQL junk pointer not making sense

(There’s got to be a name for blog posts that you make just so you’ll be able to remember something later – or so somebody who is banging their head against a problem you just solved can find your solution via Google magic. This is one of those posts.)

A while back I started getting bizarre errors when using Python with MySQL. They looked like this:

python in free(): warning: junk pointer, too high to make sense

It didn’t make sense to me either! Tech support for my VPS and copious Google searching didn’t turn up anything I could use.

Songbird almost-0.2

I posted about Songbird when it was released back in February, but to be honest I’d sort of forgotten about it since then. A discussion of it popped on the Well today and I downloaded 0.2rc3 to take another look.

Lots of progress has been made. It imported my iTunes library (it takes just the metadata, not the audio) and it works well. It’s really a CPU hog, though. On my 1.67GHz PowerBook, xulrunner is taking 10-15% CPU when it’s silent, 25-40% when playing.