Aubrey Portwood
Senior WordPress Developer, Stoic, Girl-Dad², Tennis Player, INTJ,
Enneagram 1, & Vintage Computer Tinkerer — based in Albuquerque, NM.

Posts

My Review of Apple AirPods 4 w/ ANC

I’ll be returning the AirPods 4 tomorrow—not because they’re bad (they’re actually really impressive) but because of one key reason: comfort.

I guess I’ve grown used to the fit of my AirPods Pro 2, especially after switching away from silicone to foam tips. That change made them fit so much better, and I never worry about them coming loose. I fee like I could get into a boxing match and they would stay in! With the AirPods 4, however, I constantly feel like they could easily get knocked out of my ears—they are so light!—especially the right one, which often feels loose after extended use. They’re so lightweight that, after long periods, I also feel like they’re falling out, and I find myself trying to push them back in repeatedly. I also noticed some ear strain after wearing them for a while due to that.

That said, the ANC on the AirPods 4 is surprisingly good—probably about 75% as effective as the AirPods Pro 2 IMO. Sitting in a loud coffee shop, I had no complaints. My AirPods Pro 2 still have an edge, both in ANC performance and sound quality, but I was fine to put my AirPods Pro 2 away for the AirPods 4 w/ ANC. For sound, I’d compare the AirPods Pro 2 to HDR video—vibrant, rich, and deep—whereas the AirPods 4 feel more like a great display without HDR. They’re clear and balanced, but they lack the same depth and bass response. Still, they’re about 80% of the way there IMO, which is impressive.

One thing I did appreciate about the AirPods 4 is how much cleaner they stay compared to the AirPods Pro 2, which tend to get dirtier due to the in-ear tips. This is one reason I bought them, and wished I could have kept them for this. But bottom line—if you don’t like the in-ear fit of the AirPods Pro 2, the AirPods 4 with ANC are a fantastic alternative. But for me, the fit of the AirPods Pro 2 make them the better choice.

Excellence

I’m a perfectionist, and I know it. Ask anyone I know, and they’ll agree. But honestly, I’m not really that way. The thing about perfection is that it frustrates me. It’s a struggle, and it’s obsessive for me. That’s not healthy. However, I’ve heard many people, especially those I’ve worked with, tell me that “good is better than perfect.” I think that’s wrong, and that saying has always rubbed me the wrong way. While I think pursuing perfection is unhealthy, settling for just “good enough” also isn’t right.

Instead, I try to aim for something between good and perfect. After doing some word research, I was pleased to find that the word “excellence” is the right word for the place I am always aiming for.

Not good, not perfect, but excellent!

My experience disabling my wife and I’s Apple Photos Shared Library

My wife and I had used the Apple Photos Shared Library since its introduction in October 2022. After almost a year, we decided to turn it off—but Apple’s process for separating shared libraries between two people seemed anything but straightforward. Here’s how I managed to separate our libraries while keeping the photos we took intact.

Step One: Moving My Photos to My Personal Library

The first step was to move all photos I had contributed to the shared library back into my personal library. Here’s how I did it.

I opened a photo I had shared in Apple Photos on macOS, clicked the ( i ) button to view details, and selected Shared by You. Then, I selected all photos listed under Shared by You by clicking the first one, holding Shift, and selecting the last one to highlight everything. I right-clicked the selection and chose Move X items to Personal Library

Step Two: Handling Burst Photos and Syncing Issues

Syncing took over a day to complete fully. Numbers on every device were wonky and it went very slow.

Moving burst photos didn’t work as smoothly. I filtered the photos by typing “Burst” in the search bar, selected all burst photos, and hid them (in the hidden folder) temporarily—I could unhide later. Some photos that my wife had marked as favorites still showed up as favorited in my personal library though, so I had to go through and manually un-favorited these.

Gradually, I noticed the numbers going down in the shared library (sometimes it went up, but eventually went down), reflecting that my photos were syncing to my personal library on both macOS and iOS (iOS was much slower). This took a while, especially on our phones. Over a day! But eventually I stopped noticing any of my photos in our shared library, so all that was left was my wife’s.

Step Three: Leaving the Shared Library on My Wife’s iPhone

Once my photos were out of the shared library, I went to my wife’s iPhone and had her leave the shared library, opting to keep only the photos she had contributed. On my computer and phone I started to notice the shared library item count go down.

Step Four: Deleting the Shared Library

I let this go on overnight, eventually the shared library on my computer was empty, my photos seemed to have gone to my personal library (I didn’t have any of hers) and my wife’s had gone to hers (and she didn’t have any of mine). On our phones, it was a different story. I could tell photos in the shared library were going down, but it was slow. My wife’s personal library seemed to have finished, numbers on her phone were not going up or down and she no longer had a shared library option. 

Seeing the shared library empty on both my and my wife’s computers, and seeing her library intact, I decided to delete the shared library on my phone. I chose to keep any photos I’d contributed, which resulted in about 200 lingering photos that were likely due to syncing issues, I am not sure.

Within 30 minutes I no longer saw a shared library option on my phone or on my computer. My computer still has about 18k count while my phone has about 64k, but I am sure it will eventually sync up because it still says “Deleting Shared Library” near the sync area.

Conclusion

It appears that when you leave a library, you have the option to retain everything or only what you personally contributed. Similarly, when you delete a shared library, you can choose to keep only what you contributed. However, I had anticipated that when I deleted the shared library, I would only select my contributions. I was concerned that all the photos in the shared library (my wife’s) would be copied over because Apple states that this would occur if anyone was in the library for more than a week. Surprisingly, when I deleted the shared library, it seemed that my wife’s photos were not copied into my library after her leaving it. Instead, I only have what I personally contributed from what I can tell, not a copy of all her photos —so far. Therefore, I’m not entirely certain if the above process was necessary. I believe I could have simply had my wife leave the library on her phone, selecting to keep only what she contributed, and then deleted the library on mine, retaining what I had contributed. In this scenario, the outcome would have been the same —I think.

Apple needs to make this easier, I was dealing with 200k+ photos here and I’m still not sure if the magic that happens in the background of Apple Photos and iCloud is doing what it’s supposed to do. It should be instant when you leave a library and you shouldn’t be worried about all the photos your spouse contributed being copied to your personal library, you just want your photos—likewise for deleting a shared library. I get why anyone else wouldn’t trust doing this and feel stuck using shared library.

Continued…

1 hour later

It’s been about an hour or two later. It was strange because my computer displayed 63k photos (I know I don’t have that many), while my iPhone showed ~43k, and iCloud.com indicated about ~16k (16k seems accurate). So, I restarted the iCloud sync on both my computer and phone. My computer quickly caught up in about 10 minutes, reflecting the same numbers on iCloud.com. However, with my iPhone, this didn’t happen. Instead, it’s been gradually reducing the number of items, and it currently shows 31k. I’m not sure what’s being deleted (I’ve noticed a few of my wife’s photos in my library), but I assume it’s more of my wife’s photos. I’m not sure why they’re even there. On iCloud.com, I don’t see any of them. 

1 day later

My phone’s photo count (approximately 20k) is incorrect when synced with both iCloud.com and my computer (16k). I’m not sure why this is happening, but I’ll try turning off and then turning on my iPhone to see if that resolves the issue…

Later that night

So, the number of photos on my iPhone (approximately 20k) remained unchanged despite trying to turn syncing on and off. However, I noticed that many photos from my wife were still present in my library. I attempted to search for “Shared by X” again, and this time, I was able to view photos shared by my wife. It turned out that there were around 3,5k of photos, most of which had “no lens info” in the meta. Upon closer examination, I realized that these were indeed my wife’s photos that were still in my library. I deleted them. Once I did this, the number of photos in my iPhone library began to align with the approximately 16k number on iCloud.com and my computer.

How I use Apple Dictation and AI for better written communication

TLDR; I speak, AI writes.

There’s a new way AI has been helping me be more productive. I’m known as the “screencast guy” at work because I record a lot of my updates. To be honest, I’m not particularly skilled at crafting written content. I tend to work quickly, so quick screencasts have become my style. So I prefer to recording a screencast and using my voice and mouse to explain things quickly. But in the world I work in written content is super important. So, I’ve been using AI to help me overcome this problem.

It’s been quite simple. I even used it to write this post. I simply start Apple Dictation on my Mac and speak what I want to say.

Start Dictation option on macOS.

The textual output isn’t always amazing (as you will see below), but with the addition of Apple Intelligence, I can select that text and ask it to rewrite it. Usually, it makes it far more coherent written version. Of course, I’ll read it and make a few minor edits and additions here and there, but beyond that, that’s how I create written content most of the time now.

Rewrite option in macOS Writing Tools.
Rewrite option in macOS Writing Tools.

Sometimes, I’ll take that content and use it in something more complex, like ChatGPT Canvas, and really let it go to work on it and create something more of a masterpiece. At work, I’ll also take the screencasts I usually do and give them to an app called Aiko, an app that converts video to a transcript. Then, I’ll either hand that transcript to Apple Intelligence—usually ChatGPT—to make it into a written form.

This has significantly simplified my life because I usually spend a considerable amount of time editing written content or writing content that I usually spend a lot of time on. What I write can sometimes be hard for others to understand because I’m just not great at writing, I tend to be repetitive, and over-explain things. But this has been a big game changer for all that. I’m one of those people who isn’t really into the whole AI hype still. I think AI is an amazing tool, but it’s not taking our jobs. It’s not coding for us. But, it can do things like this that really make you more productive. 

The original text from Apple Dictation:

“No, I’m not going to give you a giant list, not that kind of post. But, there has been a new way that AI has really been helping me be more productive. At work I’m known as the screencast guy, I record them all the time. Truth be told I’m not very good at creating well written content I would rather just record what I’m doing and use my voice to explain something so I’ve been using AI to sort of get around this problem and how I’ve been doing. It has been pretty simple I’m even using it to write this post. I simply start Apple dictation on my Mac and I speak what I wanna say now the textual output from that isn’t the most amazing thing, but with the addition of intelligence, I am able to then go select that text and ask it to do a rewrite, which usually makes it somewhat coherent. Of course read it and do a couple little edits here and there, but beyond that that’s kind of how I do written content now sometimes I’ll take that content into something a little more complex like ChatGPT canvas, and really go to work at it and create some kind of masterpiece usually at work sometimes I’ll take the screen cast that I will normally do and give it to AIKO an app that will convert video to a transcript and then hand that transcript either to Apple Intelligence or usually ChatGPT to make it make more sense this is made my life a lot easier because spending a lot of time editing, written content or writing written content to something that I struggle with often what I write is sometimes hard to understand for other people simply because I’m not great at writing, but this has been a big game changer for me. I am one of those guys that is not into the whole AI hype. I think AI is an amazing tool and it’s just that it’s not taking our jobs. It’s not coding for us, but he can do things like this that really make you more productive.”

First snow…

Summer this year was long, fall was short, and the snow is already here…

Hello Wolrd

I can’t remember the first blog post I ever wrote, but I do remember mis-spelling the title of that blog as Hello Wolrd and I left it that way. I always do this, I start a blog and I write the first post in it and I make excuses about how I need to re-start blogging and writing and ruminate about all the blogs I have had in the past and that this blog is going to be the one to rule them all.

This is another one of those posts!

Why?

I am turning 40 for the 2nd time Friday, and I don’t know if it’s because I’m getting older, but I’m getting really tired of the content on social media. I tend to have small things to say and I usually post on social media when I want to say it. A month ago I decided to get off social media for the rest of the year, and I’m even considering getting off it forever (or at least for a long time). But I still have things to say! Not much, but a few things. I also have said a lot in the past on all these various blogs and I do intend to port them over and back-date them to this site. Hopefully it becomes a place I can share what I think outside of social media, which has just become crazy these days. TBH the real reason I’m off social media is reels the doom-scrolling black holes of this feature of most social media really is the worst thing about social media. But, I digress…

An Update

Again, I can’t remember that last post I wrote but I currently work at AwesomeMotive after 7 years at WebDevStudios. I left WDS because I wanted to change the kind of work I was doing. They were a great company to work for and I often miss things about working at WDS. But I wanted to work on a single product or plugin, and that’s what I get to do everyday working on AffiliateWP.

What else? I’m living in Albuquerque, NM now. I lived in Phoenix for about 10 or so years and we moved back to New Mexico (grew up in Roswell, NM) to be closer to family and for our kids to enjoy time with their grandparents and great-grandparents. We moved here as a bit of an experiment, but it’s turned out to be a place we really love to live and watch our kids grow. So we’ll likely be here for a while.

Balloon Fiesta 2024
Balloon Fiesta — 2024

Living in ABQ has really improved my involvement with the Tennis Community here. I’ve won a couple tournaments here and I really enjoy the people that make up this community. Every weekend just-about I’m playing Tennis!

Ashley & Aubrey (Tennis)
Ashley & Aubrey — Sets in the City 2024

Trying out Webkit

So last night I decided I was going to try using Safari/Webkit DevTools. I asked myself: What is Firefox Developer Edition/Chrome DevTools giving me that Safari DevTools isn’t? I thought I’d try it out for a couple of weeks… I also asked myself the same thing about iTerm2, so I also decided to try out the basic macOS Terminal application.

Of course, I’m a stickler for UI consistency. It took some time for me to get Visual Studio Code to resemble WebKit DevTools, but I must say, I really like it!

Update: August 5, 2024 – I’ve switched back to iTerm as my Terminal. The reason? Panes. I simply didn’t like how Terminal.app handled panes, and I had a few instances where I wanted to use them. For example, I was using a command to transcribe some audio to text using Whisper, but I also needed to monitor htop because it was significantly impacting my CPU usage. I required a pane… unless I had a specific need. So, my philosophy has been to ask myself if a native macOS application provides what I require. As soon as I discover that a native app doesn’t offer what I need, I’ll consider alternatives. For instance, Raycast turned out that I only utilized 3% of its features. Since I switched to Spotlight, it has been more than sufficient.

Update: July 15, 2024 – I’ve also abandoned Raycast. I once again questioned whether I genuinely use it. In reality, I don’t think I do. I could, of course, but in truth, I only use about 10% of its features. Therefore, I disabled it (I’ll still utilize the AI features I paid for). I installed a snippet and clipboard history tool, enabled Spotlight, and moved on.

Update: June 11, 2024 – So far, I’m still using the built-in macOS Terminal and WebKit. Terminal has occasionally behaved erratically, but I always load up the application I’m working on in iTerm, and it usually turns out that the issue also occurs in iTerm. However, there are a few things I’ve had to compromise on in iTerm. It allows you to remap right ⌘ to CTRL, but I can’t do that in Terminal. That’s okay with me; I’ve simply remapped alt-s in Micro and called it a day. I don’t use panes (although panes are a pain, haha), but I’ll use tabs. So far, that’s it… I’m still waiting for a gotcha.

Update: June 3, 2024 – I’ve also been moving all my to-do lists (yes, even for work) to Reminders and using Notes more frequently. I’m genuinely enjoying the feeling of having less… less apps, less organizing!

How I add an icon to the macOS Dock that just launches a URL in Safari

Using automator make an app that runs this applescript:

on run {input, parameters}
    set targetURL to "https://example.com" -- Replace with your desired URL

    tell application "Safari"
        activate
        set windowList to windows
        set windowFound to false

        repeat with currentWindow in windowList
            if (URL of current tab of currentWindow) contains targetURL then
                set index of currentWindow to 1 -- Bring the window to the front
                set windowFound to true
                exit repeat
            end if
        end repeat

        if not windowFound then
            -- No window with the URL found, create a new one
            make new document with properties {URL:targetURL}
        end if
    end tell

    return input
end run

Change the URL, and save it as an application, and add that application to the dock.

This will automatically detect a window you already have open with the URL and activate it instead.

How I figured out how to publish an Apple Note online

While I wait for the day Apple adds a publish note link to Apple Notes, I have been trying to figure out how to do it with a workaround. This is the best I have come up with without having to involve another blogging service.

It’s not perfect, but here’s how I did it:

I found a script by Bear (another notes app) that will export your Apple Notes as HTML. I used that (and some ChatGPT) to get it to only export notes in a Posts folder in my Notes app:

Yesterday

Here’s the script:

set exportFolder to (choose folder) as string
-- Function to delete all .html files in the chosen folder
on deleteHTMLFilesInFolder(folderPath)
    tell application "Finder"
        set htmlFiles to every file of folder folderPath whose name ends with ".html"
        repeat with htmlFile in htmlFiles
            delete htmlFile
        end repeat
    end tell
end deleteHTMLFilesInFolder

-- Simple text replacing
on replaceText(find, replace, subject)
    set prevTIDs to text item delimiters of AppleScript
    set text item delimiters of AppleScript to find
    set subject to text items of subject

    set text item delimiters of AppleScript to replace
    set subject to "" & subject
    set text item delimiters of AppleScript to prevTIDs

    return subject
end replaceText

-- Get an HTML file to save the note in.  We have to escape
-- the colons, or AppleScript gets upset.
on noteNameToFilePath(noteName)
    global exportFolder
    set strLength to the length of noteName

    if strLength > 250 then
        set noteName to text 1 thru 250 of noteName
    end if

    set fileName to (exportFolder & replaceText(":", "_", noteName) & ".html")
    return fileName
end noteNameToFilePath

-- Delete all existing HTML files in the chosen folder
deleteHTMLFilesInFolder(exportFolder)

tell application "Notes"
    -- Limit the export to the "Posts" folder
    repeat with theNote in notes in folder "Posts" of default account
        set noteLocked to password protected of theNote as boolean
        set modDate to modification date of theNote as date
        set creDate to creation date of theNote as date

        if not noteLocked then
            -- File name composed only by note title
            set fileName to (name of theNote as string)
            set filepath to noteNameToFilePath(fileName) of me
            set noteFile to open for access filepath with write permission
            set theText to body of theNote as string
            set theContainer to container of theNote

            -- Export the folder containing the notes as tag in bear
            -- The try-catch overcomes a 10.15.7 bug with some folders
            try
                if theContainer is not missing value then
                    set tag to name of theContainer
                    set theText to ("" & theText & "#" & tag & "#") as string
                end if
            end try

            write theText to noteFile as «class utf8»
            close access noteFile

            tell application "Finder"
                set modification date of file (filepath) to modDate
            end tell
        end if

    end repeat
end tell

I saved this as an automator application that I can run anytime I want. Here’s a ZIP of that application. When you run it, it will export any notes in the Posts folder in Notes.app into a folder you choose.

CleanShot 2024-06-01 at 21.25.43@2x

This script will:

  • Export notes from a folder called Posts
  • Delete all *.html files in the folder you choose (in case you deleted anything)
  • Export all note into a .html file named with the title of the note

I then used shfs/MacFuse to mount an STFP folder on my mac:

How I figured out how to publish an Apple Note online.html

CleanShot 2024-06-01 at 21.20.52@2x

So, when I use the exporting app to select this folder, the new files will be uploaded via SFTP to a server automatically.

I then wrote a simple PHP script to list out the HTML files (stored in ./html/) and output the HTML when you select one, here’s that script (index.php):

<?php

$post = $_GET['post'] ?? '';

if ( ! empty( $post ) ) {
    show_post( $post );
} else {
    show_posts();
}

function get_base_post( $file ) {
    return basename( str_replace( '.html', '', $file ) );
}

function get_post_files() {

    // Notice if your site is notes.aubreypwd.com, mount the ./html folder on your Mac to export to.
    $files = glob( __DIR__ . '/html/*.html' );

    $sorted_files = array();

    foreach ( $files as $file ) {
        $sorted_files[ filemtime( $file ) ] = $file;
    }

    ksort( $sorted_files );

    return $sorted_files;
}

function show_posts() {

    ?>

    <?php the_header( 'Posts' ); ?>

    <div class="posts">
        <ul class="post-list">

                <?php foreach ( get_post_files() as $date => $file ) : ?>

                    <li>
                        <a href="?post=<?php echo get_base_post( $file ); ?>"><?php echo get_base_post( $file ); ?></a><br>
                        <small><span class="date"><date><?php echo date( 'm/d/Y', $date ); ?></date></span></small>
                    </li>

                <?php endforeach; ?>

            </ul>
    </div>

    <?php footer(); ?>

    <?php
}

function the_header( $title ) {
    ?>

    <!DOCTYPE html>
        <html lang="en"  data-theme="light">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">

            <title><?php echo $title; ?></title>

            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">

            <meta name="color-scheme" content="light dark" />

            <link
                rel="stylesheet"
                href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.blue.min.css"
            />

            <style>

                body {
                    /* zoom: 90%; */
                }

                .site-title a {
                    text-decoration: none;
                    color: black;;
                }

                .site-title {
                    font-size: 80%;
                    border-bottom: 1px solid #dadada;
                    padding-bottom: 30px;
                    padding-top: 30px;
                }

                .post-date {
                    margin-top: 30px;
                    padding-top: 30px;
                    border-top: 1px solid #dadada;
                }

                code {
                    display:block;
                    padding-left: 20px;
                    background: none;
                }

                .post h1.post-title {
                    margin-top: 20px;
                }

                .post > div {
                    margin-bottom: var(--pico-typography-spacing-vertical);
                }

                img {
                    border-radius: 3px;
                }

                .post-list {
                    padding-left: 0;
                }

                .post-list li {
                    list-style: none;
                    padding-bottom: 5px;
                }

            </style>

        </head>
        <body>

        <main  class="container">

            <header><h1 class="site-title"><a href="../">👨🏻‍💻 Aubrey's Notes</a></h1></header>

    <?php
}

function footer() {
    ?>


        </main>
        </body>
    </html>

    <?php
}

function get_post_filename( $post ) {
    return __DIR__ . '/html/' . "{$post}.html";
}

function show_post( $post ) {

    if ( ! file_exists( get_post_filename( $post ) ) ) {

        show_posts();
        return;
    }

    ob_start();

    ?>

            <?php the_header( $post ); ?>

            <div class="post">

                <?php

                echo str_replace(
                    array(
                        '#Posts#',
                        '<div><tt',
                        '</tt></div',
                        "\t",
                        '<div><br></div>',
                    ),
                    array(
                        '',
                        '<code',
                        '</code',
                        '&nbsp;&nbsp;',
                        '',
                    ),
                    file_get_contents( get_post_filename( $post ) )
                );

                ?>

                <p class="post-date">
                    <strong>Posted on: </strong>
                    <date><?php echo date( 'm/d/Y', filemtime( get_post_filename( $post ) ) ); ?></date>
                </p>

            </div>

            <?php footer(); ?>

    <?php

    echo ob_get_clean();
}

It was dead-simple, but it worked! But now I can basically update any post in my Posts folder, run that export script, and just wait for a simple site to update!

CleanShot 2024-06-01 at 21.44.44@2x

As you can see, the images come out in base64, so there’s no files to manage (I’m fine with that for now).

But…

I wasn’t super happy with the solution, but wanted to share just in case it might be enough for someone else.

I left it up on notes.aubreypwd.com →

👋🏻 Valet

After about three months of using LocalWP I switched back to Laravel Valet yesterday. LocalWP just made my workflow a bit tedious:

The Site Shell works, but I just wish wp worked in the site folder.

Turns out creating a site for each context (at work) resulted in about 20 sites being created this quarter. This turned out to feel really inefficient.

Blueprints turned out to be hard to maintain. Not that it’s super hard, but it became a nuncance to update them and prune old ones.

Don’t get me wrong, LocalWP is great. Totally. But here’s what I’m doing now:

I have one site in Valet for my work (affiliatewp-dev) and it’s setup just the way I like it. One WordPress install. One setup. No blueprints.

The repo I work on, mostly, is symlinked in my ~/Repos folder (I use ghq to manage repos). Now, I just have one repo… all my work… one place.

To “switch” between cases I just use a command that uses wp to export the DB and re-setup WP at a blank slate. I can switch back and forth through databases using a command I setup called wpdbs. It just exports the DB and imports the other by name. I can switch contexts this way much easier with one WP install and one repo cloned… and of course switch branches at will.

This was my old setup, and it turned out to feel more intuitive and easier to work with. I thought LocalWP would make development feel easier, but it didn’t.

If you’re curious about wpdbs checkout my dotfiles.