Wake up, little sunshine

I prompted ChatGPT with: “Write a song I can sing to my son to get him awake and moving to get ready for school.”

It replied with:

Verse 1
Wake up, little sunshine
There’s a new day dawning
You’ve got a big adventure
It’s time to get moving

Chorus
Rise and shine, let’s go to school
Time to learn, time to grow
Put on your shoes, grab your bag
You’re ready to go

Verse 2
Stretch out your arms and legs
Take a deep breath and smile
You’ll make new friends today
And learn so much in a while

Chorus
Rise and shine, let’s go to school
Time to learn, time to grow
Put on your shoes, grab your bag
You’re ready to go

Bridge
The world is waiting for you
To see all that you can do
So let’s start this day together
And make it great, no matter the weather

Chorus
Rise and shine, let’s go to school
Time to learn, time to grow
Put on your shoes, grab your bag
You’re ready to go

Outro
Wake up, little sunshine
It’s time to start your day
With a bright new adventure
You’ll find your own way.

Said son, who is 15, seemed to appreciate me waking him up by belting this out in full operatic tenor. I’m almost sure of it, despite any shouting to the contrary.

The Internet is a rough neighborhood

This week I stood up a new firewall in front of my home network. This one has much better logging than the old one, and I’ve been watching the block reports.

A screenshot of blocked inbound connection attempts, originating from all over the world.

Real talk, friends: DO. NOT. expose a machine to the open Internet unless you’re 100% confident it’s bulletproof.

“I run my service on a custom port!” Doesn’t matter.

“I use IPv6!” Doesn’t matter.

“I’m just a nobody!” Doesn’t matter.

Practice safer networking, every time, all the time.

Integrate Things with Focus

I use the Things task manager to keep track of what I need to do. I use the Focus pomodoro timer to help myself focus on a task that I’m actively working on.

Focus integrates well with another task manager, OmniFocus: you can drag an action from OmniFocus into Focus to create a task to work on, and that task will have a button that links back to the original OmniFocus action. Super convenient! It doesn’t play well with Things, though. If you try the same process, you’ll end up with multiple separate actions for each of the Things to-do’s various properties.

For example, this to-do has the title, note, checklist, tags, when, and deadline options filled in:

A Things to-do with lots of options set

Dragging it to Focus creates a whole mess of random tasks:

Focus with 8 unrelated tasks

That’s not helpful. We can do better.

First, I wrote a shortcut using Things’s shiny new Shortcuts actions. For each to-do currently selected in Things, it uses Focus’s URL scheme to create a Focus task with the item’s title, notes, and due date, and a link back to the item in Things.

Second, I made a Keyboard Maestro hot key macro, available only in Things, that executes my shortcut. When I select the to-do item above and press “option-F”, I get one single task with all the details set:

Focus with 1 well-configured task

If I click the link icon next to the task’s title, Things opens with that to-do selected.

Ta-da! The workflow is slightly different than with OmniFocus, but only a little bit, and the result is just as useful.

Apple won't totally block unwanted emails

Apple’s email apps and services don’t allow users to completely block senders. If someone is sending you messages you don’t want to receive, tough. You’re going to get them.

The iCloud.com website’s Mail app doesn’t have a sender block mechanism. Instead, it offers a way to create rules based on each message’s attributes, such as its sender. Rules support these actions:

  • Move to Folder
  • Move to Trash
  • Forward to
  • Mark as Read
  • Move to Folder and Mark as Read
  • Move to Trash and Mark as Read
  • Forward to an Email Address and Mark as Read

None of those actions are the same as bouncing or silently discarding an email. At most, you can have the email sent to your Trash folder.

Mail.app on a Mac allows you to mark senders as “blocked”. You can configure Mail.app’s junk mail filters to either “Mark [their message] as blocked mail, but leave it in my Inbox” or “Move it to the Trash”. Again, you can’t bounce or discard it.

I tried to be clever and write an AppleScript program to delete messages from my Mac’s Trash folder. That was a dead end because AppleScript’s idea of deleting an email is moving it to Trash, even if it’s already in there. Neither does it offer a way to automatically empty the trash.

Apple, this is disappointing. If I’m blocking someone, I don’t want to hear from them at all, ever. It’s not enough to send their messages to the Trash folder. I don’t want them to be in my email account at all.

A Boston Terrier Married a Cat

I prompted ChatGPT: “Write a Shakespearean sonnet about a Boston terrier marrying a cat.”

It replied:

“Oh, wondrous sight! A terrier and cat
In love, declaring bonds that none can break
Though some may scoff, and others may bark flat
Their love is true, not just a mere mistake

The terrier, bold and loyal as can be
Protects his feline bride with all his might
And she, with purrs and nuzzles, shows with glee
That this odd couple won’t give up the fight

They nap together, groom each other’s fur
And playfully chase one another around
To some, their pairing might seem quite absurd
But their love for each other knows no bound

So let them wed, and let their love be strong
For true love, no matter who, can’t be wrong”

Our inevitable robot overlords can write delightful poetry. We’re in trouble.

Easily copy file contents with ForkLift

I use the ForkLift 3 file manager on my Mac. Part of my job involves copying-and-pasting the contents of various files into web forms. I made a trivial little shell script so ForkLift can help me:

#!/bin/sh

if [ ${#@} -ne 1 ]; then
    echo "Expected exactly 1 filename."
    exit -1
fi   

pbcopy < $1

Then I created a new “Tool” called “Contents to Clipboard” that calls the script with the name of the selected file.

/Users/me/bin/copy_contents.sh $SOURCE_SELECTION_PATHS

Now I can select a file, select the Commands > Contents to Clipboard menu, and voila! The file’s contents are ready to be pasted into another app.

Recovering a Raspberry Pi password on an M1 Mac

I would never accidentally change my Raspberry Pi’s account password before clicking “save” in my password manager, therefore locking myself out. But let’s say, hypothetically, that I did. How would I get back into my account?

The process would look like:

  • Power off the Raspberry Pi.
  • Eject its SD card.
  • Put the SD card in my M1 Mac.
  • Magically replace the Pi’s /etc/shadow file with the previous /etc/shadow- version, undoing the password change.
  • Put the SD card back in my Pi.
  • Power up, log in, and pat myself on the back.

Hypothetically, that magic bit could be a pain in the neck.

False start #1: ext4fuse

The relevant part of the Pi’s SD card is formatted with the ext4 filesystem. macOS doesn’t natively support ext4, and I’d need to install software so that I could access and edit the files on the card.

First, I’d install the open source ext4fuse program and navigate to the Pi’s /etc directory. Only then would I realize that ext4fuse is a read-only filesystem and doesn’t support writing at all.

False start #2: extFS for Mac

If the open source option didn’t work, I’d try the paid extFS for Mac filesystem and use its trial offer to do the work.

After installation, I’d discover that something in the way that the Pi formats its SD card prevents extFS from mounting it.

False start #3: run Debian in a VirtualBox VM

I bet by then I’d give up on mounting the filesystem inside macOS, and accept that it’d be easier to do the work inside a Linux VM. I’d likely hold my nose and download Oracle’s VirtualBox. Bummer that it doesn’t work well on M1 Macs yet, which I’d learn would cause the Debian installer to reboot every couple of minutes.

Success at last: Parallels Desktop

After trying and ruling out everything else, I’d probably try the trial version of Parallels Desktop. I’d use it to install Debian, then go to the Devices > USB & Bluetooth > Apple SDXC Reader Media (disk6) menu to mount the Pi’s SD card inside the VM. Then I’d open the VM’s Terminal app and run:

cd /media/parallels/root/etc
sudo mv shadow shadow.bak
sudo cp shadow- shadow

Finally, I’d go into the VM’s Files app and unmount the “boot”, “root”, and “SETTINGS” disks.

Crossing my fingers

After all that, I’d pop the card out, stick it back in the Raspberry Pi, boot it, log in via SSH, and run sudo -s. At the password prompt, I’d type my original password (as stored in my password manager), then exhale in relief as I was once again able to log in.

That is, if I were to lock myself out in the first place. Which I never would. Because I’m a professional.

I watched the Tyre Nichols video

I watched the Tyre Nichols video. I didn’t want to because I knew what it was going to contain and dreaded the idea of seeing it, but I felt obligated to. A man died at the hands of the authorities, and as a citizen, I should witness what our government is doing. Even if — especially if — that government is accused of committing horrible acts.

I’m not glad I saw it. I wish I could un-see it. I don’t resent anyone else who doesn’t want to see it. There’s no lesser way to describe it: Demetrius Haley, Tadarrius Bean, Emmitt Martin III, Desmond Mills Jr., and Justin Smith murdered Nichols. Yes, he initially ran from the traffic stop. He should not have done that. But running from a traffic stop is not and should not be a capital offense that warrants the death penalty. After the officers had him safely detained, they proceeded to tase, pepper spray, kick, punch, and use a baton to beat him to death while he called for his mom. Anyone who claims to have seen that video and says that he deserved it or defends the officers’ actions in any way is either lying about seeing it, an irredeemable bootlicker, or a sociopath.

I grew up with the privilege of not fearing the police. Sure, I didn’t want them around if I was getting up to mischief, but I believed the worst that could happen was that they’d catch me and a court would punish me for it. Nichols didn’t have that privilege. He was right to be afraid of his police, and although it’s easy for me to say that he shouldn’t have run from them, it turned out that his fears were justified.