Categories
Cars SAAB

Babs the Saab 900 T16s

My first Saab was Babs, a ’93 900 T16 in ruby red with the aero kit. Over the two and a bit years I owned her, I poured a huge amount of time and money into making her as good as I could. Refurbished some super aero wheels, added Kilen springs, 9k brakes and lots of forgotten improvements and fixes.

Babs the Saab 900
Babs the ruby red 1993 900 T16

This was taken during a shoot for a music video she was used in!

Being around for the filming of this was a fun experience

Now for the period of disaster! In early 2016 she blew her head gasket after a rad hose split, so I replaced that and fitted a full silicone hose kit. A handful of weeks later she failed her MOT on rust around the rear shock mountings. So I spent a good couple of months with friends replacing a lot of the rear arches and bootfloor, and also treated her to new Blistein B4s all round. She sailed through the MOT after that, and straight off I went to collect my then new girlfriend for our second date. A few miles into the trip I noticed a slight gearbox whine which very rapidly turned into a howl, shortly followed by seizing in the middle of Sheffield. Luckily the lady didn’t mind travelling home in an AA truck!

So after that string of events I decided Babs and I needed a bit of time to cool off, so I decided to pick up an early 9-5 Aero to use while I sourced and fitted a new box. I did all my research, made sure to choose a car with the modified breather and lots of documentation. The only slight concern was that it had supposedly been remapped but they didn’t know who by. Fair enough, the rest of the car looks very clean and tidy and I need wheels quickly.

Babs and Helga the 9-5 Aero
Babs and Helga the 2000 9-5 Aero

Cut to four days (!) later, driving at a steady 60, loads of smoke from under the bonnet and down to three cylinders. Limped home and started diagnosing to find no compression on cylinder three. Brill. So, engine apart, and, just as expected, a big chunk of the skirt is cracked off and only held on by the rings. Managed to source a second hand piston in the right size code, and built it back up with new rings.

Broken piston
Ouch. 9-5’s broken B205R piston

It ran okay after that but I’d lost confidence in it and the MPG was killing me on a 40 mile commute so not long after I swapped her against a Volvo S60 D5.

Anyway, while the 9-5’s engine rebuild was going on, Babs was sat on some land outside of the garage. One Tuesday I was at work when I got a text saying a branch had fallen on the car and I’d better go through and look. Expecting maybe a dented bonnet, I arrived to find this.

Needless to say, that was the end of Babs. Annoyingly now, I didn’t save nearly enough parts from her. But somehow I still hadn’t had enough of Saabs.

Categories
Cars Dutton Legerra

Peggy the Dutton Legerra

Having just sold Peggy the 1989 Dutton Legerra, I thought I’d better document my time with her. I bought her in 2011 as my first car with a 2.0 EFI Pinto engine and 5 speed type 9 gearbox. Jumping from learning to drive in a modern car to a plastic kit car with non servo brakes took some serious adjustment. A previous owner had fitted seriously rock hard coilovers which made her handling really skittish, so I had plenty of scary moments.

I’ve lost track of the work I did on her, but it was mostly tidying her up and removing the LPG system that some previous owner had fitted.

For a while I ran some Allycat wheels

There was only one time her skittish nature really caught my out, and before I knew what was happening I’d clipped the curb at about 50mph.

This meant a broken lower arm (Escort mk2), bent upper wishbone (which was straightened and sleeved for strength) and a ruined tyre. It could have been much worse.

Anyway, she was a lot of fun and I’ll really miss the raw driving experience.

Categories
Code Web Design

iOS prevent scrolling on body

Ordinarily, overflow: hidden; on the body tag is sufficient to prevent scrolling a web page, if for instance you’re creating a drawer to hold content that will scroll separately. However, this doesn’t work in iOS6. The best I’ve come up with so far is to set position: fixed:

body.lock-position {
height: 100%;
overflow: hidden;
width: 100%;
position: fixed;
}

Categories
Code

Laravel UK date validator

Extend Laravel’s validator class to fully validate dates in the format (DD/MM/YY). Tested in laravel 3.

public function validate_uk_date($attribute, $value, $parameters)
{
/*
Validates a UK date to fit DD/MM/YY, checking for days in the month and accounting for leap years.
Laravel's date validator didn't seem to do that.
*/

//split date into array of parts
$date_array = strptime ( $value, '%d/%m/%y' );
//return early if that failed
if ( ! $date_array ) return false;
//check for validity of date
return checkdate( (1+$date_array['tm_mon']), $date_array['tm_mday'], (1900+$date_array['tm_year']) );
}

Categories
Code

Custom Metaboxes for WordPress: Front Page show_on filter

Shows the metabox only if a static front page is set and you’re editing it.


/*
Make sure your metabox is set thus:
'pages' => array( 'page' ), // Post
'show_on' => array( 'key' => 'front-page', 'value' => '' ),
*/

/**
* Include metabox on front page
* @author Ed Townend
* @link https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Adding-your-own-show_on-filters
*
* @param bool $display
* @param array $meta_box
* @return bool display metabox
*/
function ed_metabox_include_front_page( $display, $meta_box ) {
if ( 'front-page' !== $meta_box['show_on']['key'] )
return $display;

// Get the current ID
if ( isset( $_GET['post'] ) ) {
$post_id = $_GET['post'];
} elseif ( isset( $_POST['post_ID'] ) ) {
$post_id = $_POST['post_ID'];
}

//return false early if there is no ID
if( !isset( $post_id ) ) return false;

//Get ID of page set as front page, 0 if there isn't one
$front_page = get_option('page_on_front');

if ( $post_id == $front_page ) {
//there is a front page set and we're on it!
return $display;
}

}
add_filter( 'cmb_show_on', 'ed_metabox_include_front_page', 10, 2 );