OpCache and symlink-based deployments

PHP 5.5 introduced an alternative opcode cache, OpCache, which replaces the APC extension. It's great - for one thing it's only trying to be an opcode cache and not a key-value store as well, and it's apparently more stable and easier to maintain. It does however cause a hiccup…

Laravel on Docker

Recently I've been looking at involving Docker containers into running a few Laravel applications - possibly removing provisioning and deployment scripts from the process completely. I'm going to record some notes on my learning here (work in progress). Dokku Dokku is an application that leverages Docker to provide a self-hosted…

Re-organising Laravel applications with PSR-4

I find the initial Laravel project structure quite approachable: app/ commands/ config/ controllers/ database/ models/ storage/ tests/ views/ However, as your application grows, you'll likely find it difficult to structure without namespaces. Larger applications typically end up with a structure like so: app/ commands/ config/ controllers/ database/ MyApp/ Models/ Repositories…

Synchronised Christmas lights

For the past few years I've usually had a stab at making something with the Cheerlights API - a Thingspeak service that watches tweets hashtagged #cheerlights and extracts the latest colour tweeted. You can then use this to synchronise your lights with others around the world and let others control…

Fitbit designer Gadi Amit on the future of wearable technology

Assertions in Ansible

You can emulate assertions in Ansible using a combination of registers, the fail module and when directive: - name: get installed version # Get first two version numbers (major.minor) shell: node -v | sed -rne "s/^v([0-9]\.[0-9]+).*/\1/p" register: node_version - fail: "Node should be version 0…