Mac OS X and MacOS versions

As someone who tinkers with older Macs, I often forget which versions of Mac OS X are earlier or later just based on name, so for future reference here’s a quick list (summarized from wikipedia):

10.0Cheetah
10.1Puma
10.2Jaguar
10.3Panther
10.4Tiger
10.5Leopard
10.6Snow Leopard
10.7Lion
10.8Mountain Lion
10.9Mavericks
10.10Yosemite
10.11El Capitan – most recent version that can be installed on my 2008 Mac Pro 3,1 without using DosDude utils of OpenCore patcher etc
10.12Sierra
10.13High Sierra
10.14Mojave
10.15Catalina
11Big Sur
12Monterey
13Ventura
14Sonoma
15Sequoia

Automating ssh key passphrases on MacOS

As a reminder, here’s how to use ssh keys to access remote hosts:

Adding hosts to a ~/.ssh/config file to use different keys with different git hosts is something I find I only need to do once in a while, but I made a note here because I can never remember how this is configured:

#Edit ~/.ssh/config and for each repo add the following block:
host hostname-of-repo
user your-id-for-this-repo
identityfile ~/.ssh/filename-of-key
view raw gistfile1.txt hosted with ❤ by GitHub

If you are required to use passphrases with ssh keys, being prompted to enter your passphrase every time you use a key can get tiresome. On MacOS however you can automate using your passphrase with by adding:

UseKeychain yes

to your ~/.ssh/config file (suggestion from this post here).

Updating local versions of Docker images if using the latest tag

I have an ubuntu:latest image pulled locally from a couple of years ago, and it’s obviously not the latest since it’s over 2 years old. ‘docker images’ shows:

ubuntu                                                                           latest                     d5ca7a445605   2 years ago     65.6MB

If I run the image with -it and cat the /etc/lsb-release file, it shows it’s 20.04. Docker Hub is currently showing latest as 22.04.

To update it, if I ‘docker pull ubuntu:latest’ then it shows:

> docker pull ubuntu:latest
latest: Pulling from library/ubuntu
70104cd59e2a: Pull complete
Digest: sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95
Status: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu:latest

If I now start it and cat /etc/lsb-release, it shows 22.04. Done!

Moving from msql client to mysqlsh

I posted a while back about running mysql in a Docker container on an Apple Silicon MacBook. It’s been a while since I’ve run mysql locally, and it seems the mysqlsh client is now preferred over the previous mysql client.

With mysqlsh, after connecting, to issue a ‘use’ command to select a db, use ‘\use dbname’

Once a db is selected, to issue other mysql commands enter the sql mode with ‘\sql’ command.