Skip to Content

Blog posts

Writing about code, systems and online technology.

  • Posted on

    Using anonymous classes to test PHP traits

    Since the release of PHP 5.4, traits have become a standard part of the language. They’re a great way to introduce reusable methods without having to rely on inheritance. But how can we test its methods if it’s not possible to instantiate a trait?

  • Posted on

    Installing OpenVPN 2.4.6 on Ubuntu 18.04

    I was running an OpenVPN 2.4.6 server on an Ubuntu 14.04 (Trusty) machine which needed to be upgraded to Ubuntu 18.04 (Bionic). I previously installed it on Trusty using the official OpenVPN repositories but that didn’t support the Bionic release at the time of writing.

  • Posted on

    Make your life easier with Git aliases

    If there is one tool I’m constantly using throughout the day, it must be Git! Since most of the commands I need are basically the same, I’ve created some Git aliases to reduce the number of keystrokes.