Overview for 'development'

Using MailHog via Docker for testing email

Written by Rob Allen / Original link on Oct. 21, 2020

I recently needed to modify the emails that a client project sends out. It was set up to send via SMTP and so the easiest way to do this for me was to add a local MailHog instance and point the application at it.Manually running via DockerThe quickest and easiest way to do this is via Docker.Manual…

Recursive PHP lint

Written by Rob Allen / Original link on Aug. 13, 2020

There are many scripts that recursively execute php -l on a set of files or directories. This is mine:#!/usr/bin/env bashset -o nounset# Recursively call `php -l` over the specified directories/filesif [ -z "$1" ] ; then printf 'Usage: %s ...\n' "$(basename "$0")" exit 1fiERROR=falseSAVEIFS=…

Extracting the base name of a file in Bash

Written by Rob Allen / Original link on Jun. 5, 2019

I have a handy bash script that transcodes videos using Don Meton's video_transcoding tools. This script was written in a hurry and one limitation it had was that it re-transcoded any source file even if the output file already existed.The script looked like this:#!/usr/bin/env bashreadonly source_…