Dynamically setting an image as the header image on a WordPress theme

I'm working on an interesting project using a Raspberry Pi Zero W computer with the Pi Camera module. Basically the idea is to take scheduled periodic photos via the Pi Zero and camera and then upload them to a WordPress site and then set the latest photo as the Header Image.

There was one thing that took me a little while to figure out and that was how to set the desired image as the header image in WordPress, I struggled to find anything whilst Googling so I thought I'd quickly write up a post about it.

Read the full post 'Dynamically setting an image as the...'

Digital Ocean

Dreamweaver CC Public Beta

Adobe have just opened up a public beta of a revamped version of Dreamweaver offering a lot of improvements and useful features for modern web development. 

Dreamweaver's had it's share of flack over the years and not all unwarranted, but this new beta looks to shed some of the baggage of its 19 year history with a refreshed user interface and a new code editor based on the Brackets codebase. For someone like me who spends most of the time in code view (and who has split their time between Brackets and Dreamweaver for the last year or so) there's some nice new features in there that make it a more compelling environment for code-first users.

Read the full post 'Dreamweaver CC Public Beta...'

Solution for long JavaScript build times using Gulp and Foundation 6

I have been working more and more with build tools in my web development process over the last year and I've found a Gulp based workflow with the recently launched Foundation 6 works great and I've been gradually getting my head around the whole process.

One issue that had been plaguing me a bit was the speed of build times, in particular JavaScript compilation seemed really slow. Basically making a simple change to my app.js file was then resulting in anywhere from 16 - 30 seconds for the JavaScript task to finish and then a further delay before the changes were reloaded in the browser. Over the course of a day that was a whole load of time lost and was quite frustrating when trying to do a lot of frequent iterations to code.

Read the full post 'Solution for long JavaScript build ...'

Enabling Keyboard navigation in Safari

I use Safari as my primary development browser and I was working on a site recently which had a multi-step form which need to have the whole interface usable via the keyboard (ok, realistically all sites should be able to work this way but for this site it was a particular focus). Having been a long time Mac user I was familiar with the fact that you need to go into System Preferences -> Keyboard -> Shortcuts to enable the option for "All Controls" for Keyboard Access:

Read the full post 'Enabling Keyboard navigation in Saf...'

Cutting the TV cord

I've been a Sky customer for several years now and I've enjoyed the service overall, but as my (and many other's) viewing habits have changed I have watched less and less live TV broadcasts so the value of Sky's TV package to me has declined. I can't remember the last time I watched anything that wasn't either recorded via Sky+ or just viewed on demand from either Sky Movies / Sky on Demand, Netflix, Amazon Prime Video or Youtube.

As is usual every so often I looked around to see what would be the best value option for complete TV and Internet package, I checked with Sky to see what deals they'd offer, compared that with Virgin Media but in the end I found the best option was to 'cut the cord' as it were and not go with either of these traditional satellite or cable providers.

Read the full post 'Cutting the TV cord...'

Descent: Underground

I used to love playing the original Descent games back in the 1990's so I was pretty stoked to see this Kickstarter project for a prequel game.

If you've never played Descent then it's basically you in a spaceship flying around inside some mines inside a planet / asteroid, it can get quite disorientating as you can rotate in all directions but it was a great multi-player shoot-each-other LAN game :)

Read the full post 'Descent: Underground...'

Check Dropbox CLI / dropbox.py status via cron / bash script

I've been using the command line (CLI) version of Dropbox on my Centos 6.5 server as an offsite backup and it has been working well, the recent 1TB storage upgrade makes this a decent backup option.

One problem I've been having is that sometimes the Dropbox process seems to die, I tried several different scripts to keep track of the status of dropbox via the dropbox.py python scripts but I eventually found this bash script to work. I've set it as an hourly cron job in /etc/cron.hourly and it's working well so far.

Read the full post 'Check Dropbox CLI / dropbox.py stat...'

Hide WordPress Toolbar for a specific page template

For a project I was working on recently I was using a simplified version of the single page template in order to load specific pieces of content into iframes within a plugin page in the WordPress Admin. This was so I could preview the arrangement of the content in the page layout using a custom layout tool I created.

One of the first things I usually do when creating an account in WordPress is to disable the Toolbar in my user profile so that it doesn't get in the way when trying to work on the layout of the site. So on this current site the page content I was loading into the iframes looked fine, however, whilst previewing it on someone else's WordPress account which did not have the Toolbar disabled I realised that each one of my iframes had the toolbar showing and was then pushing the iframe content down.

Read the full post 'Hide WordPress Toolbar for a specif...'

An Illustrated History of Mac OS X

The maker of the popular Git client for mac Tower have created a great illustrated history of OSX which gives a potted history of how OSX has progressed over the past 14 years of development.

My first ever titanium PowerBook laptop came with Mac OSX 10.1 Puma on it, there's quite a difference in aesthetic from those days to now!

Read the full post 'An Illustrated History of Mac OS X...'

Animated gif of XKCD's Philae probe Comet Landing cartoon

XKCD's daily cartoon covered the Rosetta / Philae comet landing that took place on 12 November 2014 with a great continously updating cartoon throughout the day.

As all of XKCD's cartoons are available under a Creative Commons licence I thought it would be good to make an animated gif of all of the frames, so here it is:

Read the full post 'Animated gif of XKCD's Philae probe...'

Digital Ocean