Posts

  • How to easily contribute to your composer dependencies

    Sometimes you find an issue with one of your composer dependencies. You’d like ot fix it, but it can be difficult to test the changes within the context of your application because you have to constantly push to your fork and run another composer update.

  • BrisPHP News - Q2 2018

    I co-organise the BrisPHP Meetup and at the start of every meetup I give a quick talk on recent news and other interesting things that have been happening in the PHP world. Here are the things I found intersting in the second quater of 2018.

  • Make PhpStom automatically reload files from disk

    I often have an issue with PhpStorm where I switch to a terminal and run some commands which change files (ie. php-cs-fixer, git pull, etc), then when I go back into PhpStorm and continue editing I’m presented with this “Changes have been made in memory and on disk” dialog:

  • Parsing flags in bash scripts

    I’m very lazy. I don’t like to do things more than once. So, when I have to run a command a lot when developing (for example, to clear the cache, update the database or install dependencies), I will often write a bash alias for it so that I have less keys to press. However, sometimes these shortcuts I have are useful to the rest of my team, in which case I’ll put them in a Makefile, so that everyone can benefit and also update them. However, sometimes you need parameters being passed into the command which gets difficult with a Makefile, so I move onto a bash script.

  • Setting up HTTPS redirects behind an AWS load balancer

    The easiest way I’ve found to set up https is by creating a free https certificate with AWS Certificate Manager and adding it a load balancer. You then put a webserver behind the load balancer listening on http port 80 (because the load balancer terminates the https connection).

  • How to reuse packer builders

    When I’m setting up a new web app, I like to use packer to bake an AMI with everything required to run the app. Then I use some other tool to deploy the latest code changes to each instance.

  • BrisPHP News - 1 March 2018

    I co-organise the BrisPHP Meetup and at the start of every meetup I give a quick talk on recent news and other interesting things that have been happening in the PHP world. Here are the things I found intersting in the first quater of 2018.

  • Terraform refuses to destroy RDS instance without a snapshot

    Recently I created an RDS instance for testing using Terraform. Since it’s just for testing, I didn’t want to store a final snapshot when I destroyed the instance. However, when I ran terraform destroy I presented with an error:

  • How to fully support MySQL UTF-8 with RDS and Doctrine

    If you’re reading this it’s probably because you’ve realised that MySQL’s utf8 encoding isn’t really UTF-8, despite what it says on the packet. The reason behind is because UTF-8 stores characters with anywhere between 1 and 4 bytes, depending on the character. MySQL’s bodged up form of UTF-8 can only use 1 to 3 characters. There’s a bunch more detail about this which you can read about in the links posted at the end.

  • How to setup a Jekyll powered GitHub Pages blog

    I finally got around to creating a Jekyll powered blog running on GitHub pages, and it was much easier than I thought. There are only a few steps involved:

subscribe via RSS