Skip to content

Instantly share code, notes, and snippets.

@mukhortov
mukhortov / llm-wiki.md
Created April 7, 2026 18:13 — 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.

@mukhortov
mukhortov / usbreset.c
Last active January 16, 2022 09:02 — forked from x2q/usbreset.c
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
* */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@mukhortov
mukhortov / remap_section_to_esc.sh
Last active April 30, 2018 20:05 — forked from lauri/gist:84674ab22aafc4e0f398a52a53cfd7ec
Remap section sign key (§) to ESC (useful if you have a MacBook Pro with touch bar)
#!/bin/bash
#
# Remap section sign key (§) to ESC
#
# 0x700000064 - section sign (§) key below ESC
# 0x700000029 - ESC
#
# https://developer.apple.com/library/content/technotes/tn2450/_index.html
#
@mukhortov
mukhortov / rotate.less
Last active August 29, 2015 14:15 — forked from swider/rotate.less
.rotate(@val) {
-moz-transform: rotate(@val); /* FF3.5+ */
-o-transform: rotate(@val); /* Opera 10.5 */
-webkit-transform: rotate(@val); /* Saf3.1+, Chrome */
-ms-transform: rotate(@val); /* IE9 */
transform: rotate(@val);
/* IE6-IE8 */
@radians: ~`parseInt("@{val}") * Math.PI * 2 / 360`;
@costheta: ~`Math.cos("@{radians}")`;