Skip to content

Instantly share code, notes, and snippets.

View ericboehs's full-sized avatar

Eric Boehs ericboehs

  • Oddball
  • Enid, OK
  • 20:55 (UTC -05:00)
View GitHub Profile
@ericboehs
ericboehs / rerun_test.sh
Created July 17, 2025 16:44
GitHub Actions run monitor and rerun script
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 <github_actions_url> <max_reruns>"
echo "Example: $0 'https://github.com/department-of-veterans-affairs/vets-api/actions/runs/16324087966/job/46109427429?pr=23123' 8"
exit 1
fi
# Detect GNU grep
GREP_CMD=""
@ericboehs
ericboehs / claude-resume
Last active July 25, 2025 17:55
claude-resume: Enhanced Claude Code session picker with searchable message content (uses fzf)
#!/bin/bash
# Claude resume script with fzf session picker
# Parse arguments
SEARCH_MESSAGES=false
MESSAGE_LIMIT=20
while [[ $# -gt 0 ]]; do
case $1 in
-s|--searchable)
@ericboehs
ericboehs / monitor_tmux_pane.sh
Created June 15, 2025 15:42
Monitor tmux panes running Claude processes for inactivity with notifications
#!/bin/zsh
# Usage: ./monitor_tmux_pane.sh [idle_threshold_seconds]
# Monitors all tmux panes running Claude processes
IDLE_THRESHOLD="${1:-5}" # seconds, default 5
DEBOUNCE_TIME=30 # seconds before we can send another notification
# Trap Ctrl+C to exit cleanly
trap 'echo -e "\nMonitoring stopped."; exit 0' INT
@ericboehs
ericboehs / coverage
Created June 9, 2025 02:01
SimpleCov Coverage Report Parser - Extract and display line and branch coverage from SimpleCov HTML reports with detailed per-file breakdown
#!/usr/bin/env ruby
require 'nokogiri'
require 'set'
# Path to the SimpleCov HTML report
coverage_file = File.join(Dir.pwd, 'coverage', 'index.html')
unless File.exist?(coverage_file)
puts "❌ No coverage report found at #{coverage_file}"
@ericboehs
ericboehs / devin
Last active June 12, 2025 16:44
Lightweight Devin CLI in Bash with fzf session selection
#!/usr/bin/env bash
#
# Lightweight Devin CLI in Bash
#
# Usage:
# devin new "<prompt>"
# devin message <session_id> "<text>"
# devin list [--all]
#
@ericboehs
ericboehs / watch_and_pull.sh
Created June 4, 2025 22:14
Watch and pull script that monitors git repository for changes and opens localhost:3000 when updates are detected
#!/bin/bash
# Function to open localhost:3000
open_localhost() {
echo "Changes detected! Opening localhost:3000..."
if command -v open >/dev/null 2>&1; then
open http://localhost:3000
elif command -v xdg-open >/dev/null 2>&1; then
xdg-open http://localhost:3000
else
@ericboehs
ericboehs / ssm-param-archive
Last active May 13, 2025 16:32
A Zsh script (ssm-param-archive) to move AWS SSM parameters from a source prefix into an “archived” prefix.
#!/usr/bin/env zsh
set -euo pipefail
# ─── Defaults & ENV Override ────────────────────────────────────────────────────
SOURCE_PREFIX="${SOURCE_PREFIX:-/dsva-vagov/vets-api}"
ARCHIVE_PREFIX="${ARCHIVE_PREFIX:-/dsva-vagov/vets-api/archived}"
DRY_RUN=false
UNARCHIVE=false
usage() {
@ericboehs
ericboehs / gh-job-attempts
Last active April 26, 2025 15:17
🔎 Quickly list and inspect all attempts for a job in a GitHub Actions run, with options to output full links or job IDs. Handy for debugging retries.
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<EOF
Usage: $(basename "$0") [options] <github-actions-run-url>
Options:
--only-links Only print the job links
--only-job-ids Only print the job IDs
@ericboehs
ericboehs / post-checkout
Created April 22, 2025 13:48
Git hook for Rails projects that ensures dependencies are up-to-date and reminds devs to run pending migrations after switching branches
#!/usr/bin/env bash
set -euo pipefail
# Exit during rebases, merges, or detached HEADs
if [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ] || [ -f .git/MERGE_HEAD ] || ! git symbolic-ref -q HEAD >/dev/null; then
echo "🔁 Skipping post-checkout hook (rebase/merge or detached HEAD)"
exit 0
fi
@ericboehs
ericboehs / ssm-param-envs
Created April 17, 2025 17:32
Check existence and access of SSM parameters in multiple AWS environments
#!/usr/bin/env bash
# Usage: ssm-param-envs /path/one /path/two ...
# Define the environments to iterate over
environments=("dev" "staging" "sandbox" "prod")
# Create a dynamic regex for sed substitution, escaping slashes
env_pattern="$(IFS='|'; echo "${environments[*]}")"
escaped_env_pattern="\\/(${env_pattern})\\/" # Example: \/(dev|staging|sandbox|prod)\/