24 August 2011

github goes ace (and demos)

A week ago GitHub announced they were incorporating the Ace editor (which powers the Cloud9 IDE).  Since I am a fan of both Cloud9 and GitHub, I gave it a whirl on my GitHub Pages site and was not disappointed.  As advertised one can easily open a file for editing, preview the diff of your changes and commit.  I think it will likely become useful to edit posts when (if) I finally decide to move my blog from here at Blogger to Octopress (just because it looks fun).  For me, this is particularly useful for simple changes like those I have made to my demos and experiments.  Speaking of demos, I had created a simple drawing app using HTML5 canvas for my preschooler which evolved into a demo of the HTML5 History API thanks to a tweet by Christian Heilmann and subsequent read of his blog post.  I decided to use this History API to create the undo/redo functionality that I rely on heavily if i'm trying to draw something in a painting tool.  As a bonus I added a localStorage call that will recreate your last drawing if your browser closes or you are forced to leave the site for a while.  What does that look like:

 I entered the demo in the DevDerby, you can find it here.  I hope you 'like' it too.  (note: I've only really tested my demo on firefox 5, 6, 7, and 8 as well as chrome 13 & 14, so your results may vary if you use a different browser)