rss2
Rob Allen
akrabat.com · American English
An article by Rob Allen
rss2 wordpress content slash wfw atom dc sy
- Last post
- Jun 30, 2026
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 0
- Our last check
- Answering
- Served from
- Germany
- Site title
- Opening Sublime Text from the command line
- Text score at discovery
- 3,589
- Format
- rss2
- Features in the feed
- content, slash, wfw, atom, dc, sy
- Community
- wordpress
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- Opening Sublime Text from the command line
Jun 30, 2026 · original
I nearly always open Sublime Text from the command line using subl and have specific requirements for when it should open a new window or re-use one. If I'm opening a directory, then I would like it to re-use the same window if I have previously opened that directory. However if I open a random file, I never want that file in the last directory window as it's unrelated. To do this I wrote a simple bash function: # subl: wrapper that opens files in a new window, and reuses the window # for directories subl() { local args=() opts=() for a in "$@"; do if [[ "$a" == -* ]]; then opts+=("$a") else args+=("$a") fi done # No path argument means the current directory [[ ${#args[@]} -eq 0 ]] && args=(.) if [[ ${#args[@]} -eq 1 && -d "${args[0]}" ]]; then # Single directory: open in same window command subl "${opts[@]}" "${args[0]}" else # File(s): so open in a new window command subl -n "${opts[@] - Fixing two minor git irritations in my OSS fork workflow
May 26, 2026 · original
For OSS work, I work with two git remotes: upstream : the canonical OSS project repository, where main is the default branch and is what gets released. origin : a personal fork. All my feature branches live here. I set up locally like this: Fork the project repo to my account. Clone my fork locally, so the origin remote is my fork. Set an upstream remote using git remote add upstream ssh-url . and then when working on something, I tend to do these steps: Switch to the main branch with git switch main . git pull from upstream to pick up the latest code. Create a new feature branch from main using git switch -c branch . Do work, then commit and push the feature branch to origin . Open a PR from origin/branch against upstream/main (usually using gh ). Once merged upstream, pull from upstream back into my local main branch and delete my feature branch. The problems I have a couple of little - Create an HTML version of an OpenAPI spec
Mar 17, 2026 · original
I have a new project where we will be integrating with a third party API that is currently being written. Due to Conway's Law, we are being sent new versions of the OpenAPI spec as a set of JSON files via email. I quite like seeing the HTML rendering of an OpenAPI spec when reading it and understanding it, so I knocked up a simple shell script that takes an OpenAPI spec file and outputs an HTML doc. This is a trivial task thanks to Scalar ! This is the script: ~/bin/create-openapi-spec-doc.sh: #!/usr/bin/env bash set -eo pipefail if [[ $# -eq 0 ]]; then echo "Usage: $(basename "$0") spec-file [spec-file ...]" echo "Generates an HTML API reference document for each OpenAPI spec file provided." exit 1 fi for spec_file in "$@"; do base="${spec_file%.*}" spec_name="$(basename "$base")" { cat EOF !doctype html html head title${spec_name} API/title meta charset="utf-8" / meta name="viewport" c - PHPStan custom rules
Mar 3, 2026 · original
Recently I discovered that this code passed our PHPStan level 10 checks: use http\Exception\InvalidArgumentException; // ... throw new InvalidArgumentException; I was surprised as http\Exception\InvalidArgumentException is not a class in our system. While cooling, I discovered that there's an http PHP extension and it appears that PHPStan has a stub for this which means that it accepts it as existing even if it doesn't. What we think happened is that I wrote throw new InvalidArgumentException; and selected the wrong class from the dropdown in PHPStorm as I wanted to import the base InvalidArgumentExtension I want PHPStan to fail in this case, so I wrote a PHPStan extension that calls class_exists() to ensure that the class really is available: ?php declare(strict_types=1); namespace Laminar\PHPStan\Rules; use PhpParser\Node; use PhpParser\Node\Stmt\Use_; use PHPStan\Analyser\Scope; use P - Feelings
Feb 27, 2026 · original
Today has been a struggle entirely due to my own internal negative thoughts and feelings about impacting events that are outside my control. Navigating this to come out stronger rather than letting it consume my self-belief and confidence isn’t easy, especially at the time. I’m not worse at my job and my abilities haven’t diminished, but sometimes it’s hard to remember this. I need to give myself space to remember who I am and internalise that my emotions are valid, but not the whole truth. Introspection and understanding of the whole is important. Onwards and upwards. - Dad
Jan 22, 2026 · original
I don't often post personal things here, however last weekend my dad died peacefully in his sleep and it feels important to acknowledge this. I have no words. - 2025 in pictures
Dec 31, 2025 · original
As we reach the end of 2025, I take this opportunity to look back over the photos that I have taken and thing about the year. This year I published 1,064 photos to Flickr with, of course, at least one photo every day as part of my Project 365 . The lovely thing is that my photos remind me what happened during my year and I remember many good times through them as I've seen friends and family over the months. I've done for many years now and you can see them all in my Year in pictures category. January I started the year visiting the Severn Valley Railway and took some photos of steam trains. I also visited PHP Stoke which was fun. February I attended three community events in February, starting with FOSDEM at the very start, PHP UK mid-way through, and then Fusion towards the end. I really like catching up with the community and learning from them in the hallway track! I also photographe - IPTC export changed in Photos for macOS 26 Tahoe
Nov 11, 2025 · original
I've recently upgraded my MacBook Air to macOS 26 Tahoe and one thing I noticed was that Rodeo 's rules were no longer working. With the help of exiftool , I worked out that when exporting to JPEG from Photos for macOS 26 Tahoe, the Object Name , Caption-Abstract and Keywords IPRC properties were no longer being populated. This is a regression from macOS 15 Sequoia. This is the data from exiftool . Output from macOS 15 Sequoia: $ exiftool -f -ObjectName -Caption-Abstract -Keywords IMG_8016.jpeg Object Name : Replaced the broken nose pad on my glasses Caption-Abstract : It's a nuisance when the nosepad breaks! Keywords : glasses, Project 365, 365:2025 Output from macOS 26.1: $ exiftool -f -ObjectName -Caption-Abstract -Keywords IMG_8016.jpeg Object Name : - Caption-Abstract : - Keywords : - This is obviously, less than helpful if your application reads these fields! Fortunately, the expor - Appending text to Obsidan via Shortcuts
Oct 14, 2025 · original
Sometimes it's helpful to add some text to my current Obsidian daily note without having to switch to Obsidian, find the daily note and then type my text. To do this, we can use the magic of Obsidian's obsidian:// URI schema and automate the text capture in Apple Shortcuts, with an assigned keyboard shortcut to activate it. This is the Shortcut: There's a number of steps in the Shortcut. Firstly we Ask For some text which will display a dialog box for us to type in. Then we Replace any trailing whitespace, add then use a Text action to prepend the current time as a third level heading. This is the text to be added, so we URL Encode it and use another Text action to create the full obsidian:// URI to be Open ed. The URI is: obsidian://daily?vault=General&append=1&content={URL Encoded Text} The daily endpoint only works if the Daily notes core plugin is enabled. We then need to specify whi - mac-volume: A CLI to control device volume
Oct 7, 2025 · original
I've set my Mac up such that video calls such as Zoom use the microphone and earphones attached to my Behringer UMC204HD , which all other audio plays through the my normal speakers which are the default. One issue I have with this is that it's quite hard to change the volume when a call as the volume buttons on the Mac are connected to the default output. This finally annoyed me enough that I looked into how to control the volume of a device and wrote a little command line utility for this, so that I could attach it to buttons on my StreamDeck using Keyboard Maestro . Changing the volume The way to control the volume on a Mac programmatically is to use Core Audio, specifically AudioObjectSetPropertyData() . This function takes a deviceID and some other properties, including volume . The deviceID is of type AudioDeviceID and the volume is a floating point number between 0 and 1 . It's no
Discovered by the rss-feed-index crawler, which checks each feed at most once a month.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_akrabat_com_e90abf2b28a0693b. More from this site: akrabat.com in the Feeds tab.