Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/
@tovacinni
tovacinni / gtr.sh
Last active October 6, 2025 01:56
Git worktree helper for Claude Code
# gtr ─ Git worktree helper
#
# Examples
# --------
# gtr create feature0 # add ~/code/worktrees/feature0 (branch claude/feature0)
# gtr create feat1 feat2 # add two worktrees at once
# gtr rm feature0 # remove the worktree directory
# gtr cd feature0 # jump into the worktree directory
# gtr claude feature0 # run `claude` while inside that worktree
#
#!/bin/bash
function go_modernize_interactive() {
# Check if bat is installed
if ! command -v bat &>/dev/null; then
echo "bat is not installed. Please install it first (https://github.com/sharkdp/bat)"
echo "You can install it with: "
echo " - Homebrew: brew install bat"
echo " - Ubuntu/Debian: apt install bat"
echo " - Fedora: dnf install bat"
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active October 15, 2025 16:27
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58

@adibhanna
adibhanna / .tmux.conf
Last active October 2, 2025 09:53
.tmux.conf
#--------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------
# Use Vi mode
setw -g mode-keys vi
# Increase scrollback buffer size
set -g history-limit 10000
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@smx-smx
smx-smx / XZ Backdoor Analysis
Last active June 2, 2025 22:53
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@q3k
q3k / hashes.txt
Last active April 28, 2025 12:32
liblzma backdoor strings extracted from 5.6.1 (from a built-in trie)
0810 b' from '
0678 b' ssh2'
00d8 b'%.48s:%.48s():%d (pid=%ld)\x00'
0708 b'%s'
0108 b'/usr/sbin/sshd\x00'
0870 b'Accepted password for '
01a0 b'Accepted publickey for '
0c40 b'BN_bin2bn\x00'
06d0 b'BN_bn2bin\x00'
0958 b'BN_dup\x00'
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active October 15, 2025 03:05
Some notes, tools, and techniques for reverse engineering macOS binaries
@Shubhang
Shubhang / music_visualizer.py
Created March 29, 2023 23:02
Visualizing Audio with Python: Music Visualizer using NumPy, Matplotlib, MoviePy, and PyDub | GitHub Gist
# Author: Shubhang, 2023
# Description: This Python script demonstrates how to visualize audio using NumPy, Matplotlib, and MoviePy.
# It reads an audio file in WAV format, converts the audio samples to a NumPy array,
# and creates a video animation from a plot of the audio samples.
# The resulting video file shows the amplitude of the audio samples over time.
import numpy as np
import matplotlib.pyplot as plt