Pragmatism in the real world

Moving a Perforce P4 P4ROOT to a different drive

On one of my servers here, I run a local Perforce P4 server for my son. He's a game developer and as they use P4 at work, he wanted to learn it in a sandbox and to have somewhere familiar to put his own work. Installation onto Ubuntu was easy enough and I provided access outside of our local network via Tailscale and all was well. Recently, I was doing some admin-stuff on the server… continue reading.

Internet Speedtest from the command line

We recently changed ISP to Aquiss who could not have been more helpful with pre-sales and support for the change over from BT Internet. Aquiss do not provide a router, so I removed the BT Smart Hub and put in a Ubiquity UCG-Max and connected it up to my existing AC Pro Ubiquiti access points. Obviously as it was a new provider, I tested the speed with WiFiman on my phone and was surprised that… continue reading.

Running DisplayLink Manager on Mac without the purple icon

I recently acquired an Elgato Prompter which acts as an additional screen on my Mac. It does this using DisplayLink and the DisplayLink Manager app needs to be running. A new security feature of the newer macOS versions is that when your screen is being recorded, an icon is displayed in your menu bar. It looks like this and cannot be disabled: Certainly unmissable! This icon is displayed nearly all the time DisplayLink Manager is… continue reading.

UUID v7

It's common to use a UUID when you need a primary key for your database records. Unlike incrementing numeric keys, it has the advantage that it's not tied to a specific database instance and can be created before insertion into the database. Usually, people use version 4 UUIDs, which contains a lot of randomness to ensure that it's going to be unique and not clash with any other id. Recently, I became aware of version… continue reading.

Creating montages with ImageMagick

When creating my Year in Pictures post I decided that I wanted a montage of all the photos I had taken. In previous years, I've done this by taking a screenshot in an application where I try to set the zoom level correctly to get something acceptable. This time, I decided to do it properly and guessed that ImageMagick could help. After googling, I came up with this process: Export all images from Photos into… 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.

Installing Xdebug on PHP 8.1 installed with Homebrew

I have recently set up a new M2 MacBook Air and as usual, installed Homebrew and then installed PHP. Homebrew is always up to date, so it installed PHP 8.1 for me. Again, as usual, I installed Xdebug using pecl install xdebug. This whirrs and clicks for a while downloading and compiling the xdebug.so and then fails with: rob@ardent ~ $ pecl install xdebug downloading xdebug-3.1.5.tgz … Starting to download xdebug-3.1.5.tgz (232,070 bytes) … Build… continue reading.

BBEdit Hosts File Syntax Highlighting

While editing my Hosts file in BBEdit, I wondered how hard it would be to create syntax highlighting for it. A quick google later, I discovered that I needed to create a Codeless Language Module and this is my first attempt: To install, download Hosts.plist and copy to your iCloud Drive's BBEdit/Application Support/Language Modules directory, restart BBEdit and you're done. I've kept it really simple and just highlight comments and the IP address, but it… continue reading.

OpenConnect on Mac

One of my clients has recently moved to AnyConnect VPN and I've been having routing problems with the official Mac client. As my colleagues on Linux on the project have not had these issues, I investigated and installed the OpenConnect client. These are my notes after scouring the Internet to set it up how I want it. Installation I used Homebrew: $ brew install openconnect OpenConnect is a CLI tool. If you want a GUI… continue reading.