Skip to content

Instantly share code, notes, and snippets.

View brianjbayer's full-sized avatar

Brian J. Bayer brianjbayer

View GitHub Profile
@brianjbayer
brianjbayer / gist-the-three-things-to-prove-in-your-testing.md
Last active January 28, 2024 20:38
Fundamentals of Testing 1: The three things to prove in your verification testing

Fundamentals of Testing 1: The Three Things to Prove

I'll start with one of the most basic testing fundamentals. It is also one that you will likely find applies in your day-to-day software development.

When you make a software change like adding new behavior or changing existing behavior, you need your testing to prove 3 things:

  1. Your changes result in the desired new or changed behavior.
@brianjbayer
brianjbayer / gist-using-a-counter-for-simple-and-performant-jwt-revocation.md
Created December 29, 2023 22:03
How to use an integer-based counter as a simple and performant mechanism for revoking a user's JSON Web Token (JWT)

Using a Counter for Simple and Performant JWT Revocation

Pioneertown Jail, CA - Wendy Bayer

📷 Photo: Pioneertown Jail, CA by Wendy Bayer


One of the biggest challenges with JSON Web Tokens (JWTs) as an authentication and/or authorization mechanism is the ability to easily and quickly revoke the token if it becomes compromised.

@brianjbayer
brianjbayer / gist-mac-docker-desktop-multi-platform-images.md
Created December 5, 2023 00:40
How to enable and build multi-platform images in Docker Desktop for Mac

Enabling and Building Multi-Platform Images in Docker Desktop for Mac

🏫 To learn what multi-platform images are, see this post from Docker Multi-arch build and images, the simple way

You can use Docker Desktop for Mac to build and push multi-platform images to support your containers running on different CPU architectures like Intel/amd64 and Apple Silicon/arm64.

@brianjbayer
brianjbayer / gist-mac-setup-development-environment.md
Last active August 12, 2025 14:30
How to setup a basic development environment on Mac

Set Up a Mac Development Environment (Sonoma 14)

This guide helps you set up the fundamentals needed for software development on macOS. This enables you to install your own language/framework specific development environment (such as Ruby/Rails, Python etc.)

This guide is optimized by following the minimum critical path to get you up and running.

@brianjbayer
brianjbayer / gist-mac-install-dev-apps-with-homebrew.md
Last active January 5, 2025 00:38
How to install Chrome, Firefox, Docker, and VS Code using Homebrew on Mac

Install Development Applications Using Homebrew

You can use homebrew --cask to more easily install and manage many of your binary applications like...

  • Google Chrome
  • Firefox
  • Docker Desktop for Mac
  • IDE's such as Microsoft Visual Studio (VS) Code

⚙️ You can use an automated script to install

@brianjbayer
brianjbayer / gist-mac-install-git-vim-janus.md
Created November 19, 2023 23:01
How to install git and vim (with the Janus: Vim Distribution) using Homebrew on Mac

Install Git and Vim (with Janus: Vim Distribution) Using Homebrew

Here you will install...

  • git the source code control versioning system using Homebrew
  • vim the command line editor using Homebrew
  • The Janus: Vim Distribution plug-ins and mappings for vim

⚙️ You can use an automated script to install git and vim and extensions such as the Janus: Vim Distribution.

@brianjbayer
brianjbayer / gist-mac-add-ssh-key.md
Created November 19, 2023 21:57
How to add a new SSH key to your Mac

Add an SSH Key on a Mac

Add and configure an SSH Key to connect to remote source code repositories (like GitHub) and servers.

⚙️ You can use an automated script to add an SSH Key to your Mac.

I use a GitHub repository mac-setup for my basic Mac setup scripts including one to add a new SSH Key.

@brianjbayer
brianjbayer / gist-mac-configure-your-git-globals.md
Created November 19, 2023 21:27
How to configure your git globals on Mac

Configure Your Git Globals

Once you have at least a basic user profile with Homebrew, you can configure your git.

⚙️ You can use an automated script to configure your basic git global configuration.

I use a GitHub repository mac-setup for my basic Mac setup scripts including one to configure

@brianjbayer
brianjbayer / gist-mac-configure-user-profile.md
Created November 19, 2023 06:21
Configure a basic Mac user profile (~/.zshrc)

Configure Your User Profile (~/.zshrc)

Once you have Homebrew installed, it is really helpful to have your user profile ~/.zshrc setup. This will give you your aliases, paths, environment, etc.

🍺 Homebrew in its installation output instructs you to add it to your ~/.zshrc.

⚙️ You may find it useful to both automate the installation of your common profile files as well as keep them under source code

@brianjbayer
brianjbayer / gist-mac-install-xcode-homebrew.md
Created November 19, 2023 06:05
How to install Apple Xcode and the Homebrew package manager

Install Xcode

You will need to install the Apple Xcode developer tools application from the App Store.

🔒 You will need an Apple ID to sign into the App Store to download XCode

⏩ Try clicking this link in Safari and following any prompts to allow opening the App Store