Saying stuff about stuff.

Peity • progressive <canvas> pie charts

Towards the end of last year I created a simple jQuery plugin to “progressively enhance” content and convert something like <span class="pie">3/5</span> into a nice mini pie chart.

Recently ismasan and olivernn made it a bit cooler and fixed it in Firefox (respectively) and I’ve been impelled to show the documentation page a bit of love - of course it’s open-source and on github.

Anyway check it out, you never know you might actually find it useful!

Quick Ruby Script to the Google Closure API

Closure is a Google tool for intelligently optimising - minifying - your Javascript. There’s a command-line tool, an online version and a REST API.

Here’s a quick Ruby script for accessing the REST API:

CSS3/jQuery Gallery

Many years ago I wrote a Flash photo gallery library (used in the Sheldon Cooney site I made) and after seeing this example of CSS3 3D features a while back I wondered if I could recreate it in CSS3/Javascript.

I finally found a little time and threw something together so here’s my quick CSS3/jQuery gallery. A newer version of WebKit appears to be required at the moment - Safari 4 will do and, amazingly, it works almost perfectly on the iPhone.

Flickr/Twitter Integration

I have discovered that too few people know about Flickr’s Twitter integration so I thought I’d mention it here. Now you don’t have to mix with any of those twitpic/yfrog/etc-types and you can get some more Flickr views ;)

And here is in action with a nice flic.kr short URL.

HTTParty

I really like HTTParty and use it whenever there’s mention of any web service jiggery-pokery but I was surprised to find that it didn’t have a head method.

Perfect, I thought, an opportunity to contribute to a project that I like and use

Contentz, a ruby gem

I wrote my first ruby gem at the w/e

It’s for compressing content

I use the code in a project of mine and iT’s nice to be able to extract and encapsulate the functionality into it’s own entity so it can be tested independently.

That brings me to my next point, being able to test it and connect activerrcord to a db etc wihhout rails was a little simpler than I expected

The actual process of building and releasing a gem has been made ridiculously simple with jeweler

I would thoroughly reccomend the process

Me through the looking glass

I am James Hill - Ben Pickles

The other day I had the fortune of being photographed by my good friend James Hill for a personal project of his. The result is a sincere and slightly revealing portrait of me, so check me out.

Autotest and Growl

I’ve been trying without success to setup autotest Growl notifications for some time but never quite managed to get it fuly working. There are plenty of solutions out there already but things still didn’t seem to come together for me… until today - the latest version of seems to have smoothed things.

Unfortunately there’s a bug in growlnotify so whether the Growls will actually be displayed is another question (they randomly don’t appear). There is a fix for this, however, which provides a drop-in workaround - remember to stop and start Growl from Preferences.

Last but not least is the pièce de résistance: what pass/fail image(s) shall I show? Fortunately somebody has already answered that for me and in the most pleasing way possible.

A little tweaking here and there (like renaming the fail images 1-5) and I give you my .autotest Growl hook.

Shortwave Gist

I’ve been using Shortwave for a while, it’s lightweight (a bookmarklet) and particularly agreeable as it syncs with my iPhone. Today I finally tired of having to look through the git docs site and decided to create a custom Shortwave commands file.

In an inspired move I’m storing it in a Gist for easy access and maintainability - I simply point Shortwave to the raw version.

It makes me wonder what else I could store in that there tinterweb…

Of course the downside of this is that Shortwave has to parse the file on each request and github isn’t exactly fast.

P.S. Here’s the Git docs command I added:

git  http://www.kernel.org/pub/software/scm/git/docs/git-%s.html  Git command help.

What is oEmbed and why is it useful?

From the oEmbed site [1]:

oEmbed is a format for allowing an embedded representation of a URL on third party sites.

Cool… what?

For example Vimeo will return the HTML required to embed one of its videos - oEmbed is particularly useful for videos [2].

http://vimeo.com/api/oembed.xml?url=http://www.vimeo.com/935317

  video
  1.0
  Vimeo
  http://vimeo.com/
  Weird Fishes: Arpeggi
  flight404
  http://vimeo.com/flight404
  1
  <object type="application/x-shockwave-flash" width="504" height="348" data="http://vimeo.com/moogaloop.swf?clip_id=935317&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF">
  <param name="quality" value="best" />
  <param name="allowfullscreen" value="true" />
  <param name="scale" value="showAll" />
  <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=935317&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF" />
</object>
  504
  348
  318
  http://20.media.vimeo.com/d1/5/57/04/55/thumbnail-57045532.jpg
  160
  120
  935317

Hidden away amongst the cruft you can see that the html element contains their movie player embed code.

Why?

Think bookmarks, tumbles and other such delights. It’s like a rich meta description - though that sounds awfully close to being a cringe-worthy marketing buzzword creating developer cynicism.

Resources

                         __                 __
                        /\ \               /\ \
  ___      __    ___ ___\ \ \____     __   \_\ \
 / __`\  /'__`\/' __` __`\ \ '__`\  /'__`\ /'_` \
/\ \L\ \/\  __//\ \/\ \/\ \ \ \L\ \/\  __//\ \L\ \
\ \____/\ \____\ \_\ \_\ \_\ \_,__/\ \____\ \___,_\
 \/___/  \/____/\/_/\/_/\/_/\/___/  \/____/\/__,_ /

 ===== because 'open embed' sounds too dirty =====

[1] Gotta love their ASCII art:

[2] One could argue that embedding videos is all it’s really useful for at the moment as it seems to be most popular among video services (not YouTube!) but that’s a discussion for another day.