Pragmatism in the real world

2023 in pictures

As we finish 2023 and look forward to 20024, I have had an enjoyable time looking back at the photos I took throughout the year. As with the last 10 years, I have managed to take a least one photo every day as part of my Project 365, which allows me to remember what happened during this year of my life and reflect on the year as I usually do. January I like to start… continue reading.

index.md vs _index.md in Hugo

For years, 19ft.com has been a hand-built static HTML website with a smidgen of PHP to set things like dates and include a header and footer to each page. While I haven't yet redesigned it, it seemed prudent to move it to a static site generator before I did so and I chose Hugo, mainly because as a go CLI app, it had no dependencies to worry about. This is a really simple website with… continue reading.

Set a file's created date from YAML front matter in macOS

I have a set of Markdown files with YAML front matter that contains a created property containing the date that the file was created. Due to various machinations, the file creation date no longer matches this date, so I thought I'd fix this. Setting created date of a file On macOS, to change a file's creation date you use SetFile which is installed as part of Xcode. Irritatingly, it uses US format dates: SetFile -d… continue reading.

Getting a Bundle ID using an Alfred File Action

For some automation that I"m writing, I need to get the Bundle ID for some Mac applications. The easiest way to do this is with AppleScript: osascript -e 'id of app "{Application Name}"' This can easily be turned into a bash script such as `bundle-id-of` like this: #!/usr/bin/env bash osascript -e 'id of app "'"$1"'"' And we can now obtain the bundle id on the command line: Using Alfred As I'm lazy and don't want… continue reading.

Use ExifTool to remove private data in images

I'm a huge fan of ExifTool for manipulating EXIF data in images as it really is the Swiss Army knife for all things metadata related with images. Recently, I wanted to strip some privacy-related metadata from some photos; specifically location, people and keywords. That is, I wanted to keep the title, the camera settings, the creator, and so on, but remove information that pertains to people and place. This is the script that I wrote:… continue reading.

Counting the rows in a SQL Group By query

I recently needed count the number of rows in an SQL query that had a Group By clause. It looked something like this: SELECT account_name FROM events WHERE created_at >= CURDATE() – INTERVAL 3 MONTH GROUP BY account_id This provides a list of account names (28 in my case), but if you try to count them using: SELECT COUNT(account_name) as c FROM events WHERE created_at >= CURDATE() – INTERVAL 3 MONTH GROUP BY account_id You… continue reading.

Keep your iPhone passcode secret

TL;DR: If someone sees you enter your passcode on your phone and then steals your phone, they can lock you out of your Apple account, losing access to all your iCloud data, including photos. Treat your phone passcode as carefully as the secret it is. The problem I heard about "A Basic iPhone Feature Helps Criminals Steal Your Entire Digital Life" by Joanna Stern & Nicole Nguyen on The Talk Show and learnt something new.… continue reading.

PHPUK 2023

I have just returned from the 2023 edition of PHPUK and, as always, found it a valuable conference to catch up with the PHP community and find out what’s happening in the ecosystem. This year, I was accepted to speak on the differences between RPC, REST and GraphQL APIs and was surprised and gratified that the room was at full capacity. Thank you to everyone that attended; I hope that you learnt something useful. I… continue reading.

Successful SOC 2 Type II compliance

A very big part of my work at Covie for the last year has been putting in place the processes required for to achieve SOC 2 Type II compliance. This standard by the AICPA is all about an organisation's security, availability, processing integrity, privacy and confidentiality controls and processes. It's a comprehensive set of requirements covering our product's and organisation's security. Essentially, it shows that the company's processes and systems are designed to keep the… continue reading.