mysqladmin dyld: Libary not loaded error (Mac OS)

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

I was recently running some scripts in my local dev environment that use mysqladmin (installed as part of homebrew mysql-client package) to drop and recreate some tables in my docker MySQL instance and encountered this error. This happens across all Mac OS version I tested (Big Sur, Catalina, Mojave). The issue is the libssl version it’s looking for is out of date.

To fix:

brew upgrade mysql

S3 Cleanup Script

Getting an early jump on spring cleaning in the new year? As you may well know you cannot simply delete a non-empty S3 bucket. I’ve created a handy little python script to help. Simply save the below script as s3Deleter.py and execute with s3Deleter.py <bucketname> <list || delete>

import boto3
import sys

try:
    bucketname = sys.argv[1]
except:
    print ("you failed to enter a bucket name, please enter a valid bucket name as the first argument")
    sys.exit(1)

try:
    action = sys.argv[2].lower()
except:
    print ("you failed to enter a bucket action, please enter a valid bucket action (list or delete) as the second argument")
    sys.exit(1)

allowed_actions = ['list','delete']

if action not in allowed_actions:
    print("you provided an invalid action argument. Please enter either list or delete as the argument")
    sys.exit(1)

s3 = boto3.resource('s3')
bucket = s3.Bucket(bucketname)

def bucket_list():
    print("listing all files in the following S3 Bucket: " + str(bucketname))
    for key in bucket.objects.all():
        print(key.key)
    return

def delete_bucket_contents():
    print("deleting all files in the following S3 Bucket: " + str(bucketname))
    bucket.objects.all().delete()
    return

def delete_bucket():
    print("Deleting the bucket: " + str(bucketname))
    bucket.delete()
    return

def main():
    if action == "list":
        bucket_list()
    if action == "delete":
        delete_bucket_contents()
        delete_bucket()

main()

Apple M1 Testing

Like many people who have been following the Apple Silicon announcements I had to get my hands on a device. I ordered a MacBook Air in the 8gb/512gb configuration to do some testing with and to use as my blogging/browsing/on call machine and more importantly to test the performance and compatibility of software I rely on for DevOps work and Audio production. Here’s a list of my testing so far:

Things that work:

  • iTerm2
  • Office
  • Chrome 
  • DataGrip
  • IntelliJ
  • PyCharm
  • VSCode
  • Git
  • SDK Man
  • Groovy
  • Java
  • Sequel Ace (Replacement for Sequel Pro)
  • Slack
  • Viscosity
  • Dropbox
  • Spotify
  • Amazon Music
  • Caffeine (app to keep screen awake)
  • Python (2.7 comes pre-installed)
  • AWS CLI v2 (.pkg from AWS)
  • Copy ’em (App Store clipboard history)
  • BetterSnapTool (App Store window management)
  • Luma Fusion 
  • Adobe Photoshop Elements 2020 
  • PreSonus Universal Control 
  • Cyberduck
  • NeuralDSP Plugins
  • iLok

Things that Don’t:

  • Docker
  • Homebrew
  • Virtualization stuff (VMWare Fusion/Parallels/VirtualBox)

Final Thoughts

I would recommend hanging onto your intel machine for now if you are doing dev work that relies on Docker and homebrew. Otherwise everything else seems to run super snappy and fast. My primary laptop is a late 2016 15″ MacBook pro with the 2.9Ghz i7, 16gb RAM, and 1tb storage. In CPU benchmarks in GeekBench the M1 air more than doubled the multicore score of my 15″ MBP. Also battery life with the M1 is insanely good especially when using Apple apps. During Black Friday I had monitoring tools open in Safari the entire day and in 13 hours I had only managed to consume 63% of the battery on the Air. This is considerably shorter when using Chrome, however there is a vast improvement in battery and more importantly I can do heavy lifting on this without feeling like I’m going to burn my lap from the heat coming off of it.

The limitation of 2 Type-C ports and a max of 16gb of RAM is a real downer, for a portable laptop that I don’t do anything super heavy on this is fine, but I am waiting for an option of at least 32gb RAM, 4 ports, and full Docker support before I am willing to consider replacing my faithful 15″ MBP, but this is an incredible debut of Apple Silicon and I’m giddy with excitement to see what future Apple Silicon chips hold.