Rather random, but very funny & 'ahhhhh' inducing -
http://www.icanhascheezburger.com
Sunday, 23 September 2007
Monday, 9 July 2007
Neat firefox trick
For anyone feeling childish, goto your favourite page (in firefox/camino) and put the following in the location bar
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
now you can change the text to anything you like ... comedy headlines! woo!
you can turn it back off with the following
javascript:document.body.contentEditable='false'; document.designMode='off'; void 0
how cool is that!
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
now you can change the text to anything you like ... comedy headlines! woo!
you can turn it back off with the following
javascript:document.body.contentEditable='false'; document.designMode='off'; void 0
how cool is that!
Monday, 21 May 2007
Sausage wrapped round a pineapple!
Check out these oldskool weight watcher cards. My favourite has to be the Frankfurter Spectacular (see title)
Thursday, 29 March 2007
Poor Green Bastard
Nine Inch Nails did the original, Johnny covered it, but Kermit tops them both. clicky clicky
Saturday, 24 March 2007
Help the Police!
This has to be the funniest youtube video I've seen in ages. Its from the new BBC3 sketch show 'Rush Hour' starring Adam Buxton
Click here to view
Click here to view
Friday, 23 March 2007
PS3 Launch
Today the not-as-good-as-everywhere-else PS3 is launched in Europe & Australia, after a massive delay. (We're not allowed to import them, apparently US versions are safe enough for US citizens, but not us in Europe). I was a bit bemused why bcc news was reporting on people queing up in London on Wednesday to get their console on Friday. Last Saturday, every Game Store/Video Store/Pet Shop I went in could garantee the console on launch. We were joking at work that they probably work for Sony. Then today, a story on BBC news provides a hint.
Hmmm ... sounds a bit suspicious to me. I should be clear the BBC story clearly states no one knew about this, and they were all in a state of shock - but still, I'm not buying it - Both the PS3 and the fact that is was a suprise.
They had just been told they had been rewarded for their patience and loyalty with a free £2,500 high-definition TV on which to play their shiny new console.
Hmmm ... sounds a bit suspicious to me. I should be clear the BBC story clearly states no one knew about this, and they were all in a state of shock - but still, I'm not buying it - Both the PS3 and the fact that is was a suprise.
Thursday, 22 March 2007
Ajax on Nintendo DS (Part 2)
For my reference and anyone who's playing around with AJAX on the DS, here's an example of AJAX on the DS...
ajaxexample.html
Again, big thanks to tamwayne over at the Opera DS Forum
The example creates a simple webpage that shows the track name and album art for the track currently playing in iTunes. The data comes from an XML file named 'status.php'. Status currently returns something like the following
The 'trunc' fields provides truncated versions of associated text, to save messing around in javascript to make it fit correctly - I know, it's a bit of a hack!
How I get this information, generate album images and the control itunes/airport express volumes will be covered in a later post. Once I've tidied up the interface I'll get some screenshots online
ajaxexample.html
Again, big thanks to tamwayne over at the Opera DS Forum
The example creates a simple webpage that shows the track name and album art for the track currently playing in iTunes. The data comes from an XML file named 'status.php'. Status currently returns something like the following
<status>
<!-- I had a bug with DS not liking
to read the first child of DOM element ... weird -->
<filler>filler</filler>
<trackdatabaseid>1234</trackdatabaseid>
<trackname>Idioteque</trackname>
<tracknametrunc>Idioteque</tracknametrunc>
<trackartist>Radiohead</trackartist>
<trackartisttrunc>Radiohead</trackartisttrunc>
<trackalbum>Kid A</trackalbum>
<trackalbumtrunc>Kid A</trackalbumtrunc>
<trackimage>http://10.0.1.2/itunes/work/1234.png</trackimage>
<smltrackimage>http://10.0.1.2/itunes/work/1234.sml.png</smltrackimage>
<volume>
<living_room>90</living_room>
<dining_room>60</dining_room>
<upstairs>100</upstairs>
</volume>
</status>
The 'trunc' fields provides truncated versions of associated text, to save messing around in javascript to make it fit correctly - I know, it's a bit of a hack!
How I get this information, generate album images and the control itunes/airport express volumes will be covered in a later post. Once I've tidied up the interface I'll get some screenshots online
Thursday, 15 March 2007
AJAX on Nintendo DS
I recently got the Opera browser for the nintendo DS, with the idea of creating a touch screen interface for controlling the audio I'm piping around the home (php, apache, applescript, itunes, airtunes & airfoil - more on all of this later). I was hoping that the software would have the 'XmlHttpRequest' class in its Javascript implementation, which is a pretty common way of creating AJAX web pages. Unfortunately, it doesn't. What makes debugging the browser all the more tricky is the fact that you can't get to any Javascript console, so it really is trial and error.
Thankfully, tamwayne over at this thread on the opera ds forum has come up with a solution. It's actually a method I used a few years back before AJAX was the next big thing (and when I wasn't aware of the XmlHttp class and its variations). Basically, tamwayne's method defines a new class called 'IFramelHttpRequest'. This class can then be used to request xml from other pages. A dynamic iframe is used to load xml from the other page, and the content of this iframe is then passed to a callback. Nicely done tamwayne.
Unfortunately I've being having problems using this method. The iframe 'onload' function appears to be called before the iframe is populated with the new XML. This may be due to the slight delay in rendering my xml (it has to talk to itunes to generate the XML). My work around was to edit the onload function in the iFrameHttpRequest object. I use the setTimeout() function to call the callback function after a small delay, to account for the iframe loading.
When calling the callback i pass the name of the iframe. This callback then uses the name to read the iframe contents. this seems to do the trick.
apologies if the above was hard to follow. I'll post the source once it's all done
Thankfully, tamwayne over at this thread on the opera ds forum has come up with a solution. It's actually a method I used a few years back before AJAX was the next big thing (and when I wasn't aware of the XmlHttp class and its variations). Basically, tamwayne's method defines a new class called 'IFramelHttpRequest'. This class can then be used to request xml from other pages. A dynamic iframe is used to load xml from the other page, and the content of this iframe is then passed to a callback. Nicely done tamwayne.
Unfortunately I've being having problems using this method. The iframe 'onload' function appears to be called before the iframe is populated with the new XML. This may be due to the slight delay in rendering my xml (it has to talk to itunes to generate the XML). My work around was to edit the onload function in the iFrameHttpRequest object. I use the setTimeout() function to call the callback function after a small delay, to account for the iframe loading.
When calling the callback i pass the name of the iframe. This callback then uses the name to read the iframe contents. this seems to do the trick.
apologies if the above was hard to follow. I'll post the source once it's all done
Subscribe to:
Posts (Atom)