Skip to content

Instantly share code, notes, and snippets.

View gracefullight's full-sized avatar
๐Ÿ‡ฆ๐Ÿ‡บ

Eunkwang Shin gracefullight

๐Ÿ‡ฆ๐Ÿ‡บ
View GitHub Profile
@rohitg00
rohitg00 / llm-wiki.md
Last active July 6, 2026 05:01 — 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 20K+ 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.

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.

"""
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
"mcpServers": {
"codex_subagent": {
"command": "npx",
"args": [
"-y",
"@openai/codex",
"mcp",
"-c model=\"gpt-5\"",
"-c model_reasoning_effort=\"high\""
]
@ruvnet
ruvnet / *README.md
Last active May 24, 2026 19:26
ChatGPT Codex Agent.md and environment setup script

Getting Started with ChatGPT Codex + Mastra Agents

Step-by-Step Instructions

  1. Open the ChatGPT Codex task setup panel. This is where you configure your environment before starting a task.

  2. Locate the "Setup Script" field. Youโ€™ll see a note that internet access is disabled after the script runs.

@thesamesam
thesamesam / xz-backdoor.md
Last active July 2, 2026 08:41
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@hyperupcall
hyperupcall / settings.jsonc
Last active March 17, 2026 09:13
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@kconner
kconner / macOS Internals.md
Last active June 26, 2026 11:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@DublinCity
DublinCity / AsyncLocalStorage.md
Last active January 2, 2026 06:55
AsyncLocalStorage

AsyncLocalStorage

์–ด๋–ค ๋ฌธ์ œ๊ฐ€ ์žˆ๋‚˜์š”

์šฐ๋ฆฌ์˜ ์„œ๋ฒ„๋กœ ํ•˜๋‚˜์˜ request๊ฐ€ ๋“ค์–ด์˜ค๋ฉด ์„œ๋ฒ„๋Š” ์‘๋‹ต์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ์—ฌ๋Ÿฌ API๋ฅผ ํ˜ธ์ถœํ•˜๊ณ  ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•˜์—ฌ ํ•„์š”ํ•œ ์‘๋‹ต์„ ๋Œ๋ ค์ค๋‹ˆ๋‹ค. requset๋Š” ๋™์‹œ์— ์—ฌ๋Ÿฌ๊ฐœ ๋“ค์–ด์˜ค๊ธฐ ๋•Œ๋ฌธ์— ์šฐ๋ฆฌ๋Š” request๋งˆ๋‹ค ์–ด๋–ค ์ž‘์—…์„ ์ˆ˜ํ–‰ํ–ˆ๋Š”์ง€ ๊ทธ๋ฃนํ•‘ํ•˜์—ฌ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€์žฅ ์ผ๋ฐ˜์ ์ธ ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ์š”์ฒญ๋งˆ๋‹ค requestID ๋ฅผ ์ƒ์„ฑํ•ด ํ• ๋‹นํ•˜๊ณ  ์ˆ˜ํ–‰ํ•˜๋Š” ์ž‘์—…๋งˆ๋‹ค requestID ๋ฅผ ํ•จ๊ป˜ ๊ธฐ๋กํ•˜์—ฌ requestID ๋‹จ์œ„๋กœ ๊ทธ๋ฃนํ•‘ํ•ด ํ™•์ธํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ํŒจํ„ด์€ Ruby on rails ๋‚˜ Python Django ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ๊ฐ request๋Š” ํ•˜๋‚˜์˜ thread์— ํ• ๋‹น๋˜์–ด ๋™๊ธฐ๋กœ ์ฒ˜๋ฆฌ๋˜๊ธฐ ๋•Œ๋ฌธ์— requestID ์™€ ๊ฐ™์€ ์š”์ฒญ ์ •๋ณด๋Š” thread context ์— ์ €์žฅํ•˜์—ฌ ํ•„์š”ํ•  ๋•Œ ๊บผ๋‚ด ์‚ฌ์šฉํ•˜๋ฉด ๋˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.