Piping stdout and stderr to Preview
Aug 19, 2021, 4:02 PM
A while back, I wrote about how handy it was to redirect a man page into Preview. This allows you to keep the man page open, search it, and generally have a better user experience than struggling with more (or less) to navigate through the...
Xcode: Vimpocalypse Now
Jun 8, 2021, 1:13 PM
This has appeared at the bottom of Xcode’s Text Editing > Editing settings, sure to make many vi users very happy indeeed: The change is heralded in the Release Notes: Using the new vim features is super easy. When the Vim...
Controlling Screen Sharing from the command line
May 13, 2021, 3:29 PM
My world often narrows to Xcode and Terminal. There are times I just want to check in on another computer quickly and I don’t want the hassle of creating a new Finder window, going to the network, waiting for the items to load, and...
Crafting a custom word count service
Apr 14, 2021, 1:16 PM
I just happened to need to do a lot of word counts today so I put together a service to make my life easier. While, I performed my initial work on Mojave but the same approach works all the way to Big Sur and, presumably, the upcoming...
Pasting quoted code perfectly
Jul 20, 2020, 10:41 PM
You have some code you need to incorporate into a multi-line string. What’s the quickest and best way to handle it? Although I see people do this all the time, manually adding spaces to each line isn’t the best solution....
Executing command-line directly from Xcode
Jul 15, 2020, 11:54 AM
I got pulled into one of those conversations where I end up saying, “Fine, I’ll put up a post about it” and this is the post. Yes, you can test and run command-line apps directly from Xcode but I pretty much never do....
A different way to develop SwiftPM Packages inside Xcode projects
Jul 8, 2020, 10:38 PM
WWDC gave us many reasons to both migrate libraries to SwiftPM and to develop new ones to support our work. The integration between Xcode development and SwiftPM dependencies keeps growing stronger and more important. Apple’s Editing...
The (Switch) Case of the Missing Binding
Jul 7, 2020, 1:34 PM
Here’s a cool little challenge brought up this morning by a friend. Consider the following code: switch foo { case .a: return "a" case .b(let str) where str.hasPrefix("c"), .c: return "c" case .b: return "b" } It won’t compile....
Well that was a surprisingly bad Apple Store experience…
Jul 3, 2020, 7:22 PM
Remember the battery amnesty? Despite the stores doing everything they could to try to convince me not to replace the batteries, I insisted and persisted. I figured $29 would buy me the start of a new battery life-cycle. Less than 2 years...
Importing Web-based SwiftPM packages to your Xcode Playground
Jul 3, 2020, 2:46 PM
I’ve been kicking the wheels on Xcode 12 and its ability to use frameworks and packages with playgrounds. Up until now, I’ve only been able to import packages that are either downloaded or developed locally on my home system....
My xcopen adventures: playground workspaces
Jul 3, 2020, 1:25 PM
Now that Xcode 12 supports Swift Packages for playgrounds, I thought it was time to expand xcopen to build not only playgrounds but also allow you to embed them in workspaces. xcopen in a nutshell If you’re not familiar with...
Pronouncing all the things: Jumping into my bin folder
Jul 2, 2020, 9:30 AM
After dutifully training people to pronounce simctl correctly (“sim control”, not cuddle or kittle), I stopped by my binary folder (/bin, also pronounced “bin”, like the thing you throw stuff into) this morning to...
Undocumented Preview Drawing
Jun 30, 2020, 1:33 PM
I put these together and thought I’d share, as it’s not obvious in the current versions of Preview that you can draw such things as hearts and thought bubbles: Let me know if this helps.
Cleaning up SPM builds and other SwiftPM thoughts
Jun 28, 2020, 6:00 PM
If you’re short on space and want to clean up your local Swift Package Manger repos, you can easily remove build products by issuing: UsefulModifiers% swift package clean UsefulModifiers% This is particularly helpful for people, like...