Skip to Content

Blog posts

Writing about code, systems and online technology.

  • Posted on

    Restart dnsmasq without sudo

    In one of my previous posts we discussed setting up dnsmasq to manage local domain names for development or testing purposes on your macOS machine. This makes it easier to manage these domains but you still need to restart the service with sudo after making changes.

  • 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?