Spamassassin – scoring on DSL lines

Since upgrading to Spamassassin 2.60 yesterday I’ve noticed a (small) increase in false positives. There were only 4 out of 132 spams caught overnight, but almost all were from dsl or dynamic IP addresses. The default score for this test is 2.5, but if you add the following to /etc/mail/spamassassin/local.cf you can change the score:

score RCVD_IN_DYNABLOCK 0 1 0 1

That’ll give it a ‘1’ instead of 2.5 which is probably more reasonable. (Ironically, most of the emails caught were from “Karsten M. Self”, a critic of TMDA, who posts directly from his dial-up machine!)

WordPress and Smarty

I was drafted in to help on WordPress a long time ago. Unfortunately I haven’t done much work on any OSS projects in a while and it was bothering me.
I did do some useful work though – I found out that the Smarty register_resource construct was buggy when using caching. That rules out using MySQL as a backend to hold templates. (I posted a mail to the Smarty list but nothing came of it. *shrug*)
Finally, after re-installing Linux on my new hard drive last weekend I Smartyised WP! Here’s a WIP snapshot.
What does it do? Well, I wrapped some of the Smarty template API (ie. bloginfo(), etc) in Smarty functions of the same names. I’ve only done enough to get the default template working, as it’s laborious work and I wanted to get something out quickly!
The template is split up into 3 parts: top.tpl, post.tpl and end.tpl. They live in users/main/templates/ and can be edited there with a text editor. The online editor from b2++ will make it’s way there eventually probably.

Before trying this, please be sure to backup your WP installation. The files in the tarball don’t conflict with the files in CVS but I can’t guarantee that this won’t delete all your WP install files if you’re not careful!

Download the WP – Smarty mod. (40Kb)

F 16

Wow! Amazing photo of an F16 at an air show in Poland.
At the Chicago Air and Water Show last August I went snap happy but never got anything near as good as this shot. He was lucky the fighter was banking just over his head (see the comments).
I tried in vain to snap 600mph jets as they passed a few hundred feet away but by the time I’d found them in the sky and zoomed back, in the plane was a few miles away..

Photo archiving

Bah! This summer I’ve had 2 drives die on me at home. The first was a drive I used for many years so it was no surprise it died. Unfortunately it died just after I came home from the USA in July. Thankfully I had backups from last November done, and was able to recover the photos from 2003 up to the end of June before the drive died permanently. The second drive was the one I brought back from the States so I’m not surprised it died after a plane journey.
I’ve backed up all my photographs twice now. There’s 2 CDR copies of each backup, just in case.
Now this article from The Register throws some doubt on this strategy. No premium brands were tested but cheaper CDRs become unusable after a few months. I can confirm that this does happen as quite a few CDs I burned in the past are now unusable.
I’d like to look at DVD burners now. It’ll be a lot easier to reburn 2-4 DVDs rather than 12-16 CDs every year. Liam on suggested the Pioneer 106 and I’ll look around, so if you’ve used a DVD burner with Linux I’d like to hear about it in the comments below.

That baseball game

After seeing some of the photos from last weekends games in the newspapers I’ve come to the conclusion it’s bloody difficult to get good shots at a game without a press-pass, and a big lense on a decent camera. That said, here’s my contribution to the sporting history of the Chicago White Sox:

Almost hit it!
almost hit it

When the ball is pitched, it travels of speeds between 80mph and 93mph! Even if they don’t have to run around as much as in other team sports, their reflexes have to be very sharp! They have stamina too. Sitting down, drinking beer, or munching on a sandwich for 2-3 hours is easy. Concentrating and running around is another matter!

Watching the game

White Sox fans will recognise these players. I haven’t a clue who they are, except for Lee, for obvious reasons! Lee went on later, and made a great catch on a high ball.

Did he make it?

See that ball in the air over his head? A low ball, delivered right into the hands of a White Sox player ensured this guy was out!

The End

Css, Printer Friendly Pages & Page Breaks

I’m working on a user list at work, and one requirement is a printer friendly version, listing one user per page. What I’ve done in the past is have the user click on a button to download a .doc file with End Of Page characters embedded in it. Word would oblige by skipping to a new page.
I decided for this application I wanted to go the CSS route to printing.
All the “Printer Friendly Pages with CSS” tutorials were useless when it came to inserting page breaks, but after a bit of searching on Google (mainly because I didn’t use the term ‘page break’) but I eventually came across this thread on devshed.

#break
{
PAGE-BREAK-AFTER: always;
}
…..
<P ID=”break”>some content</P>

This will print a page break after the text some content!
Now I have a really nice web based list of users, and hitting print on the browser produces a neat pile of pages, one user per page.
I also found a bug in Mozilla Firebird! While in “Print Preview” mode, refresh the page using ctrl-r. It’ll bring up the original page but will keep the browser in the preview mode! Yes, I’ll take a look in Bugzilla for it tomorrow. I’m off home now!

C64 people and the good ol' days..

I’m stuck in work late, yet again, and plouging through a long list of things when I get an email titled, ‘remember me?’ from Andrew Fisher. Andrew was a member of the c64 demo group ‘Ozone’ that I formed with Ciaran Langford many a year ago.
I haven’t heard from Andrew in a long time so I took the opportunity to call him and we had a great chat catching up, and reminising about the ‘good ol’ days’ 🙂
Prompted by a visit to his homepage I searched for mention of the demo I worked on for Ozone and found it nestled away in a C64 demo archive. Thanks Andrew for submitting it there!

Sammy Sosa, Baseball & corked bats

At the start of June Sammy Sosa, Chicago Cubs’ star player broke his bat during a game. Cork was discovered inside the bat, lending him an unfair advantage while hitting. I was there with Martina, and although I didn’t realise the full extent and implications of what was happening, I snapped a few photos. It made headline news for about 2 weeks afterwards! You can find more about this via Google.


Referees and inspectors walk off the field. You can clearly see the bat Sammy used, and there’s a slight shadow in the middle. Is that where the cork was?


The bat was inspected at the side of the field. Shortly after they walked off and the game continued.


But not before members of the Cubs and one of their officials had a good talk..


As the game restarted, the Cubs pitched..