Ben Pickles. Saying stuff about stuff.

It’s official: Peity is helpful!

It's not quite "best jQuery plugins ever" or even "best jQuery plugins of 2010" but Peity being listed #3 on 12 Helpful jQuery Plugins to Check Before Ending April 2010 - even though it's already May - will do for now :)

Posted on

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!

Posted on

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:

Posted on

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.

Posted on

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.

Posted on

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.

Posted on

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.

Posted on

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.

Posted on

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


<?xml version="1.0" encoding="UTF-8"?>
<oembed>
  <type>video</type>
  <version>1.0</version>
  <provider_name>Vimeo</provider_name>
  <provider_url>http://vimeo.com/</provider_url>
  <title>Weird Fishes: Arpeggi</title>
  <author_name>flight404</author_name>
  <author_url>http://vimeo.com/flight404</author_url>
  <is_plus>1</is_plus>
  <html><![CDATA[<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>]]></html>
  <width>504</width>
  <height>348</height>
  <duration>318</duration>
  <thumbnail_url>http://20.media.vimeo.com/d1/5/57/04/55/thumbnail-57045532.jpg</thumbnail_url>
  <thumbnail_width>160</thumbnail_width>
  <thumbnail_height>120</thumbnail_height>
  <clip_id>935317</clip_id>
</oembed>

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

1 Gotta love their ASCII art:


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

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

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.

Posted on

Civilization really coming to the DS!

Civilization Revolution

Posted on