Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile

Claude Code TeammateTool - Source Code Analysis

This is not a proposal. This documents existing but hidden functionality found in Claude Code v2.1.19 binary, plus speculation on how it could be used.


Executive Summary

TeammateTool already exists in Claude Code. We extracted this from the compiled binary at ~/.local/share/claude/versions/2.1.19 using strings analysis. The feature is fully implemented but gated behind feature flags (I9() && qFB()).

# Create a new worktree and branch from within current git directory.
ga() {
if [[ -z "$1" ]]; then
echo "Usage: ga [branch name]"
exit 1
fi
local branch="$1"
local base="$(basename "$PWD")"
local worktree_path="../${base}--${branch}"
@josephbolus
josephbolus / mysql_migrate.sh
Last active November 28, 2025 09:03
MySQL Instance Migration Script – with --dry-run support
#!/bin/bash
# =============================================================================
# MySQL Instance Migration – fully compatible with MySQL Shell 8.0.34+ / 8.4+
# No more "Invalid options: maxRate"
# =============================================================================
set -euo pipefail
DRY_RUN=false
[[ "${1:-}" == "--dry-run" || "${1:-}" == "-n" ]] && DRY_RUN=true && shift
@josephbolus
josephbolus / splunk-uf-install.sh
Last active November 17, 2025 20:05
Splunk Universal Forwarder 9.4.4 unattended install + deployment client config. To install: curl -fsSL https://gist.githubusercontent.com/USER/ID/raw/splunk-uf-install.sh | sudo bash
#!/usr/bin/env bash
#
# Splunk Universal Forwarder 9.4.4 unattended install + deployment client config
# Intended for use as:
# curl -fsSL https://gist.githubusercontent.com/USER/ID/raw/splunk-uf-install.sh | sudo bash
#
set -euo pipefail
### Sanity: root check #########################################################
@josephbolus
josephbolus / install-doi-rootca.sh
Last active November 3, 2025 23:29
Installs the DOI Root CA 2 certificate system-wide on common Linux distros
#!/usr/bin/env sh
# Installs the DOI Root CA 2 certificate system-wide on common Linux distros.
# Supports: RHEL/CentOS/Rocky/Alma/Fedora, Ubuntu/Debian, SUSE, Alpine.
# Idempotent: only updates trust if the cert changed or is missing.
#
# Use in a Dockerfile:
# RUN curl -fsSL https://gist.githubusercontent.com/josephbolus/57aa8c2521cdf8d16e64739a07dfabe8/raw/474a78889ad1bdf400ec397090a4fd206ea07432/install-doi-rootca.sh | sh
set -eu
@josephbolus
josephbolus / loghelper.md
Created October 8, 2025 17:36
log-helper.sh — minimal logging library for Bash

Logging Library – Install & Integration Guide

This document explains:

  1. Ensuring file logs are always colorless.
  2. Converting the logger into a reusable library for other Bash scripts.
  3. Where to install it on a Linux system (conventional paths), plus minimal packaging tips.

@josephbolus
josephbolus / bug-smash.md
Created September 13, 2025 04:25
Incredibly powerful Claude Code prompt when dealing with a pesky bug:

Incredibly powerful Claude Code prompt when dealing with a pesky bug:

I am experiencing the following bug:

[explain_bug_here]

I need your help to identify the exact cause of this bug and implement an effective solution. To do this, carefully follow the workflow below, in this specific order:

# Use a specific Ubuntu version for better reproducibility
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
# Find the latest URL from: https://dev.mysql.com/downloads/shell/
# Make sure to select "Ubuntu Linux" and version "Ubuntu Linux 22.04 (x86, 64-bit)"
ARG MYSQL_SHELL_URL="https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_8.0.43-1ubuntu22.04_amd64.deb"
# Set DEBIAN_FRONTEND to noninteractive to prevent prompts during build
ENV DEBIAN_FRONTEND=noninteractive