Latest posts

Smart mailboxes in Mail - June 14th, 2008

Today I discovered an amazingly useful feature in Mail (for Mac). You can create so called “smart” mailboxes, based on any or all of several criteria including the from address, subject and message body.

The immediate use which occurred to me for this is to keep a handle on how many of those infuriating FaceBook notifications I receive. By creating a smart mailbox for all such messages, I can easily clean out my inbox of all outdated junk.

Epson AL-C1100 efficiency - April 2nd, 2008

Today we discovered that Epson’s wonderfully affordable colour LaserJet printer (the AL-C1100, networked) isn’t actually as efficient as they claim.

Epson are quick to promote the number of pages per cartridge this bessy can do (which I agree, is very good for a colour laser) but they somehow forgot to mention the Photoconductor unit, which costs £150 to replace, only lasts 15,000 pages. That’s another 1p per page, or 2p per double sided.

Ouchies.

So before you go buying one of these printers, when you’re calculating the cost per page, don’t forget to add 1p to your total, for that stupid photoconductor unit.

gpart - February 16th, 2008

So we’ve all done it at some point. Bye bye beautiful partition table. Bye bye 20 user’s worth of mail. Bye bye rest of my weekend doing anything enjoyable.

I just had to blog this, I was that impressed! gpart scans your hard drive for likely partitions, and offers to write the guessed MBR back to the HD. For me it worked first time without any hackery. To say I’m relieved would be a massive understatement!

So if you’ve just lost a partition, give gpart a go. Remember, always make a backup of the HD before doing it (dd if=/dev/xx of=/somewheresafe), and always have a backup system in place for lost data. The most I would have lost would have been emails received since 3.00am this morning.

Web standards - December 24th, 2007

I’ve just been having a long old tinker with plfc.org.uk, and I read on (slashdot iirc) about the upcoming HTML and XHTML releases, and the different directions they’re aiming.

For once I feel that the Internet might be becoming slightly structured!  I’m in preference of XHTML, it’s well structured, it’s unambiguous (assuming people actually validate it, but then there’s absolutely no point in using a language if you’ve not used the correct syntax, nobody releases source code with 20 compile errors in it on the basis that “well, some compiler out there will be able to guess what I meant”), and it’s extensible.

That was it really.  I just thought I’d proclaim my adoration of XML :)

Blogged with Flock

Daemon permissions and posix_setgid() - September 12th, 2007

posix_setgid only sets the primary group for the process.  So make sure the group permissions you’re relying is a single group, who’s GID is set in /etc/passwd.

Took me over an hour to trace that bug down today.

Going beyond Google labs - September 2nd, 2007

Seems Google is indexing yet more information from the net, now you can search for movie times. Woo!

IE7 glitches galore - August 22nd, 2007

For anyone who claims that IE7 is “the best browser there is” (Davey…), this might just put it in a different light.

Goto http://www.plfc.org.uk/ and look at the first link on the page, “FIEC”. Notice (in IE7) that there’s a little gap after it, like there’s a . Well, look at it in FireFox, Opera, Konqueror or Safari and you’ll see a (correctly rendered) image indicating an external link (as used on Wikipedia). Now look (in IE7) on the Missionary Support page and you’ll see what it should look like on the home page. The CSS is completely valid (I set a padding-right and a background-image, it’s the same CSS behind both pages), yet IE7 insists on not displaying the image on the home page. Why? Because it’s full of bugs. Is FireFox? Yes. But they get fixed quickly and regularly. IE7? Every webmaster has to just hack their way around them.

Go, go now and download FireFox.

Update: I just had a look on IE5, and the links render completely wrong. However the home page one does work. Interesting. I then had a look at wikipedia to see how they get around these problems, and I noticed that in IE5 the links don’t render the external icon at all. A quick baz at the source, and I notice they have a bunch of IF statements in the HTML, each one referring various IE versions to alternative CSS “fixes”. Seems a good idea, so I’ll ditto it.

If you’re too lazy to go find the HTML yourself, wikipedia uses this:

 <!--[if lt IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE50Fixes.css?90";</style><![endif]-->
 <!--[if IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE55Fixes.css?90";</style><![endif]-->
 <!--[if IE 6]><style type="text/css">@import "/skins-1.5/monobook/IE60Fixes.css?90";</style><![endif]-->
 <!--[if IE 7]><style type="text/css">@import "/skins-1.5/monobook/IE70Fixes.css?90";</style><![endif]-->
 <!--[if lt IE 7]><script type="text/javascript" src="/skins-1.5/common/IEFixes.js?90"></script>
 <meta http-equiv="imagetoolbar" content="no" /><![endif]-->

Bugfixes and coding - August 21st, 2007

I’ve spent the last couple of days bugfixing some code I wrote for the church website and writing some new code for various things. Had a superb headache while chasing one extremely weird bug just now, the piece of code below was never giving me more than 1 line of printout (which is weird, as mysql_num_rows() gave 33, not 1).

while ($row = mysql_fetch_array ($result));
{
print “nothing”;
print_r ($row);
}

Know what it was? My eyes hurt so much I missed it every time I prodded (over 35 minutes prodding!), that little innocent looking semi-colon on the end of the while() statement. Remove that, and everything works.

Don’t get caught out by this like I did :-)

The updates - August 13th, 2007

So I promised some updates… well here goes. I’ve been spending the last couple of weeks working through a rather (and increasingly) large list of “to-dos” down the church, everything from replacing maintained light strips to cleaning the windows, and not forgetting producing hard backups of all the server filesystems. It’s good fun to do, (well I’m doing it voluntarily so duh!), satisfying to say the least, but those no-brainer moments really do hurt the head.

I’ve also got a side project on at the moment; dad pointed out a few weeks back that the church’s new website has no hit counter. Now personally I thought hit counters were a bit 1990-ish, but then I am just one. I gave it some lengthy thought and decided that a hit counter is a nice idea, if rather than just being abstractly placed at the footer of each page (and while doing so displaying absolutely nothing useful*) we could have a “stats” page which shows some pretty graphs of how much “load” the website has been under during the past 24 hours. Enter RRDTool!

So far I’ve not had too much success, mostly because I’ve only been working on it for a few minutes at a time and partly because I have absolutely no interest in reading the manuals (I am a bloke after all). This week I’ll have to sit down and have a good read into it, and then try to knock up some scripts to feed it some data, rather than the other way around.

The thought process continued, and I started thinking about other “interesting” statistics that I could display. Some of them that came to mind in particular were:

  • Bandwidth usage
  • System temperature
  • CPU utilization
  • Mail server load
  • Heating graph (remember hedwig controls the church heating)
  • MySQL load

Well the list could go on and on, but I’ll cut it short there. Hypothetically these shouldn’t be too hard to implement, MRTG already does a good job of several, and some hacky perl scripts to filter out the number of hits in Apache, Squid and Courier’s log files should do three others. MySQL and the heating program will need a bit more thinking about however.

Once again I’ve gone off onto some geeky ramble, so I’ll leave you with some totally non-techy stuff to smile over. We’ve pretty much finished the conservatory off at home, Michael, Janice, Miriam and Daniel set off toward Brazil once more this morning (I’ve been up since 3.20am…), Suzanne’s Micra is so getting go-faster-stripes and the flat I’m (DV) moving into this upcoming academic year has just gotten a new bath, fridge and oven; with a ceramic top! (the oven that is). Seems like I might be getting the same luxury apartment as before ;-)

Covie Camp - July 27th, 2007

Been an interesting one this year… I’ll blog more later ;-)

Lets just say 60+mph winds are not fun when camping.