Skip to content

Instantly share code, notes, and snippets.

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.

@darvs
darvs / mame226.vert.txt
Created December 9, 2020 20:24
A list of all vertical games in MAME 0.226
005
1941
1941j
1941r1
1941u
1942
1942a
1942abl
1942b
1942h
@Strus
Strus / clangd.md
Last active June 10, 2026 21:56
How to use clangd C/C++ LSP in any project

How to use clangd C/C++ LSP in any project

tl;dr: If you want to just know the method, skip to How to section

Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the easiest way to painlessly generate it is to use CMake.

For simple projects you can try to use Bear - it will capture compile commands and generate compile_commands.json. Although I could never make it work in big projects with custom or complicated build systems.

But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.

#include <Servo.h>
Servo middle, left, right, claw ; // Creates 4 "servo objects"
#define CLAW_OFF 0
#define CLAW_ON 90
volatile int clawPosition;
volatile bool clawOpen;
@ReyArlena
ReyArlena / audio-sinks.md
Last active June 10, 2026 21:43
A quick guide on creating audio sinks with pipewire

Creating the Virtual Sinks

This will be the config file of all the channels you want to have active and be able to assign applications to using something like pavucontrol. You can also visually see things using a patch viewer such as helvum.

Please note that this method is software-based and therefore there will be slight delay in routed audio. This should be find for most applications, such as streaming. However, it is not recommended to loopback your microphone for monitoring your own voice, etc.

Create the following Virtual Sinks file

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@sukesh-ak
sukesh-ak / WT32-SC01-Plus_ESP32-S3.ino
Last active June 10, 2026 21:39
WT32-SC01-Plus Test sample using LovyanGFX driver
/*
Simple Touch Drawing sample for WT32-SC01-Plus_ESP32-S3
Requirements:
- Development board : WT32-SC01-Plus_ESP32-S3
- Arduino Library - Display/Touch : LovyanGFX
- Board selected in Arduino : ESP32S3 Dev Module
*/
#define LGFX_USE_V1 // set to use new version of library