A simple HTTPS proxy with Nginx on Docker

19 May 2016

There are many reasons why you might need to develop behind an HTTPS proxy, for example when testing integrations which behave differently based on the security of your site. This post describes how to add an nginx proxy to your docker setup.

Read more 4 minute read

Faster dependencies with Docker

28 Apr 2016

Docker is great for building portable applications, modelling complex environments locally, and helping us bridge the gap between development and production, but installing your Bundler, Bower, NPM, Maven (and so on) dependencies can make builds slow. This post explains how to speed up your builds by seeding the image with most of your dependencies, so subsequent builds aren’t hampered by the ‘all-or-nothing’ approach to updating dependencies.

Read more 6 minute read

Migrating user avatars to circular crops, with ImageMagick

05 Sep 2015

Edit (2019-04-23): Updated to replace compose_opacity with DstIn to preserve source image transparency. Thanks Chen Han!

Picture the scene: you have a few thousand users with avatars on your site. You want to change from a boring 4x3 photo to a cool and hip circular crop. You know it’ll look great for new users, but we don’t want to leave the existing ones behind.

Read more 3 minute read

Kitematic for boot2docker users

28 Aug 2015

A while ago I switched from using boot2docker directly to the Kitematic Mac app. Although Kitematic generally makes life a bit easier when managing Docker containers, it was a bit of a pain to get it running.

After the Kitematic installation, the VM started but Kitematic had trouble connecting to it. The error messages showed boot2docker paths so I made the assumption they’d got in a tangle. Uninstalling boot2docker didn’t entirely solve the problem, as…

Read more 1 minute read

Constraining width for LabKey WebParts and Views

16 Jun 2015

Building custom web views within LabKey is pretty straightforward, but if you find yourself needing to constrain the contents of your module horizontally you’ll quickly find that the surrounding tables will gladly stretch to any width. Fortunately restricting the width of hte container is pretty straightforward.

TL;DR: Wrap your contents in a table with table-layout: fixed; width: 100% and the contents won’t push the surrounding page to wider than the browser window.

Read more 1 minute read

Hi, I'm Ryan

I care about code, building great teams and the community. I run Slate Horse but I'm still a full-stack developer. Previously co-organiser of JSOxford and OxRUG.

Get in touch