Mr Speaker

mrspeaker's head in a monitor You find yourself at the entrance to the Hompage of Mr Speaker. In a darkened corner sits a trunk containing HTML5 games and some JavaScript tidbits. Next to it you spy a mastodon account. Exits are North, East, and .

IE6 Final Countdown

Microsoft hates IE6 as much as the rest of us. So they've made yet another "let's finally get rid of IE6" website. All our hopes and prayers lie with them. As a bonus, they also supply some code to display a banner at the top of websites when a user has IE6:

<!--[if lt IE 7]> 
  <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;'>
  <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx"><img src="http://www.ie6countdown.com/images/upgrade.jpg" border="0" height="42" width="820" alt="" /></a></div>
 <![endif]-->

It's a simple conditional comment that targets browsers under IE7. After studying the code for a while I realised that it was ripe for a little "standards-based refactoring".

Future-proofing the code

It's a great effort by the Microsoft guys - but in the interests of the web-at-large I've tweaked the code slightly to be a bit more future-proof:

<!--[if IE]> 
  <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;'>
  <a href="http://www.mozilla.com/en-US/firefox/"><img src="http://www.ie6countdown.com/images/upgrade.jpg" border="0" height="42" width="820" alt="" /></a></div>
 <![endif]-->

Post that in the body of your site, and you should be good to go. They didn't put the original code on Github, so I don't know who to send the pull request to, but hopefully they'll get my email and update it with the changes...

Accelerometer in Javascript

accelerometer testerThe super-cool Google Jules Verne demo that went up today reminded me that I made an accelerometer tester for the iphone ages ago.

It's an offline app, so don't be afraid to "add it to home screen" - and if you don't want to get dizzy, then lock the phone to portrait mode!

GO HERE ON YA IPHONE!

It just uses a dodgy implementation of some "sparklines" to plot the X, Y, and Z rotation that you can fetch by listening to the devicemotion event. It should work in Chrome - but doesn't seem to. I'll check it out, and update this post with some more details tonight. Or tomorrow night. Or.

oadingL: The Magnificent Marquee Throbber

Allow me to introduce oadingL: The Magnificent Marquee Throbber! It's a state of the art, web2.0.1, content loading indicator (or "throbber", as they are known in the biz):


Wow. What you're witnessing, if you are using Chrome, Safari, and somewhat Firefox (no idea about IE) is four 16 pixel-wide marquee elements, wrapped in a 64 pixel-wide marquee element - travelling left - wrapped inside a 128 pixel-wide marquee element: travelling right. With just a dash of CSS for roundy edges.

Read on for more »

Anonymous functions for inline event handlers

Inline event handlers... remember them?! Yes, they've gone the way of the blink tag and Adobe Flash, but recently I used one while debugging and realised: "Hey! I have no idea how to get the event object in an inline even handler!" and, shortly after "In fact, no idea how to write an anonymous function in an inline event handler either!". So I set out to rectify the matters. After a bit of experimenting I came up with this:

onclick="(function(e){ alert(e); })(event)"

Read on for more »

On the importance of marketing

A bit of mis-management on my part resulted in this interesting "experiment": take the exact same article, submit it to two different (but demographically similar) sources, with different headlines.

Now, I'm not going to win any awards for understanding the importance of some good link bait, but I'll also never look at a "title" form field the same again...
Read on for more »

Beginning Mac Hacking

It was the late 90s - the internet was new, every rock band had a token DJ, and I was taking up space in either the university bar or the pentium-1 filled computer labs where I was learning to be social and anti-social respectively. During the anti-social times I would read inspiring tutorials and essays regularly released by a hacker named Fravia.

He was a very mystical fellow, and spoke about reverse engineering with a sense of grand importance and just a pinch of spiritually - all very enticing to a nerdy youngster like myself. His site eventually moved away from cracking and into "search lore" - avoiding the evilness of google (way before it was cool to avoid google), finding stuff using gopher, and many other weird techniques.

I went searching for his old tutorials (via duckduckgo, naturally) and found that Fravia died in 2009. I learned a lot from his work - not about software cracking, but about the hacker spirit and "reality cracking". So as a kind of homage I decided to sit back, sip on a Martini-Wodka have a look at reverse engineering software on my new shiny Mac.
Read on for more »

Dear Network Diary…

Well, it's that time of year again where we take a moment to reflect: revisit our achievements, ponder our failures, and reminisce about the wireless networks we connected to. I can't help you with your achievements and failures, but, if you're on a mac, paste this fellow into a terminal window to read your very own "Known Network diary"!

defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences KnownNetworks | grep 'SSID_STR\|_timeStamp' | awk -F ' = ' '{print $NF}' | sed 's/^"//;s/;$//;s/"$//;s/^\([0-9]\{4\}-..-..\).*/\1/;' | sed 'N;s/\n/%%/' | awk -F '%%' '{print $2 ": " $1}' | sort -r

Optionally, add on a | mate to open it straight up in Textmate.

Read on for more »

Password expiration

Oh Gawker, you fool! You fell victim to one of the classic blunders - The most famous of which is "never get involved in a land war in Asia" - but only slightly less well-known is this: "Never go against 4chan, when death is on the line"! I chorkled, smugly reassuring myself I was safe from this one.

Then I checked the torrent... there I was! How was this possible? I don't care for Gawker, and I certainly never logged in there. Then I remember. Oh. I once thought I had something terribly important to say on Valleywag, many internet seasons ago - before it was killed and mushed up against the side of the Gawker empire...

Read on for more »