Deploying PHP Workers to AWS Elastic Beanstalk

Elastic Beanstalk Logo

AWS Elastic Beanstalk (EB) is an AWS service that lets you automatically deploy load balanced PHP applications to EC2. One of the lesser know features is the ability to setup EB as a worker to handle long running or computationally intensive tasks (Think image processing/bulk mail sending etc.). EB Workers listen to a SQS queue and automatically run any jobs you put onto the queue. In this post I'll show you how to setup your own EB PHP worker.

Read More

Multiple Twig Template Folders with Slim Framework

This post is more for my own records than anything else as I couldn't find this information anywhere on the internet.

I have a Slim Framework application that uses Twig for it's templates. I wanted to initiate the Twig instance in my bootstrap file, but then to dynamically update the template directory within my class files depending on the request. It took me a while to figure out how to set Slim to look in multiple directories, or to change the template directory altogether, to render a view.

Read More

DIY GoPro Grenade Grip

DIY GoPro Grenade Grip

I had a few GoPro parts laying around so I make myself a DIY GoPro Grenade Grip. The grip is rubberised so it provides good drip in dry and wet conditions.

Read More

XKCD's "Now" Coded in JavaScript

I love XKCD's web comics, they always give you a new way of looking at something and a laugh to boot. Yesterday at work I came accross the Now comic. It shows you at a glance what countries are in business hours, or outside them. The image is rendered on the XKCD server and updated every hour when you refresh your page.

Read More