Skip to content

Instantly share code, notes, and snippets.

View brianjbayer's full-sized avatar

Brian J. Bayer brianjbayer

View GitHub Profile
@brianjbayer
brianjbayer / Dockerfile
Created November 7, 2022 22:47
WIP: Rails 7 App Dockerfile
# --- Base Image ---
FROM ruby:3.1.2-slim-bullseye AS ruby-base
# --- Base Builder Stage ---
FROM ruby-base AS base-builder
# Update to match version in app Gemfile.lock
ARG BUNDLER_VER=2.3.21
# Static config
@brianjbayer
brianjbayer / gist-rails-api-error-handling-and-tests.md
Last active January 29, 2023 16:43
Add a basic single schema, custom response Error Handler to your Rails API with tests

Adding Rails API Error Handling with Tests

Iron Gate - Wendy Bayer

Image: Iron Gate by Wendy Bayer


Development is a dangerous game. Things you don't expect, things you do. Systems fail, the cloud is not infallible.

@brianjbayer
brianjbayer / gist-unlocking-the-secrets-of-rails-secrets-and-credentials.md
Last active June 27, 2026 00:45
A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base

Unlocking the Secrets of Rails Secrets and Credentials

Interurban Tunnel at Blackhand Gorge- Brian J Bayer


If you are like many (most?) of us, you have encountered Rails Credentials/Secrets and secret_key_base and may have been left a bit (or more) confused.

This post is an attempt to remove some of that confusion by

@brianjbayer
brianjbayer / gist-representing-email-addresses-in-rails.md
Last active March 10, 2023 20:21
Detailed overview of the official email standards and how to more correctly implement them in Ruby on Rails and PostgreSQL

Representing Email Addresses in Rails

Joshua Tree Saloon - Wendy Bayer

Image: Joshua Tree Saloon by Wendy Bayer


Dealing with and representing email addresses is very common in Ruby on Rails and other web applications. This is especially true when representing and implementing an

@brianjbayer
brianjbayer / gist-curlless-rack-based-healthchecks.md
Last active May 9, 2025 20:41
Add Rack-based liveness and readiness health checks and a Ruby program to check them to your (Rails) application

Adding Rack-Based Health Checks Without curl or wget

Lake View Cemetary, Cleveland OH - Wendy Bayer

Image: Lake View Cemetary, Cleveland OH by Wendy Bayer


You can not address a problem without first knowing that there is a problem. Having health checks in your application allows you to easily determine and monitor the status of your critical application

@brianjbayer
brianjbayer / gist-selenium-chrome-disable-save-popups.md
Last active April 28, 2026 08:36
How to disable the Chrome Controlled by automation banner and those Save address?, Save card?, and Save Password? pop up windows in Selenium Webdriver

Disabling Selenium Chrome Automation Banner, Save address?, Save card?, Save password?, and Change your password Pop-Ups

Pencil Sharpener - Wendy Bayer

Image: Pencil Sharpener by Wendy Bayer


This shows you how to disable those Chrome Save address?, Save card?, Save Password?, and Change your password pop-up windows in

@brianjbayer
brianjbayer / gist-mac-add-ssh-key.md
Last active November 19, 2023 21:55
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-clean-install.md
Last active December 21, 2025 14:30
How to guide on a clean installation of a macOS operating system (Sonoma)

Mac Clean Install of an Operating System


This guides you through installing your existing or new macOS operating system (e.g. Sequoia‌) and removing all existing data and configuration, thus providing a "clean" installation like on a new machine. This type of clean installation ensures that there is no previous configuration that can cause issues.

@brianjbayer
brianjbayer / gist-mac-update-system.md
Created November 19, 2023 04:21
How to update your macOS system software

Mac Update the System

You can either update the system software using just the System Settings application or start with the terminal and command line. But you will still need to use the System Settings application to complete the update.

It is easier to just use System Settings, but you do you.


@brianjbayer
brianjbayer / gist-customize-your-mac.md
Created November 19, 2023 04:36
These are some of my preferred Mac settings

Customize Your Mac

Once you are at the latest system software, customize your Mac.

These are some of my preferred settings.

Add Your Bluetooth Accessories Like Mouse and Keyboard

If you have a have bluetooth mouse or trackpad or keyboard, turn on bluetooth and connect them through...

System Settings > Bluetooth