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 September 4, 2025 06:53
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
#
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active September 13, 2025 09:36
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

@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 September 12, 2025 03:22
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
@straker
straker / README.md
Last active August 30, 2025 20:26
Basic Block Dude HTML and JavaScript Game

Basic Block Dude HTML and JavaScript Game

This is a basic implementation of Block Dude, an old TI-83/4 Calculator game. It's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • More levels
  • Add more levels and have the next level start once the last one is finished
@wiseman
wiseman / agent.py
Last active April 21, 2025 17:37
Langchain example: self-debugging
from io import StringIO
import sys
from typing import Dict, Optional
from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents.tools import Tool
from langchain.llms import OpenAI