I ran across a peculiarity with google mail’s spam checking today. I’m running a bay area firewood delivery site for a buddy of mine, and it has, among other awesome features, an order form containing a few ‘phone’ strings. When the order form is submitted, an email is sent out to a private email list which is ran using google site’s email app.

I made a few changes to the email script, tested them in the dev environment, pushed the changes to production, then made one final test in the production environment… and holy snikes it doesn’t work! I don’t get an email at my google email list when I submit the order form. What?? It just worked 10 seconds ago on my dev site!

  1. Revert the production code.
  2. Recreate problem in my dev environment.
  3. Track down source of problem.

Long story short, it turns out if I send an email to an email list handled by the google sites email app, and if it contains the string ‘555 555 5555′ then it doesn’t go through. Or at least it gets delayed by 1 hour+. I haven’t seen any of them yet.

Change that ‘555 555 5555′ ever so slightly – say to ‘555 555 5554′ and it goes through in seconds.  Who would a thunk it.

I guess spam often has ‘555 555 5555′ in it? Moral of the story is a) to not get that phone number and b) don’t use common strings like that in your testing. (email@email.com?)  It can introduce unexpected variables.

I’ve got to do a presentation for a class tomorrow. I’m busting out a few slides using Open Office Impress, which is working ok. It can save as PPT so hopefully nobody on the other slide of the presentation will know it was made with that icky open source stuff.

I want it to look good. So I found a good template.

I cannot for the life of me figure out how to edit the “Your Name” and “Your Title” fields of this template using Open Office. If you know how, please tell me.

But! otp is an open format! It’s just some zipped up xml. So:

wget http://technology.chtsai.org/impress/xuhai.otp
unzip -d tmp xuhai.otp
cd tmp
grep -rl 'Your Name' ./*
vi styles.xml
 ..... do some editing here ....
zip -rm xuhai_more_better.otp ./*
mv ./xuhai_more_better.otp ../
cd ..
rmdir tmp
gnome-open xuhai_more_better.otp

Bam. No heavy Open Office needed. Why doesn’t everybody do their power points in vi?

A while back I had a few important (to me) bugs filed with PHP that had been fixed in trunk but hadn’t yet been released in an update. I wanted to be able to predict about when PHP’s next minor version would be released – but I didn’t find that info in an easily human-digestible format out there. Soooo… this script pumps out minor version release dates in a delumpishly simple format. Yum, yum.

#!/usr/bin/php
<?php

// this script pumps out version/date from php 5 changlog

$url = 'http://us3.php.net/ChangeLog-5.php';
$regex_version = '/^\<h3\>(.*)\<\/h3\>$/';
$regex_date = '/^\<b\>(.*)\<\/b\>$/';

$lines = file($url);
while(list($k, $v) = each($lines)) {
  if (preg_match($regex_version, $v, $matches)) {
    $version = $matches[1];
    list($k, $v) = each($lines);
    preg_match($regex_date, $v, $matches);
    $date = $matches[1];
    echo str_pad($date, 20) . $version . "\n";
  }
}

?>

As of 2009/03/10…

26-February-2009    Version 5.2.9
08-December-2008    Version 5.2.8
04-December-2008    Version 5.2.7
01-May-2008         Version 5.2.6
08-November-2007    Version 5.2.5
30-August-2007      Version 5.2.4
31-May-2007         Version 5.2.3
03-May-2007         Version 5.2.2
08-Feb-2007         Version 5.2.1
02-Nov-2006         Version 5.2.0
24-Aug-2006         Version 5.1.6
17-Aug-2006         Version 5.1.5
04-May-2006         Version 5.1.4
02-May-2006         Version 5.1.3
12-Jan-2006         Version 5.1.2
28-Nov-2005         Version 5.1.1
24-Nov-2005         Version 5.1.0
05-Sep-2005         Version 5.0.5
31-Mar-2005         Version 5.0.4
15-Dec-2004         Version 5.0.3
23-Sep-2004         Version 5.0.2
12-Aug-2004         Version 5.0.1
13-Jul-2004         Version 5.0.0
8-Jun-2004          Version 5.0.0 Release Candidate 3
25-Apr-2004         Version 5.0.0 Release Candidate 2
18-Mar-2004         Version 5.0.0 Release Candidate 1
12-Feb-2004         Version 5.0.0 Beta 4
21-Dec-2003         Version 5.0.0 Beta 3
30-Oct-2003         Version 5.0.0 Beta 2
29-Jun-2003         Version 5.0.0 Beta 1