Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@ahumanft
ahumanft / LLM-Wiki-V3.md
Last active July 19, 2026 03:33
LLM Wiki V3: Compartmentalized Wiki Architecture

LLM Wiki V3: Segmentation

Karpathy gave us the foundation. Rohitg00 warned us what breaks. V3 is how you structure it to scale.

This is a concept document in the same spirit as V1 and V2.

V1 was intentionally vague. Build on it. V2 was intentionally open. Solve it.

@rohitg00
rohitg00 / llm-wiki.md
Last active August 10, 2026 05:34 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 20K+ Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

@liskl
liskl / The-Complete-Guide-to-Building-Skills-for-Claude.md
Last active July 27, 2026 17:19
Complete guide to building Skills for Claude — covers fundamentals, planning, testing, distribution, patterns, and YAML frontmatter reference (converted from Anthropic's official PDF)
@mikeckennedy
mikeckennedy / .zshrc
Last active April 4, 2026 23:47
Security-aware Always Activate The Venv for Python
# Standard zshrc stuff like path, etc.
# ...
# Enable using the two files above:
# Functions
source venv-auto-activate.sh
# Venv security whitelist/blocklist
alias venv-security='uv run -q --no-project ~/scripts/venv-security.py'
@i2cjak
i2cjak / nextpcb_search.py
Created September 12, 2025 16:57
Search NextPCB's part catalog from the command line
import requests
import json
import argparse
from rich.console import Console
from rich.table import Table
from rich.live import Live
from rich.spinner import Spinner
def search_for_part(description, show_all, no_sort):
"""
@ubergarm
ubergarm / Qwen3-MoE-Benchmarks.md
Last active April 17, 2026 16:57
Qwen3 235B and 30B MoE Quant Benchmarking Roundup

The Great Quant Wars of 2025

"All things leave behind them the Obscurity... and go forward to embrace the Brightness..." — Dao De Jing #42

tl;dr;

  • Q: Who provides the best GGUFs now?
  • A: They're all pretty good.

Skip down if you just want graphs and numbers comparing various Qwen3-30B-A3B GGUF quants.

@sammcj
sammcj / gist:ec38182b10f6be3f7e96f7259a9b37e1
Created December 13, 2024 03:55
download-azure-ai-models.py
import asyncio
import aiohttp
import os
from pathlib import Path
import logging
from bs4 import BeautifulSoup
from typing import List, Dict
from dataclasses import dataclass
from datetime import datetime
import time
@rmtbb
rmtbb / iMessageAttachmentsLinksExtractor.sh
Created November 3, 2024 23:16
iMessage Attachments and Links Extractor for macOS
#!/bin/bash
# Define the main export folder
export_folder=~/Desktop/iMessages_Export
mkdir -p "$export_folder"
# Part 1: Generate the CSV file
echo "Generating CSV file..."
sqlite3 ~/Library/Messages/chat.db <<EOF
@jrruethe
jrruethe / vram.rb
Created August 1, 2024 18:47
Calculate VRAM requirements for LLM models
#!/usr/bin/env ruby
# https://asmirnov.xyz/vram
# https://vram.asmirnov.xyz
require "fileutils"
require "json"
require "open-uri"
# https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator/blob/main/index.html