Skip to content

Instantly share code, notes, and snippets.

View asmattic's full-sized avatar

Matt Oldfield asmattic

View GitHub Profile
@asmattic
asmattic / llm-wiki.md
Created April 6, 2026 02:47 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

{
"apiVersion": "dashboard.grafana.app/v2beta1",
"kind": "Dashboard",
"metadata": {
"name": "claude-code-metrics",
"generation": 12,
"creationTimestamp": "2025-12-10T13:33:56Z",
"labels": {},
"annotations": {}
},
@asmattic
asmattic / recursively-pull-git-updates.sh
Created June 29, 2025 19:54
Recursively update .git repos within a folder
#!/bin_bash
# Directory to search for git repositories
# Defaults to current directory if no argument is provided
SEARCH_DIR="${1:-.}"
# Find all .git directories, then go to their parent directory and run git pull
find "$SEARCH_DIR" -name ".git" -type d -prune | while IFS= read -r d; do
REPO_DIR="$(dirname "$d")"
echo "Pulling changes in: $REPO_DIR"
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Augmented Architect: A Cursor Power User's Guide (2025)</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@asmattic
asmattic / linux-system-profile-basics.py
Created June 20, 2025 03:00
Linux VM or Native Python script for a quick gauge of system performance capabilities
import psutil
import time
import datetime
import csv
import os
# --- Configuration ---
LOG_INTERVAL_SECONDS = 5 # How often to log data (in seconds)
LOG_DURATION_MINUTES = 60 # How long to run the monitoring (in minutes). Set to 0 for indefinite.
LOG_FILE_NAME = "system_performance_log.csv"
@asmattic
asmattic / clean_up_node_modules.sh
Created April 4, 2025 12:58
Recursively removes all node modules directories within a given directory
#!/bin/bash
echo -e "\nFind and optionally delete all top level node_modules in a specific directory.\n"
# Initialize an array to store paths
NODE_MODULES_PATHS=()
while IFS= read -r line; do
size=$(echo "$line" | awk '{print $1}')
path=$(echo "$line" | awk '{print $2}')
@asmattic
asmattic / webp-thumbnail-support.sh
Created December 3, 2021 22:57
Add webp thumbnail preview support in ubuntu file manager
# Add the 3rd party PPA
sudo add-apt-repository ppa:krifa75/eog-ordissimo
# Update package cache and install library
sudo apt update && sudo apt install webp-pixbuf-loader
# remove the Ubuntu PPA, because it also contains the variant
# of eog (Eye of GNOME, GNOME’s default image viewer) that
# might break your other packages
sudo add-apt-repository --remove ppa:krifa75/eog-ordissimo
@asmattic
asmattic / gmf-2021-css-updates.css
Last active September 16, 2021 06:36
GMF-2021-css-updates
/** Entry header */
.site-content .entry-header .entry-title {
text-align: left;
}
.entry-title {
margin: 0 0 0 10px;
}
/** fil up more of page */
@asmattic
asmattic / ubuntu-not-detecting-second-display.sh
Last active March 22, 2021 19:52
Ubuntu 20.04 Not detecting second display
sudo apt install snapd && sudo snap install snap-store && sudo reboot
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/coverage/**": true,
"**/node_modules/*/**": true,
"**/server/data/**": true,
"**/dist/**": true,
"**/modules/**": true,
"**/info_gathering/**": true,