Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@rohitg00
rohitg00 / llm-wiki.md
Last active May 27, 2026 20:24 — 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 10K 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 May 9, 2026 14:08
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
from txtai import Embeddings, LLM
# Data to index
data = [
"US tops 5 million confirmed virus cases",
"Canada's last fully intact ice shelf has suddenly collapsed, forming a Manhattan-sized iceberg",
"Beijing mobilises invasion craft along coast as Taiwan tensions escalate",
"The National Park Service warns against sacrificing slower friends in a bear attack",
"Maine man wins $1M from $25 lottery ticket",
"Make huge profits without work, earn up to $100,000 a day"
@pykeras
pykeras / ollama_dedicated_gpu.md
Last active August 6, 2025 16:26
Run ollama on specific GPU(s)

Ollama GPU Selector: Customize GPU Usage for Ollama

If you want to run Ollama on a specific GPU or multiple GPUs, this tutorial is for you. By default, Ollama utilizes all available GPUs, but sometimes you may want to dedicate a specific GPU or a subset of your GPUs for Ollama's use. The idea for this guide originated from the following issue: Run Ollama on dedicated GPU.

Steps:

  1. Create a script let's call it ollama_gpu_selector.sh:

    nano ollama_gpu_selector.sh