Cool those aching fingers

Another advantage of the smcFanControl for cooling your Macbook is the nice breeze that rises from the keyboard as you type. It’ll probably work wonders for those sweaty sessions deep into the night when a deadline is fast approaching!

It cools your Macbook very effectively too, but I wonder what it’ll do to the life of the fan motor if it’s twirling around at 6200rpm all the time?

Cup o' tea and halloween brack

2006-10-13__mg_5500-s.jpg

It’s that time of the year again and one of the highlights is the traditional Halloween brack. If you’ve never had it, it’s a delicious fruit cake, usually with small objects hidden inside.
From the Wikipedia page on Barm Brack:

In the barmbrack were: a pea, a stick, a piece of cloth and a ring. Whovever recieved in their slice the pea, would be unmarried; the stick, would be a fighter; the cloth or rag, would be poor; and the ring, would be wed within the year.

The Halloween Brack is commonly known as “barn brack” but it’s properly called “barm brack”. I think I prefer “barn brack”.

How do you make it? It’s fairly easy, not that I’ve ever made one, but this recipe looks so simple I might be able to make it! A more descriptive recipe isn’t as simple. Hmm. Have you baked one?

Now, I’m off to have another slice! Yum!

I got the ring! I turned to Jacinta and asked her, “Will you marry me?” She took the ring, put it on her finger, looked at me and solemly said, “I’ll think about it!” before bursting out in laughter and eating her own slice of the brack. Ah yes. I love her! 🙂

Mac OS X – how to update /etc/hosts

Way back in the good old days of Linux and Windows it was much easier to update my hosts file. There it was, /etc/hosts or C:\windows\hosts, edit, save and the change becomes active.

MacOS X is a little more complicated. Once you update /etc/hosts you’ll have to update the Netinfo Database. That’s why I’m blogging this so I’ll remember it. This page documents the steps required but the important command is this one:

sudo niload -v -m hosts . < /etc/hosts

There is a GUI but it’s a little clunky and duplicating an existing entry isn’t the most elegant method of adding a new one. Especially when a warning dialog pops up!

Thanks Barry for suggesting a similar fix while I was in SF and getting used to my new laptop! 🙂

Help protect the kids on busy roads

There was a knock at the front door a few minutes ago. That’s not something that happens very often during working hours. At the door was a teenager in school uniform with what looked like a notepad in hand. He was collecting signatures for a petition to have more zebra and pelican crossings built in Tower and Blarney.

The petition was set in motion by the death of Clodagh Murphy in a road accident on September 20th last. She was only 14.

Hopefully we’ll see some positive results from the petition but it’s going to involve education too. There’s a pelican crossing on the main road in Blarney. It’s a very busy road with several junctions leading onto the road in less than a few hundred meters distance. There’s also a bus stop on one side of the road, and a school on the other.

  • I saw a teenager standing ready to run across the road. He was waiting for a break in traffic. He was right next to the pedestrian lights.
  • Every morning over a dozen students pile out of the bus and go to the back of the bus. They too ignore the nearby pedestrian lights and by weight of numbers force the traffic to stop and walk across the road. I’ll have to get a picture of that some morning.

The mind boggles.

Ping Google Too!

Google announced that they will accept pings to their blogsearch service. Hopefully Pingomatic will support it soon so you don’t need to update your “Update Services” in WordPress. I’d say Matt’s sleeping off the jet lag from his trip to Vienna but it’ll probably be there in a few hours!

If you can’t wait, add “http://blogsearch.google.com/ping/RPC2” to the “Update Services” in your WordPress Dashboard under Options->Writing.

Why is this good? By pinging Google you can tell them that you have updated your blog. That will get your post into the Google Blog Search index that much faster.

Update! Matt has already updated Pingomatic. WordPress users can rest easy that their posts will show up quickly on Google Blog Search now!

Ryanair 0wn Aer Lingus

Ryanair are making a bid for Aer Lingus! The former national carrier, Aer Lingus, went public a few days ago. Ryanair snapped up 16% of the company and are now offering “an all cash offer of €2.80 per share.”

I can just imagine the gnashing of teeth of Aer Lingus employees as they contemplate the cuts and cost savings Michael O’Leary would introduce!

Killing off PHP

Do you know why Apache processes get stuck and stop responding when serving pages on a WordPress site?

I’ve seen this happen here and on my previous host on a regular basis. I don’t know what happens. It can’t be a PHP script gone into an infinite loop because the normal Apache timeout should kill it. It’s not MySQL as a quick inspection of the process list usually shows it’s empty.

It could be plugins, some of them haven’t been written to the high standards that is expected in WordPress core. It could be some strange interaction between plugins and core code and memory limits and PHP extensions.

Whatever causes it, this will fix it. It’s brutal, it’s crude, but it’ll stop the load average going up on your box and it will ensure that every Apache child process is listening and responding. Add this to the crontab of your nobody or www-data user. Pick whichever user runs the webserver because you want to limit the damage in case something bad happens and the command malfunctions!
*/10 * * * * ps auxw|grep apache2| awk '$10 !~ /0:00/ {print $2":"$10}'|awk -F ':' '$2 !~ 0 {print $1}'|xargs kill -9 2> /dev/null
What this does is it uses the ps, grep, and awk tools to find processes that are using anything more than the minimum CPU time. It is very crude, but it works.

If you use Litespeed, then replace “apache2” with “lsphp”. I have found that this is very necessary as those processes get stuck quite often, especially in low memory situations.

Where's the evil in top posting?

Where is the evil in top posting when replying to a message on a mailing list? It’s something I’ve never understood, even after reading the many “why top posting is evil” posts and FAQs around the interweb.

Inspired by yet another email complaining about a top post to the GIMP mailing list I briefly searched Google, the source of all information in the world, and found this enlightening page on the evils of top-post complaints.

Regardless, top-posting flame wars are always fun to watch from the sidelines. People on both sides of the arguement will fight for their own side in what is a subjective matter and way of writing. Flame away!