I'm Marnanel, and this is my blog. Well, sort of. It isn't timely like a blog, and I don't expect you to subscribe to the feed (though I won't complain if you do). Rather, treat it as a quick trot around my mind, a chat over a pint in the pub, assuming you'd be caught dead talking about software in the pub. You should start here.

Thursday, June 07, 2007

Unknown or incorrect time zone: 'UTC'

If mysql says: Unknown or incorrect time zone: 'UTC' then it doesn't know the timezone database. You can test this by typing mysql> SET time_zone='UTC'; which will succeed only if it knows the timezone UTC (which it should).

The command to fix it is
$ mysql_tzinfo_to_sql /usr/share/zoneinfo/|mysql -u root mysql -p

(leave off the -p if your root account doesn't have a password, in case you are insane)

Tuesday, June 05, 2007

and we're back to talking about software again

This post has moved to marnanel.org; please click the title above to go there.

Sunday, June 03, 2007

wget for protected files

wget is a hugely useful program. You give it a URL and it goes and fetches it and saves it to disk. There's a ton of other options (spider a whole site, pretend to be a different browser, fetch all the URLs in a list in a file, delay fetches a certain or random number of seconds, etc) but that's the basic idea.

Anyway, I just needed to retrieve a file which was protected. It was a phone post on a friend's LiveJournal, which was friends-locked-- so, if you simply attempt to wget the URL you get a "forbidden" error, because it doesn't know who you are. Assuming you use Firefox, and you're logged into LJ, this is how to tell it:

wget --load-cookies ~/.mozilla/firefox/some-weird-string.default/cookies.txt http://username.livejournal.com/data/phonepost/xyz.ogg

some-weird-string will be different for everyone, but always the same for you. ls ~/.mozilla/firefox to find out what it is.

I was amused that this resulted in a redirection to a URL ending ...Thanks+for+ signing+in+ /+LiveJournal+loves+you +a+lot+/ +Here+have+a+cookie.

Saturday, June 02, 2007

Don't blink or you'll miss it

This post has moved to marnanel.org; please click the title to go there.