Skip to content

Instantly share code, notes, and snippets.

View ericboehs's full-sized avatar

Eric Boehs ericboehs

  • Oddball
  • Enid, OK
  • 12:21 (UTC -06:00)
View GitHub Profile
@ericboehs
ericboehs / pbcopy-decrypt
Last active December 3, 2025 22:59
Share secrets from your clipboard over Slack/Teams/Email/etc with other devs
#!/usr/bin/env bash
set -euo pipefail
# pbcopy-decrypt - Decrypt age-encrypted clipboard contents
usage() {
cat >&2 <<EOF
Usage: pbcopy-decrypt [OPTIONS]
Decrypt age-encrypted clipboard contents using an SSH private key.
@ericboehs
ericboehs / scan-machine-shai-hulud.sh
Last active November 26, 2025 21:28
Shai-Hulud 2.0 Full Machine Scanner - Scans for npm supply chain attack indicators
#!/bin/bash
#
# Shai-Hulud 2.0 Full Machine Scanner
# ====================================
#
# Scans your machine for signs of the Shai-Hulud npm supply chain attack
# (November 2025). This attack compromised 796+ npm packages affecting
# 20+ million weekly downloads.
#
# WHAT THIS SCRIPT DOES:
@ericboehs
ericboehs / gh-pm
Created November 19, 2025 21:00
gh-pm: Interactive GitHub Project Manager with fzf - Cached issue list with edit, status update, and sorting capabilities
#! /usr/bin/env bash
set -e
set -u
set -o pipefail
export CACHE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/gh-pm-list.txt"
mkdir -p "$(dirname "$CACHE_FILE")"
# Only refresh if cache is older than 5 minutes, missing, or empty
#!/bin/bash
# claude-notify - Notification handler for Claude Code hooks
# Parse command line arguments
sender=""
while [[ $# -gt 0 ]]; do
case $1 in
--sender)
sender="$2"
shift 2
@ericboehs
ericboehs / parse_codeowners
Last active August 22, 2025 13:22
CODEOWNERS parser with CLI and comprehensive tests
#!/usr/bin/env ruby
# frozen_string_literal: true
# Parser for GitHub CODEOWNERS files that supports pattern matching and owner lookup
class CodeownersParser
def initialize(codeowners_file_path = '.github/CODEOWNERS')
@codeowners_file_path = codeowners_file_path
@rules = parse_codeowners_file
end
@ericboehs
ericboehs / list.md
Created August 12, 2025 17:07
AI Data Linking Summary

Summary

This Markdown pattern shows how to create an annotated summary that links directly to detailed items in a list.

It works by giving each list item a unique HTML anchor ID (<a id="..."></a>) and then referencing those IDs in the summary with clickable links.

The result is a compact, easy-to-scan summary where readers can jump straight to the full details of any item — useful for documentation, research notes, meeting summaries, or AI-generated outlines.

Prompt

Can you give me a list of 20 things and then summarize those 20 things in 3 sentences but links back to each of the 20 items in your summary as annotations?

@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}"