mac

Flashing a Raspberry Pi Compute Module on macOS with usbboot

I recently got to play around with a Turing Pi, which uses Raspberry Pi Compute Modules to build a cluster of up to 7 Raspberry Pi nodes.

Turing Pi Raspberry Pi 7 nodes of Compute Modules

Interested in learning more about building a Turing Pi cluster? Subscribe to my YouTube channel—I'm going to be posting a series on the Turing Pi and Rasbperry Pi clustering in the next few weeks!

You can buy Compute Modules with or without onboard eMMC memory. If you don't have memory, you can attach a microSD card and boot from it, just like you would on any Raspberry Pi model B or model A. But if you have the eMMC memory, it's nice to be able to 'flash' that memory with an OS, so the compute module uses the onboard storage and doesn't require a separate boot device (either microSD card or USB disk).

Revisiting Docker for Mac's performance with NFS volumes

tl;dr: Docker's default bind mount performance for projects requiring lots of I/O on macOS is abysmal. It's acceptable (but still very slow) if you use the cached or delegated option. But it's actually fairly performant using the barely-documented NFS option!

July 2020 Update: Docker for Mac may soon offer built-in Mutagen sync via the :delegated sync option, and I did some benchmarking here. Hopefully that feature makes it to the standard Docker for Mac version soon.

September 2020 Update: Alas, Docker for Mac will not be getting built-in Mutagen support at this time. So, read on.

Z shell or Bash command alias to open two tabs to specified directories in macOS Terminal

There are a few projects I have where I need to work from two separate directories simultaneously, and while there are a number of ways I could set up workspaces in various esoteric IDEs or terminal session managers, I am stodgy in my ways and enjoy using the built-in Terminal in macOS for most things. If you use iTerm on the Mac, the commands are similar, but the AppleScript events that I use may need to be adjusted.

But I'm getting ahead of myself. For these projects, I want to have a bash/zsh alias that does the following:

  1. When I type xyz (alias) and hit 'return'
  2. Open the current tab to path ~/projects/xyz
  3. Open a new tab next to this tab
  4. Change directories in then new tab to path ~/something-else/xyz

Simple enough, you say, but I found that a number of AppleScript incantations (e.g. do script and the like) could not be made to work with bash aliases easily. In the end, I put the following in my .zshrc file (see all of geerlingguy's dotfiles here—some private aliases excluded):

If you're having trouble formatting a new SSD in a Mac, it could be the cable

tl;dr: If you see weird errors when using or formatting a drive internally on a Mac (especially after upgrading to a newer and/or faster SATA hard drive), it could mean the SATA cable needs to be replaced.

Mac mini mid-2011 lower SATA hard drive cable with connector
Who would've thought such a tiny cable could cause so many problems?

I have an older Mac mini (mid-2011 i5 model), and I use it as a general media server and network backup. It handles Time Machine backups for two other Macs, it has about 20 TB of external storage connected, and I also use it as a 'home base' to store all my Dropbox, iCloud, and Photos content locally, and store an extra Time Machine backup of all that. I'm a little nutty about backups... but I haven't lost a file in two decades and I don't want to start now ;-).

Trying out CRC (Code Ready Containers) to run OpenShift 4.x locally

I've been working a bit with Red Hat lately, and one of the products that has intrigued me is their OpenShift Kubernetes platform; it's kind of like Kubernetes, but made to be more palatable and UI-driven... at least that's my initial take after taking it for a spin both using Minishift (which works with OpenShift 3.x), and CRC (which works with OpenShift 4.x).

Because it took me a bit of time to figure out a few details in testing things with OpenShift 4.1 and CRC, I thought I'd write up a blog post detailing my learning process. It might help someone else who wants to get things going locally!

CRC System Requirements

First things first, you need a decent workstation to run OpenShift 4. The minimum requirements are 4 vCPUs, 8 GB RAM, and 35 GB disk space. And even with that, I constantly saw HyperKit (the VM backend CRC uses) consuming 100-200% CPU and 12+ GB of RAM (sheesh!).

AirPods get stuck in low-quality 16 kHz audio mode when starting a VM

I always love when I find a really dumb solution that works reliably to fix a problem that should never really be a problem in the first place. But having worked with audio devices before—though nothing nearly as complex as the AirPods—I am willing to cut Apple some slack in building a seamless aural experience with using AirPods across phone calls, VOIP, iOS devices, Macs, music, and Apple TVs... it's hard to execute perfectly, and as I said in my review of the AirPods two years ago, these little earbuds are as close to perfection when it comes to a wireless sound solution for someone like me.

Anyways, here's the problem:

Sometimes (maybe 10% of the time) when I run vagrant up to build a local development environment for one of my software projects, and I'm listening to music, my AirPods suddenly switch into super-low-quality audio mode. It sounds like you're listening to a song played through a long subway tunnel or something.

Review: AUKEY Mechanical Keyboard Blue Switch with RGB Backlighting

This is a review of the AUKEY 'Blue Switch' mechanical keyboard, available for a little over $50 on Amazon.

AUKEY closeup of RGB blue keycap mechanical gaming keyboard

For years, I've used the various versions of Apple's USB and Bluetooth keyboards, mostly because they lasted forever (I still have a couple spares that have most of the home row letters worn off), and they're pretty comfortable for my typing style. Also, they're pretty quiet. And the switches are robust. And the body is sturdy aluminum so there's no flexing while typing (a lot of plasticky keyboards have that problem).

Fixing Safari's 'can't establish a secure connection' when updating a self-signed certificate

I do a lot of local development, and since almost everything web-related is supposed to use SSL these days, and since I like to make local match production as closely as possible, I generate a lot of self-signed certificates using OpenSSL (usually using Ansible's openssl_* modules).

This presents a problem, though, since I use Safari. Every time I rebuild an environment using my automation, and generate a new certificate for a domain that's protected with HSTS, I end up getting this fun error page:

Safari Can't Open the Page - Safari can't open the page because Safari can't establish a secure connection to the server servername.

Safari Can't Open the Page – Safari can't open the page because Safari can't establish a secure connection to the server 'servername'.

Fixing a 2011 MacBook Pro booting to a Grey Screen - AMD Radeon Video Glitch

I've been a Mac user for years, and I've repaired hundreds of different Macs, from the early II series to the latest 2015 and 2016 model MacBook Pros, iMacs (and other Apple hardware to boot!), and there is almost never a hardware situation where I've thrown in the towel and told someone to ditch their Mac.

The 2011 MacBook Pro has, for almost a decade, been the exception to that rule. There was a major flaw in the AMD Radeon GPUs included with that model year's logic board which seemed to cause GPU failure either due to overheating, internal chip problems, BGA solder joints getting broken, or a combination of the above. The problem was so rampant, Apple was forced to set up a free repair program for affected MacBook Pros—though the 2011 model has since been dropped from that program. I've handled three 2011 MacBook Pros (none of them my own—I had an Air back then), and all three of them were scrapped because of the GPU issue.