Archive

Posts Tagged ‘JavaScript’

Old vs new Retweets and why I made the RT button

October 4th, 2010 3 comments

Yesterday I posted a hack which adds an old style RT button to the new Twitter website. Here’s the full post on what it is, and why I did it.

Read more…

Dictionary bookmarklet

August 9th, 2010 No comments

I use this really basic Firefox bookmarklet pretty much every day, so I thought I’d post it.

–> Dictionary.com <– drag to toolbar

Dictionary.com provide an ‘official’ bookmarklet, here:
http://dictionary.reference.com/tools/bookmarklets.html

I’ve improved it a bit Read more…

node-amf and node-rtmp

August 7th, 2010 5 comments

AMF and RTMP libraries for node.js – Flash remoting with node.

I’ve been having fun playing with node.js over the past year, but have had little, or no excuse to use it in any production work, so I thought I’d set myself a challenge and build a module. That challenge was firstly to create a simple AMF gateway for Flash remoting, and secondarily to see if an RTMP socket server was achievable in node.

If you don’t know about “node” – It’s a JavaScript runtime that allows you to write socket servers. I like it a lot – it brings asynchronous, event-driven programming to the server side and provides a truly global variable scope across all connections. I’ll blog about it in more detail later, perhaps.

At Public we do a lot of Flash work, and regularly implement Flash remoting using a PHP AMF gateway. I wasn’t necessarily looking to replace this stock approach with node, but node offers proper socket connections that PHP can’t, so I was imagining the possibilities of using node as a free, and more flexible alternative to Flash Media Server. Not for streaming media, but for real-time messaging, for example in multi-player games. If I’m honest though, I did this mostly for fun, an academic exercise and as an excuse to work with node.

Read more…

Google Maps zoom scales

April 18th, 2010 1 comment

I couldn’t find this information today when I needed, so I thought I’d share. If it’s in the Google maps documentation, then I missed it.

If you want to zoom a map to fit a particular distance as tightly as possible, you need to know the scale of each of the 19 levels. In metres per pixel, I worked them out to be as follows: Read more…

jParser and jTokenizer released

November 14th, 2009 13 comments

After nearly two years I’ve finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.

The library has been split in two:

  1. jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
  2. jParser - The fully blown JavaScript syntactical parser which generates a parse tree.

Read more…