Skip to content

Instantly share code, notes, and snippets.

View coltenkrauter's full-sized avatar
👩‍🌾
Husband, father of four, full-stack developer

Colten Krauter coltenkrauter

👩‍🌾
Husband, father of four, full-stack developer
  • Stevensville, MT
View GitHub Profile
@coltenkrauter
coltenkrauter / engineering-excellence.md
Created September 18, 2025 03:52
Engineering Excellence – Production Maturity Framework. Goals and practices to achieve production maturity across DevOps, Security, Reliability, Operations, Developer Experience, Architecture, Quality, Compliance, Cost, Customer Experience, AI, and Team Culture.

Engineering Excellence

This document defines the goals and practices that drive us toward production maturity. It is a living reference for how we strengthen our platform, improve developer experience, and protect our systems, data, and customers.

1. DevOps

Short feedback loops and automation deliver reliable code faster with fewer errors.

Pipelines & Version Control

Why: Faster releases that save developer hours, reduce mistakes, and ensure we can roll back quickly.
How: Automated testing and security scans in CI/CD. Automated deployment pipelines for Alpha, Beta, and Production. Clear commit standards for readable history and rollback.

@coltenkrauter
coltenkrauter / dual-github-ssh-setup.md
Last active September 18, 2025 04:12
SSH with 2 GitHub accounts on github.com - Complete setup guide with SSH config, shell functions, and examples

Dual GitHub SSH Setup: Personal & Work Accounts

A clean, secure guide for using two different GitHub accounts on the same machine with automatic SSH key selection and Git identity management.

Overview

This setup automatically uses the correct GitHub account based on your working directory.

Prerequisites

@coltenkrauter
coltenkrauter / 0-next-vercel-build-info.md
Last active September 8, 2025 18:51
Display app version, commit hash, and build timestamp in your Next.js app footer.

Next.js + Vercel Build Info

Inject and display build metadata in your Next.js app deployed on Vercel:

  • App version from package.json
  • Commit SHA from Vercel git env vars
  • Build time generated once per next build

How it works

  1. Read package.json for the app version.
  2. Capture current ISO timestamp at build.
@coltenkrauter
coltenkrauter / ts-lib-best-practices.md
Last active August 20, 2025 18:30
TypeScript NPM Package Best Practices (Browser-first; TS+JS; ESM+CJS)

TypeScript NPM Package Best Practices Checklist

(Browser-first; works in TS & JS; supports ESM + CJS)


1. Types

2. Dual Module Formats

Date: 2025-05-20 | Version: 1.0
Provided by Creo Collective LLC
Designed for Eagle Watch Automotive

Packages

This document outlines our core service offerings under four key areas:

  • Web Design: website development and ongoing support
  • Video Production: flexible video services from trial promos to full documentaries
  • Marketing & Social Media: monthly content creation and campaign management
@coltenkrauter
coltenkrauter / npm-depcheck-clean.sh
Created March 28, 2025 03:00
Simple shell script to find and uninstall unused npm dependencies using depcheck, with user prompt and uninstall count. Compatible with bash and zsh.
#!/usr/bin/env bash
deps=$(npx --yes depcheck --json | jq -r '.dependencies[], .devDependencies[]')
if [ -z "$deps" ]; then
echo '✅ No unused dependencies found'
else
echo '🧹 Unused dependencies:'
echo "$deps"
@coltenkrauter
coltenkrauter / delete-cognito-users.sh
Created March 4, 2025 15:25
Delete Cognito Users
#!/bin/zsh
# delete-cognito-users.sh
# deletes all cognito users with emails starting with 'coltenkrauter'
# assumes a single user pool exists
logInfo() {
echo "[INFO] $1"
}
logError() {
@coltenkrauter
coltenkrauter / auto-brightness-plugged-in-macos.md
Created February 19, 2025 03:44
Automatically sets macOS screen brightness to 100% when plugged into power. Uses a LaunchDaemon and pmset to listen for power state changes in real-time. Event-driven, no polling.

Real-Time Brightness Adjustment When Charging (macOS)

This solution automatically sets your macOS display brightness to 100% when the power adapter is connected. It leverages a LaunchDaemon that runs a persistent script listening for power state changes via pmset. This event-driven approach ensures immediate response without unnecessary polling.

Requirements

  • macOS (tested on recent versions)
  • brightness CLI (install directly from GitHub, see below)
  • Administrative privileges
@coltenkrauter
coltenkrauter / git-branch-status.sh
Created January 30, 2025 00:29
This script checks the status of your current Git branch against the remote default branch. It informs you of uncommitted changes, unpushed commits, and whether your branch is ahead or behind the default branch, with clear, color-coded output.
git_branch_status() {
# Define colors
local GREEN="\033[0;32m"
local RED="\033[0;31m"
local YELLOW="\033[0;33m"
local CYAN="\033[0;36m"
local RESET="\033[0m"
# Get current and default branches
local CURRENT_BRANCH=$(git branch --show-current)
@coltenkrauter
coltenkrauter / find-all-truenas-vm-ips.sh
Created January 14, 2025 16:41
This script identifies the IP addresses of all VMs running on TrueNAS SCALE. It queries the system using midclt to retrieve MAC addresses for each VM and uses arp to resolve them to IP addresses.
midclt call vm.query | jq -r '
.[] |
select(.status.state=="RUNNING") |
.devices[] |
select(.dtype=="NIC") |
.attributes.mac' | while read -r mac; do
echo -n "$mac: "
arp -a | grep -i "$mac" | awk '{print $1, $2}'
done