Overview for 'roballen'

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=…

Converting JSON to a struct in Go

Written by Rob Allen / Original link on Jun. 3, 2020

I'm in the process of writing a little command line app in Go that uploads images to Flickr. It's called Rodeo and it's working well as a project with which to learn Go in 2020.Rodeo uses ExifTool to interrogate an image file for meta data. ExifTool is wonderful and very comprehensive and with the…

Validating default PHP session ID values

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

I recently needed to validate the value created by PHP for its session ID. After a bit of research, I realised that there are two interesting php.ini config settings that relate to this value:session.sid_length is the number of characters in the IDsession.sid_bits_per_character controls the set of…