How to list installed apps on a iOS simulator

This lists apps from a named simulator, converts to json, then finds non-apple apps.

xcrun simctl listapps "iPad Air (5th generation)" \
| plutil -convert json -o - -- - \
| jq '. | keys | .[] | select(. | startswith("com.apple") | not)'

This requires that you know the name of your simulator and have jq installed.

You can also replace the device name with booted if you want, but I prefer to use the name of the simulator.

Here are the docs for using a simulator name versus booted for simctl.

For subcommands that require a <device> argument, you may specify a device UDID
or the special "booted" string which will cause simctl to pick a booted device.
If multiple devices are booted when the "booted" device is selected, simctl
will choose one of them.

Note: as far as I can tell, there are no docs for listapps or even anything stating its existence in the man page for simctl.

How to set iTerm2 window and tab bar to show current path

I tend not to use tabs and instead have a bunch of windows so I originally wanted to know how I could set my window title bar to show the current path, but in this post I’ll share how to do both in iTerm2.

Here is a screenshot of the iTerm2 Preferences window showing Profiles -> Window.

Screenshot of iTerm2 Preferences Window showing how to set custom window title and custom tab title

For custom window title you’ll set \(currentTab.currentSession.path).

For custom tab title you’ll set \(currentSession.path).

And that’s it!

Here’s what it would look like in iTerm2:

Screenshot of iTerm2 with custom window and tab titles

And here’s the Stack Overflow question I found that solved this for me. Wanted to blog about it so that I remember how to do this in the future.

How to see git authors per line in Xcode

In my previous life I used a tool with VSCode called GitLens. What it does is show you what the last git commit for a selected line was. When you hovered over the greyed out text to the right of your code line, you’d get a little popover with more info about the commit. This is a really handy tool for quickly figuring out who made what change and when.

GitLens screenshot

Today I work mostly in Xcode and sadly Xcode doesn’t have this extension nor support this feature. It does however have something that shows you who changed each line and a brief commit message to try to provide some insight.

Screenshot of Xcode showing it's author view and popover for git commit information.

You can access this with ctrl + shift + cmd + A or find it in the Editor Menu for Xcode.

Xcode Editor Menu showing the Authors menu item and shortcut.

A word that doesn't exist and yet it does.

I’ll make it easy on you, this is the word: smalm

I was playing Wordle with my brother and dad the other day and my dad sent me a word he tried, but he was confused because autocomplete kept correcting it. He had never heard of it. Neither had I.

I looked in the dictionary for the word and I couldn’t find it. I did a web search and couldn’t find it. Then I checked in the unix word list to see if I could find it there.

I found it!

But then I still couldn’t find a definition.

I did eventually find a couple links to it on the web for scrabble word lists.

My guess is that like map makers, dictionary makes must create fake words as a sort of copyright mechanism to check if people are copying their work. And because word game makers can’t check every word to see if they’re real, they include a word from a common list of words.

Don’t believe me that it doesn’t exist?

terminal window showing me searching from smalm

References

Video talking about locations that don’t exist

DuckDuckGo search for smalm

Google search for smalm

P.S. both searches think I’ve mistyped smalm and meant small but in any case you still won’t find anything.

HTMLInputElement type number fun fact

I am a web developer by day and was working on a feature that was supposed to create an input field that could only accept numbers. Super easy right?!

<input type="number" />

I’m demoing said feature to the client (after having tested this) and I’m bashing on the home row and nothing is printing. I type some numbers and they print. Then I grab some text and paste it in an bam, a single letter e. That’s weird. I try another word. Another letter e. Hmm. I tell the client we’ll look into it.

I shared this with a coworker and they were able to produce the same behavior. I then decided to look up the issue on the internet and of course this is a well known thing. I dig a little deeper and realize that the HTML spec allows for this behavior because of floating point numbers. For instance 2e5.

Anyways, that was a fun little journey.

Link to the HTML spec for input type=number