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.