Skip to content

Instantly share code, notes, and snippets.

@crewshin
crewshin / llm-wiki.md
Created April 6, 2026 17:10 — 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.

@crewshin
crewshin / WeekOfEULA.txt
Created December 7, 2023 16:11
WeekOF EULA
End-User License Agreement ("Agreement")
Last updated: December 07, 2023
Please read this End-User License Agreement carefully before clicking the "I Agree" button, downloading or using WeekOf.
Interpretation and Definitions
Interpretation
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
Definitions
@crewshin
crewshin / WeekOfDocs.md
Created December 7, 2023 15:36
WeekOf Documentation

This custom JQL function allows you to replace hard coded date ranges like:

created >= 2023-11-19 AND created <= 2023-11-25 order by created DESC

with:

issue in weekOf("1", "created") order by created DESC for last week. This is relative from today (minus 1 week).

or:

{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "jsonresume-theme-even-crewshin",
"colors": {
"background": [
"#191e23"
],
"dimmed": [
"#23282d"
@crewshin
crewshin / KeyboardAvoiding.swift
Last active July 18, 2024 20:39
KeyboardAvoiding SwiftUI
import SwiftUI
class KeyboardAvoidingHostingController<Content>: UIHostingController<Content> where Content: View {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
@crewshin
crewshin / SwiftUI-web-image-download.swift
Created June 16, 2019 14:36
SwiftUI web image download
import SDWebImage
// ...
func fetchWeatherImage() -> Image {
let imageFileName = weather.iconUrl ?? "01d"
let uiImageView = UIImageView()
uiImageView.sd_setImage(with: URL(string: "https://path/\(imageFileName).png"), completed: nil)
if let image = uiImageView.image {