July 20, 2025

Shake and Fold

My bookmarking service tells me that I saved this video in April 2016. I’m not joking one bit when I tell you that I have thought of this video every single time I have washed my hands in a bathroom with paper towels. Give it a watch, it’s a quick 4 minutes.

“You will, for the rest of your life, remember those words every time you pick up a paper towel.”

June 17, 2025

How to pause an Apple Swim Workout

I lap swam a handful of times last summer at our local outdoor pool, and my goal is to get there at least 3 days a week this year. This is mostly a note for my future self:

To pause a Swim Workout, Apple says “press the Digital Crown and side button at the same time”.

June 24, 2024

Launch PS Remote Play with Controller on macOS

Here is a simple way to use the “PS” button on a Playstation controller to launch the PS Remote Play app on macOS. This requires Keyboard Maestro.

First you must disable the “Press Home button to open Launchpad” setting. This is on by default after you pair a controller to macOS. You can find it in System Settings -> Game Controllers. Turn this off. Now when you press the PS button on your paired controller, nothing should happen.

Read more

January 12, 2024

Using Bartender to only display Wireguard icon if connected to VPN

Intro

I don’t remember if I figured this out myself or found the suggestion elsewhere, but I just searched and couldn’t find anything online so I decided to document this neat trick.

I use Bartender on all my Macs to clean up my Menu Bar. However I missed being able to glance up and look at the Wireguard icon to tell if I was connected to a Wireguard VPN or not. Bartender has a “Triggers” feature that makes it possible to show certain menu bar icons based on the output of a shell script.

Read more

November 10, 2023

Routing Wireguard networks with OSPF on Linux

I have a couple of Linux servers whose main purpose is to serve as a Wireguard server. The peers on these servers are a combination of pure clients (like a mobile phone or laptop) and more traditional site-to-site tunnel connections (like a router at a remote location). The site-to-site connections usually are routing a remote network over the wireguard tunnel, something like a /24 network so you can access the far site’s local network.

Read more

November 3, 2023

Python script to retrieve DHCP leases from Palo Alto firewall

I have been using a Palo Alto PA-220 firewall for my home router for years. It is my DHCP server for my LAN. I often find myself needing to view the DHCP leases to see what IP address some random device (WLED, ESPHome devices, etc.) has. The web interface for the PA-220 is unbearably slow and the SSH CLI takes 30+ seconds after login to give me a prompt.

To speed up this task, I wrote this fairly simple script using python3. It uses the REST API that PAN-OS has to retrieve the DHCP leases. This script completes for me in less than 1 second. It outputs a JSON object. This works best for me as I find JSON to be humanly-readable and also allows me to pipe it to a utility like jq to filter it quickly.

Read more

August 20, 2023

Dresser drawer lighting

I realized today that the most used “smart home” project I have done is both 100% battery powered and not connected to WiFi or the internet at all. I added a light to my dresser drawers that turns on when the drawer is opened and off when it is closed, just like the inside your refrigator. The idea is so I can grab clothes in the morning without waking up my spouse by turning a bright light on. It’s been working every time I open my dresser for over 18 months now. It is a very simple idea but I had never seen it done before, so here is a quick run-down of how I made it work.

Read more

August 17, 2023

Control Palo Alto GlobalProtect VPN using AppleScript

I know it’s a little strange to still be writing AppleScript in 2023, but this was the best way I found to easily connect and disconnect from a GlobalProtect VPN “automatically”. I trigger this from a Keyboard Maestro shortcut, you are free to trigger it any way you wish!

This is a simple script that will toggle the connect/disconnect state of GlobalProtect on macOS. Tested with the latest version of GlobalProtect (v6.2.0-89) and macOS Ventura (13.4.1).

Read more