Category Archives: Geeky

Technical stuff about Perl, Linux and computing & technology in general.

New song lyrics search site

A whistling badger

I’ve been meaning to whack up a post about this – I launched a new song lyrics search website the other day called LyricsBadger.

It uses my Lyrics::Fetcher Perl module to fetch song lyrics from a variety of sites, and remembers what it’s been asked for before so that it can present lists of artists/songs which it’s already been asked for.

I built it as a testbed for Lyrics::Fetcher and to get some experience with Template Toolkit for Perl (which absolutely rocks!). The entire site is powered by one Perl script and a handful of templates, and uses a ScriptAlias directive to pass all requests to the one script so that it can provide nice clean URLs like /lyrics/Artist/Title.

Why not go and give LyricsBadger a try?

Firefox: disabling auto keyword search and setting up search keywords

This is as much for my own reference as for anyone else, but hey. I use Firefox, and have become accustomed to typing “google whatever” into the address bar to Google for “whatever”. Unfortunately with the fresh install of FF on my new (well, not so new any more) laptop, that stopped working, as Firefox had automatic keyword search enabled, so typing anything in the address bar that wasn’t an address would be turned into a Google search. This meant that “google whatever” would result in a Google search for “google whatever” rather than a search for “whatever”.

The fix: go to the advanced config by typing about:config in the address bar, find the setting keyword.enabled and toggle it to false.

Now, set up bookmarks with keywords – I haven’t time to type that up, so read the recent post on Lifehacker – Fiften Firefox Quick Searches – it’s easy stuff.

Now, things are as they should be. If I want to Google for something, I’ll type “google whatever”. If I want to go to a web address, I’ll type a web address. If I want to look something up in a dictionary I’ll type “dict whatever”. If whatever I type isn’t an address and isn’t one of the keywords I’ve set up, Firefox will tell me that I’m being a muppet – exactly as it should do IMO, rather than just automatically going to Google.

Joining the pool.ntp.org project

If you have your own server, why not consider joining the pool.ntp.org project to help provide accurate time to many client machines?

What is NTP?

NTP, or Network Time Protocol, is a method for computers to obtain the current time accurately in order to keep their clocks correct. Even when set accurately, the clock on most computers will eventually drift until it is no longer accurate – often made worse when the computer is being heavily loaded.

NTP allows a client to ask a time server to tell it the current time. The “main” timeservers have accurate timekeeping equipment connected (GPS receivers are common) to give them the correct time. Other timeservers simply keep in sync with several main servers, and accept requests from client machines.

What is the pool.ntp.org project?

The pool.ntp.org project is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers.

Continue reading Joining the pool.ntp.org project

New NTP server

Been meaning to do this for a while, but I’ve finally set up a new public NTP timeserver.

It’s a stratum-3 server, syncing to several decent stratum-2 servers, and answers to the name of time.preshweb.co.uk.

It’s entered the UK pool.ntp.org DNS pool, and I’m seeing quite a few requests already – currently my stats show 4.2 requests per second.

NTP is a damn useful tool to keep system clocks in sync and I’ve been using it for ages on all my boxen; it’s nice to be able to help out by sharing the load a little.

Read more info about NTP or about the pool.ntp.org project. If you have a server somewhere and are willing to help out, the project needs more pool servers to share the load – read more about joining.

Grr, MySQL and enum types….

I want to stab MySQL between the eyes. Or rather if MySQL had eyes, I’d stab it squarely between them.

It just wasted far too much of my time with this bit of annoying behaviour. I’ll admit it was also my fault, but I still think MySQL reacted in a retarded way. (But then from a “database” system which on its default settings is happy to silently mangle data however it feels, that’s not too surprising).

Continue reading Grr, MySQL and enum types….

Installing PCLinuxOS – what a breeze

I’m setting up a PC for my future father-in-law right now. I’m avoiding installing Windows as I hate dealing with it. I’m happy to help him to get to grips with using the machine and doing whatever he wants with it, but not so happy with having to provide Windows support (after all, I don’t use Windows, so I can hardly call myself an expert at it).

So, I needed a Linux distro that’s clean and simple that he should be able to just get on with. My friend Tony recommended PCLinuxOS as a suitable distro, so I thought I’d give it a spin. It boots as a live CD incredibly easily, auto-detecting everything. Once at a KDE desktop, it’s a usable system already. If you want to actually install to the HDD, just double-click the install icon on the desktop (yes, it has KDE set to require double-click for icons; no doubt useful to save confusing people moving over from Windows, but left me wondering why the hell it wasn’t doing anything). The process is simple, and the ability to sit here with a working system and a copy of Firefox to keep me amused whilst the installation progresses is actually quite cute :)

Continue reading Installing PCLinuxOS – what a breeze

Damn hackers… :(

I got a phone call earlier today from Bytemark, who host a VPS server for me. I’ve had this box with them for a couple of years, and it’s been good.

However, it seems some idiot script-kiddie has used a vulnerability in some webapp to download and run a Perl script named udp.pl to do a UDP DoS against another server (something IRC related).

This had been happening since late Friday evening, and the excess bandwidth charge came to over £80 :( Now I don’t blame Bytemark for charging me really, they’ll be charged for the traffic so they have to pass it on – I blame the bastard who was abusing my server, and myself for (a) not having kept up to date enough, and (b) not noticing quicker (if I’d looked at my mrtg traffic graphs over the weekend I’d have instantly seem that something was amiss).

I’ve not been able to find any evidence as to how the attack came in, but I suspect it may have been WordPress – I hadn’t upgraded from 2.1.2, and apparently there was a remote code exploit in PHPMailer, which WP used, so WP was vulenerable to it. Other possibilities are Dokuwiki (which I’ve updated to latest version) and Gallery, which I’ve deleted.

On the plus side, I’m pretty sure they didn’t get actual access to the box beyond running their flooding script, although I’m still nervous trusting it, so I think I’ll have to move everything off it ASAP anyway.

In the meantime it’s behaving itself. Really not a good day today – slept through my alarm somehow and woke way, way late for work, then have this shite to deal with this evening… bah, hope tomorrow is better!

Lesson learned: make much more effort to stay up to date with all software; keep a much closer eye on the system; install Tripwire or similar; be more vigilant.