Guide to buying a new Subaru XV in Brisbane AU

So about a month ago I wrote off our beloved fourth-gen Subaru Outback, and found myself in the market for a new (or used) car. This is the story of how we ended up buying a new Subaru, what it cost and how you can use this as a baseline for doing the same.

The crash

On Friday March 23rd, on the way to the GRUBS shed at Griffith Uni Nathan campus, with a  boot full of camping gear and three other people in the car, 200m away from where we were meeting everyone else to drive 5 hours down the coast for a weekend canoeing trip, I crashed our car. Specifically, I rear-ended a ute while I was changing the air-con from outside to internal air because the car in front of me was blowing smoke. Stupid, easily avoided and idiotic mistake.

No one was hurt – the crash happened at about 10km/h – but the front of the Outback was well fucked up. I managed to drive it off the road and exchange details with the other guy. The people we were meeting up with ran off to get another car, and I rolled my car down the hill and stuck it in a commuter car park to deal with later. This was Thing I Did Right no. 1 from the crash – avoided a tow truck on the night, despite how ruined the car appeared.

The claim

I filed an “at fault” claim with my insurer (The Buzz), organised a tow truck to take the car to my nominated repairer (Shipstone in Windsor) which my insurer paid for, and waited for the assessment. Thing I Did Right no. 2 was to have the car sent to Shipstone, an insanely expensive and over the top repair shop – you’ll see why this was a good thing in a second.

We’d been just about to sell the car at this stage, and after some research thought we could get about $17,000 for it. The initial assessment was about $12,000, which was probably too low for a write-off. After more assessing (or whatever) a guy from Shipstone called me saying the assessment had ballooned out to in excess of $24,000 because something called a harmonic balance had been punched in by the tow ball of the ute and would require a total engine replacement. This meant that the assessor was recommending a write-off to my insurer and that I should organise to come collect any belongings left in the car.

However, Thing I Did Wrong no. 1 was not taking literally EVERYTHING off the car – roof racks and all. I also should have removed the registration sticker – the salvage company that eventually bought my car claimed back the remainder of my registration – about $240! Those bastards.

The payout

I called my insurer and was told that my insurance policy would be paid out in full, minus our excess. This came to $21423.00. Obviously, we were stoked – this was way more than what we would have gotten if we’d sold the car. Holy shit. We now had $20k burning a hole in our pockets and needed a car. We’d been looking at Subaru Foresters for a while, but now that we were somewhat richer, the new just-released XV started to look quite tempting.

How the fuck do you buy a new car?

That was the question I kept asking everyone. I’d never done it, neither had anyone in my or Sarah’s immediate family. It seemed (and still does) like some sort of esoteric ritual where instead of being told how much the car costs you have to instead barter with the dealership manager as if they were a stall owner in Bali. Coming from a what-it-costs service industry, this concept is totally alien to me.

I went to the City Subaru dealership at Bowen Hills and test drove their XV. The sales person explained that when we got back to the shop he would bargain with his boss to try and get me the “best price” for the car, as if he was an agent of good going into battle the malevolent forces of evil, which just happens to also be his employer. After about 30 minutes of getting nowhere they basically told me that they couldn’t give me “a price” until I’d put down a deposit for the car (which is absolutely fucking insane) and that the reason they do this is to prevent people from shopping around. The fact that they could explain this to me with a straight face just blew my mind.

Shopping around

There’s really only two Subaru dealerships in Brisbane – the ones owned by the A.P. Eagers Group (City, Toowong and Torque) and the ones owned by the Automotive Holdings Group (Zupps Mt Gravatt, Capalaba and Southport). So I called the Mt Gravatt one and asked them for a price. Without any dicking around, the guy on the other end of the phone told me a price. It was like a cool breeze of fresh air wafting out from the speaker of my iPhone.

After some discussion about what they had in stock, we decided to get the “luxury” one, because they had it in stock.

What we bought

  • Make: Subaru
  • Model: XV
  • Badge: 2.0i-L
  • Transmission: CVT
  • Colour: Tangerine orange
  • Accessories: Rubber floor mats, boot mat, roof cross-bars and towing kit
  • Tint: no
  • Fabric protection: fuck no
  • Total price: $37,370.00
We financed the shortfall (only $15,370 because I paid a $1k deposit over the phone) through the dealership, which was in turn through St George Automotive (different to St. George Bank, apparently). They gave us a 10.5% interest rate on a 12 month loan, which was better than NAB’s 15% – though we probably could have done better through GE Money or something similar, but we were in a hurry. We abstained from all the add-on price-protection after-market crap they tried to sell us for the loan, so the weekly payments ended up being about $340 or so.

What you should do

Call Subaru City, tell them you “know a guy” who just bought one for $37,370 and you want to know if they can beat it. Then, put the price you got it for in the comments below! The hardest bit about buying a new car was finding information on reasonable prices – the more information that gets out there the better.

Seriously.

Installing JBoss AS 6.0 Final on Ubuntu Server 11.04 for mere mortals

Installing JBoss Application Server isn’t easy – it’s big, clunky and documented by sexually frustrated neckbeard types who write like wannabe MIT professors. As a predominantly PHP-based developer, and Ubuntu user (i.e. one of the “unwashed masses”) this can be a bit daunting, if not outright fucking frustrating, especially because JBoss-types snob us Ubuntu types.

For this reason, I’ve compiled a guide on installing JBoss on Ubuntu Server 11.04 (this guide works fine for the desktop version of Ubuntu as well).

Preperation

First, we need to create a user that will run JBoss on your Ubuntu server – lots of services do this, like Apache is usually ran as a user called “www-data”.

$ sudo useradd -m -d /usr/local/jboss -s /bin/sh jboss

Now we need to install a Java Development Kit. For the purposes of this tutorial I’m using the Sun one, but there’s a bunch of others that exist because some other neckbeard types don’t like the Sun license.

The Sun JDK package is sun-java6-jdk, but to get access to it through apt, you have to uncomment the ‘partner’ repositories in /etc/apt/sources.list, so open that file up in nano or something and uncomment the following two lines (they’ll be near the bottom)

deb http://archive.canonical.com/ubuntu natty partner
deb-src http://archive.canonical.com/ubuntu natty partner

Once that’s done, you’ll need to update the GPG signatures on the repositories and update apt.

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 3E5C1192 && sudo apt-get update

Now you can finally install the Sun JDK

sudo apt-get install sun-java6-jdk

It probably wants to restart, so you’d better let it.

Downloading

Now we need to download JBoss – sounds easy, but there’s so many different download links on the JBoss download page that I could forgive a person for not knowing. You want to click the one that says 6.0.0.Final, and once you’ve done that, download the one that looks like jboss-as-distribution-6.0.0.Final.zip. The easiest way to do this is to just fetch it with the command

$ wget -O ~/jboss-as-distribution-6.0.0.Final.zip http://sourceforge.net/projects/jboss/files/JBoss/JBoss-6.0.0.Final/jboss-as-distribution-6.0.0.Final.zip/download

Now we can unzip it to the place JBoss recommends – /usr/local

$ sudo unzip ~/jboss-as-distribution-6.0.0.Final.zip -d /usr/local/

This will make the directory /usr/local/jboss-6.0.0.Final, which we need to do two things to: first, set its owner as that jboss user we made earlier

$ sudo chown -R jboss:jboss /usr/local/jboss-6.0.0.Final/

Second, create a simlink to it from where JBoss will expect it to be – /usr/local/jboss (deleting the actual directory first – thanks Ken)

$ sudo rm -rf /usr/local/jboss
$ sudo ln -s /usr/local/jboss-6.0.0.Final /usr/local/jboss

This is just another “best practice” thing to do, and can make upgrading/downgrading less of a hassle in the future.

Setting up service scripts

JBoss comes out of the box with service scripts (those things that live in /etc/init.d) for RedHat, SUSE, CentOS, Solaris, HPUX (whatever the fuck that is), but not Ubuntu – another serious case of neckbeard snobbery. So let’s make one.

First, copy the RedHat script and rename it ‘ubuntu’

$ sudo cp /usr/local/jboss/bin/jboss_init_redhat.sh /usr/local/jboss/bin/jboss_init_ubuntu.sh

Now open it up in your favourite text editor (I use nano – fuck you neckbeards), and make the following amendments

  • Change the JAVAPTH line so it points to just /usr/bin

JAVAPTH=${JAVAPTH:-"/usr/bin"}

  • Between the JBOSS_CONF and JBOSS_BIND_ADDR lines, add a definition for JBOSS_HOST, because if you don’t JBoss “binds” to the loopback interface and you can only access it from the server itself – nice one neckbeards. You can make this line either lots of zeros, which is like a wild-card, or a specific IP address if you only want it to be accessible from a particular network interface. Personally I believe this sort of shit is the responsibility of your firewall, and consider this sort of config totally redundant.

JBOSS_HOST=${JBOSS_HOST:-"0.0.0.0"}

Once you’ve saved it, we can now make a simlink to it from /etc/init.d

$ sudo ln -s /usr/local/jboss/bin/jboss_init_ubuntu.sh /etc/init.d/jboss

Finally, let’s add it to the system startup services, so it will run at boot (like Apache and all those kind of services do)

$ sudo update-rc.d jboss defaults

Now you can actually try firing the bitch up now by running the following command

$ sudo /etc/init.d/jboss start

On my crappy VM it takes about a minute, and it doesn’t tell you when it’s “done”, so you can follow it’s progress by seeing which ports it’s opened with the following command

$ netstat -al

You’re looking for one with :http-alt in the line. As soon as that’s up, you’re good to go.

Dell PERC 6i “Fast Initialize” – how to restore

TL;DR: Make a BartPE boot disc, with Dell RAID drivers and EASEUS Free Partition recovery. Undelete those partitions LIKE A BOSS.

Yesterday at 6PM, while installing a new drive in our Dell PowerEdge 2900, I accidentally “fast initialized” the system drive in the machine.

Yes, this is pretty much as stupid as it sounds. When you install a new drive (the guide I used), you basically turn the machine off, remove a drive bay cover panel, insert the new drive (wrapped in a $45 caddy and a $48 interposer – woo Dell!), boot up the machine, press Ctrl-R/M to get through to the RAID config, create a new “virtual disk”, add the just installed “physical drive” to it, and finally initialize the new virtual disk. Unfortunately, the Dell RAID config software is a little unclear, when you finish creating the new virtual disk, it asks you if you want to initialise it, then takes you to a selection screen – I just picked the first one. Big mistake! In 1/3rd of a second I’d effectively deleted the first and last 8MB of our main server’s boot disk, which includes the MBR, bootsector, partition map, etc, etc… You know that “oh fuck” feeling you get when you’ve done something horribly wrong?

Anyway, here’s how I restored it.

First, I figured out what a “fast initialize” actually is. An article on the Dell support website says:

A fast initialization on a virtual disk overwrites the first and last 8 MB of the virtual disk, clearing any boot records or partition information.

Great, so the data is still all there, it’s just missing the MBR and partition stuff.

So next I needed a boot CD so I could run some recovery software on the machine. At first I considered using an Ubuntu LiveCD, GParted and GNU DDRescue, because there’s a great recovery guide on the Ubuntu community site, but I was worried that I’d have to mess around with drivers to get Ubuntu to recognise the Dell’s PERC 6i RAID array.

So I settled on BartPE, which is basically a modifiable version of the Windows Preinstalled Environment akin to the Linux LiveCD concept. BartPE CDs are created using the PE Builder, which allows you to customise drivers and software, so I added the Dell PERC 6 drivers (downloadable from the Dell website) using this guide.

Now I needed a partition recovery bit of software. Unfortunately I actually tried 3 before I found one that worked just right. I first tried Runtime.org’s GetDataBack for NTFS which can be added as a plugin to Bart PE, and after a 1h40m scan I realised to my horror that GetDataBack is just a file recovery tool – it doesn’t recover partition information at all. It did find all of the data on the drive, but recovering this way would have meant an enormous copy/format/paste shuffle. No good.

So next I tried Active@ Partition Recovery, whose website is really dodgy looking. I added it to yet another BartPE disc by adding its Windows executable in PE Builder as a custom directory (the DOS version of Active@ PR does not work with BartPE’s command prompt, as it is 16-bit native). I had to open a command prompt once this BartPE disc had booted on the server and navigate to the executable to run it, but it did work. After another 1h10m “fast scan”, Active@ had detected one of the two partitions on the drive, and seemingly not the other. Fortunately it was the boot drive, so I restored it.

Now all I had to do was mark the drive as active and fix its MBR, which I did by booting from a Windows 7 disc, running the recovery console and running DISKPART, then BOOTSECT /nt52 C – there are hundreds of guides on this process out there.

Unfortunately, even after this it didn’t boot. I had no idea what was wrong. Then, after removing most of my hair I realised that because the partition information had changed, the boot.ini file would need to be updated. Being a Mac user I sort of expect this kind of stuff to “just work”, but if the boot.ini file doesn’t have a correct partition specified, it will just give up, and peace out, not bothering to display an error message of any kind.

Restart, and bingo. Server back online. Now for that second partition. Frustrated at Active@, I installed EASEUS Partition Recovery and decided to give it a shot. Literally SIX seconds later, I had the second drive recovered, mounted and back up and running.

Seriously, WTF. EASEUS Partition Recovery is black magic and totally free and awesome. I cannot recommend it highly enough. If you accidentally “quick format” a drive, EASEUS Partition Recovery is the tool you’re after. There’s even a guide on their site of how to add it as plugin to BartPE.

So at the end of the day I spent $114USD and learnt a valuable lesson – EASEUS is free and the best partition recovery software out there.

Symfony 1.4 on IIS 6

Getting Symfony to run on anything that isn’t Apache is basically a pain. Before even attempting it you should first make sure it’s completely impossible to spin up a Linux box (Turnkey LAMP anyone?) and run your project on that, or if you’re totally stuck with Windows, consider installing Apache (directly, or by way of WAMP or something similar).

This post is for the unfortunate few who are forced into running Symfony 1.4 on Windows Server under IIS 6 via PHP using FastCGI.

There are a couple of things you’ll need:

If you already have a copy of PHP that’s fine as long as it supports Symfony 1.4 (5.2.4 and above) but keep in mind early versions of 5.3 suffered from unusual date bugs that can be really annoying. Otherwise, install PHP using the installer, or copy the contents of the zip to somewhere like C:\PHP.

Installing FastCGI is relatively painless – everything you need to know is in this guide on the IIS.net website. Just keep in mind that if your path to the php-cgi executable has spaces in it, you will need to quote it, or write it as something like C:\Progra~1\PHP\php-cgi.exe instead.

Installing Symfony can be tiresome if you have no experience with SVN, but trust me it is totally worth it. Pick yourself up a free SVN space at Assembla. If you’re running Symfony, you’re probably a “professional”, and if you’re doing development without an SCM you’re a fucking idiot. Checkout a working copy of your Symfony project trunk to a “dev” folder on your hard drive – NOT to the IIS web root directory. Symfony is designed to be setup as a virtual directory, so all your backend scripts aren’t exposed.

If you want your Symfony project to be the web root of your server, then in the IIS Manager panel, just change the root directory for your site in IIS to your project’s working copy’s web directory. So http://localhost/ should point to something like C:\dev\my_sf_project\web

If you want your Symfony project to be a sub-directory of your server, then you’ll need to add a virtual directory that similarly points to the web folder of the working copy. Just select your server in the IIS Manager panel, and  choose Action->New->Virtual Directory… and select the web folder of your checked-out Symfony project. So http://localhost/my_sf_project/ should point to something like C:\dev\my_sf_project\web.

You’ll also need to create a second virtual directory to the C:\dev\my_sf_project\lib\vendor\data\web\sf directory as per the Symfony 1.4 webserver configuration instructions – this step gives you all the built-in images and crap like that.

Now you need to set up ISAPI rewrite. This is the hard part. Installing it is easy, but tweaking the config that actually rewrites URLs is not easy. Many web admins balk at implementing mod rewrite scripts, and virtually none feel comfortable modifying them once they’re even close to working. You’ll need to edit the config file httpd.conf in C:\Program Files\Helicon\ISAPI_Rewrite3, and depending on your Symfony setup you’ll need different configurations.

Rewrite config for Symfony project as webserver root

Options +FollowSymLinks +ExecCGI
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /

# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule /.* - [L]

# we check if the .html version is here (caching)
RewriteRule ^/$ /index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

Rewrite config for Symfony project as virtual directory

Options +FollowSymLinks +ExecCGI
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /

# we skip all files with .something
RewriteCond %{REQUEST_URI} /my_sf_project/.*\..+$
RewriteCond %{REQUEST_URI} !/my_sf_project/\.html$
RewriteRule /my_sf_project/.* - [L]

# we check if the .html version is here (caching)
RewriteRule ^/my_sf_project/$ /my_sf_project/index.html [QSA]
RewriteRule ^(/my_sf_project/[^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

# no, so we redirect to our front web controller
RewriteRule ^/my_sf_project/(.*)$ /my_sf_project/index.php/$1 [QSA,L]

Obviously you’ll need to replace my_sf_project with whatever the name of your project’s virtual IIS directory is. Once you’ve done this, everything should work. The ISAPI Rewrite program doesn’t require you to restart IIS when you make changes, they’re reflected immediately.

Other reading:

  • Symfony 1.4 on IIS7 – apparently quite easy!
  • The Symfony 1.0 guide on IIS 6 – still quite relevant, but their rewrite rules are stunted – they don’t deal with the case of http://server/module/action – i.e. no index.php or app name in the URL.