Chris Bevan

New kicks

6 Jun 2015

New kicks

The end of an era. I’m moving from the ‘1U675’ chocolate monochrome All Stars I’ve been wearing since 2006 to the more easily sourced black monochrome.

Accessing hybrid/data CDs under Mac OS X

9 Nov 2014

Clearing out some old magazines, I recently found a pile of cover CDs that I thought I would check out before discarding.

Despite knowing that each disc had a combination of music tracks and data files, I could not find a way to get the CDs to mount as anything other than an Audio CD.

Continue reading

Boosting my Jekyll rebuild times

20 Oct 2014

For a while now I’d been using the jekyll-flickr plugin for adding Flickr images to posts on this here site.

All you need is the Flickr photo ID and size you want to use. When rebuilding my Jekyll site, the plugin would cleverly use Flickr’s API to reach out, grab the raw image URL for the choosen size, before replacing the short-and-sweet plugin code for the long-form HTML markup required to properly display my Flickr image.

For example, I add this to my post:

{% flickr_photo 11804351333 "Medium 640" %}

Then each time my site was rebuilt, my slightly customised flickr_photo.rb would output the following into my generated static page:

<div class="photo-holder" style="max-width:62.5em;">
    <a href=""><img class="photo pure-img" src="" title="Ugly" alt="Ugly" /></a>

As you can imagine, this looked like a good idea at the time. Unfortunately, and as I found out, there were a few significant pitfalls.

Rebuilding my site now required an internet connection. No connection, jekyll build would throw a fit.

When I had a connection, the time required to rebuild was heavily contingent on the quality of my internet connection.

Even with a blazingly fast connection, all those API round-trips started adding up pretty quickly.

Which left me with the following indicative time for rebuilding (time jekyll build) all 817 entries containing 124 individual Flickr images (generated on my current and frankly terrible 3.4Mbs ADSL+ connection):

real	3m46.577s
user	2m23.729s
sys     0m1.891s

After stripping out all those handy liquid tags and replacing them with old-school image tags, then deleting the flickr_photo.rb plugin file, my generation times are now down to this:

real	0m16.786s
user	0m14.381s
sys	0m2.372s

Quite a difference.

Want to read some more? Head over to the archive