Tuesday, 13 November 2007

Oh, to be a quitter

Stopping smoking is tough.
Prohibition just makes the urge stronger

I like this article by Clive James.

...and I'm lighting one up in my memory right now :)

Monday, 12 November 2007

Maps

I saw Peter, Bjorn and John at the Forum last week. They were OK - they seemed to relax more once they'd played Young Folks and a third of the audience left (some people!). Bizarrely, most of the crowd preferred to chat amongst themselves than listen to the bands.


Anyway, supporting them were the wonderful creation of Northampton's James Chapman - Maps, and for me it was they who justified the cost of my ticket.

I'd heard bits and pieces of them before without thinking too much, but seeing them live was enveloping from the moment they strolled onto the stage and burst into their first song with a rightly held confidence. The sound was fairly shit at the forum, but this didn't seem to matter - somehow the energy in the performace and hypnotism of the tunes made you not even notice after a short time.

We can create is their album, and you can hear them on the hype machine too.

Wednesday, 31 October 2007

National Novel Writing Month

They say everyone has a book in them. I've never been too sure if that's actually true, but thought I'd attempt to get mine out in national novel writing month, which starts tomorrow.

The idea is that you start writing tomorrow, write an average of 1667 words each day in November and have a 50k word novel at the end of the month! Lovely stuff. The emphasis is on quantity, not quality, and theres to be no editing til December.

It doesn't matter if it's disjointed, nonsensical in places or is just plain arse. The idea is simply to get people writing. I for one am going to give it a bash, if you fancy joining me, head on over to NaNoWriMo.org and sign up.

JOIN ME!

Tuesday, 30 October 2007

How to compress and decompress tar and gzip files

How to untar a file

A lot of Linux/Unix files you find yourself working with will be compressed using tar and/or gzip. These are files with extensions like .tar and .tar.gz.

Extracting

For.tgz, tar.gz, or tar.z extension use this command:

tar -zxvf {filename}

Eg: tar -zxvf filename.tar.gz

This will extract the file for you in the directory you are currently in. Using the above command will save you from having to redirect the output for gzip or anything else (because the z option automatically decompresses the file for you), otherwise without the z argument, you would have to do the extraction for the gzip first, then do a tar -xvf for the tar archive.


Archiving

To create a gzipped .tar file, use the following command...

tar -cf {filename}

...to create filename.tar
Eg: tar -cf filename

- Then -

gzip {filename.tar}

...to create filename.tar.gz

Saturday, 20 October 2007

It's amazing what you can do with a few boxes


OK, This is incredible. This dude, Chris Gilmour makes things out of cardboard - like the car above. How the f*ck? More Here at his site...

TV Links Raided and the operator arrested



A 26yo man from Chelteham in the UK, was arrested yesterday and the web site TV-Links shut down.

Many sites exist hosting and streaming video content across the web, what made TV-links so popular was that it aggregated these videos and allowed users to browse and search them from one place.

Although not actually hosting any of the content, the operator has been arrested for 'facilitation' of copyright infringement. This raises the question of what actually constitutes an offence. If I linked to TV-Links or a similar site from my blog, would I have the long arm of the law knocking at my door tomorrow?

Anyway, at the very least, the movie and TV industry need to realise that the way people want media is changing and there is a huge demand for their programmes, and back-catalogue ( wheres ya Mac iPlayer BBC!?!?), prefereably all in one place. I for one would pay a fiver a month to have access to BBC/C4/American content streamable and maybe pay a quid a time for a movie. They'd make a not so small fortune for sure.

RIP Tv-Links (not that I ever used it myself, you understand).

Monday, 15 October 2007

Code for simple PHP timer script

<?php

// Simple timer script


function timeStamp() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}

$startTime = timeStamp();

// Do some things here - i'm just sleeping for a bit
usleep(150000);

// get the split time
$splitTime1 = timeStamp();

// round to 4 dec places, unless you want to be crazy accurate
$splitTime = round($splitTime1 - $startTime,4);
echo "Split Time: ".$splitTime." seconds.";

// Do some more things here
usleep(500000);
$endTime = timeStamp();
$totalTime = round($endTime - $startTime,4);
echo "End Time: ".$totalTime." seconds.";

?>

Sunday, 14 October 2007

Radiohead


I bought In Rainbows for £2. A bit mean you may think, but I could have had it for nowt, and after all the idea was to pay what you wanted, so thats what i did. I must admit I love it right now. Weird fishes and Jigsaw falling into place particularly do it for me. A throw back to OK Computer for sure, and a very welcome one for me as someone who didn't really go on their unmelodious beepy journey of the last 3 studio albums.

But, what In Rainbows has really done for me is to make me go back and realise what an truely amazing album The Bends was. With The Bends, High and Dry, Fake Plastic Trees, Just, My Iron Lung and Street Spirit on ONE album, I'd forgotten just how incredible it is.

Monday, 17 September 2007

Faith in their product - great advertising idea

In a recent marketing campaign in Vancouver, 3M sought a strong image for their security glass.

They modified a bus shelter, fitting it with their security glass and filled it with REAL BANKNOTES!!!

Many have tried to gain access with golf clubs and baseball bats but obviously the glass remains intact!

This is what you call having faith in your own product .... great advertising!

Wednesday, 12 September 2007

Codeigniter ahoy!

This week I have mostly been loving Codeigniter (not literally, that'd be hideous). Never has the MVC approach made as much practical sense before, and CI has the good sense to let you quite happily just use a VC approach where MVC would be overkill.

No framework is ever going to exactly fit the things you want to do in the way that you want to do them, but what I love about CI is that is doesn't try to do too much, but it's extendable if you want more. The initial setup comes with more or less everything you need for most purposes I would have thought.

CI also has great documentation and community, small overhead/footprint and is a doddle to setup (just copy the dir structure and set a couple of config settings). Plus it works with PHP4, which is a huge bonus to me as my shared hosting STILL have no date for migration to 5.

Is PHP's ROR? Time will tell, but it's like a breath of fresh air to this web monkey.