Skip to content

Instantly share code, notes, and snippets.

@namjae
namjae / llm-wiki.md
Created May 13, 2026 13:38 — 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.

@namjae
namjae / errata.md
Created February 10, 2025 08:38 — forked from kelcecil/errata.md
Machine Learning in Elixir - Errata and Feedback

For any randos that stumble on this gist, you should consider buying Machine Learning in Elixir. Despite any notes I add here, it's an exceptional book that's worth your time and money.

Chapter 1

Pg 13

I can't get the code snippet to work as written:

cols = ~w(sepal_width sepal_length petal_length petal_width)
@namjae
namjae / create_post.exs
Created November 17, 2024 14:25 — forked from stevedomin/create_post.exs
Using UUIDs as primary key with Ecto
defmodule MyBlog.Repo.Migrations.CreatePost do
use Ecto.Migration
def change do
create table(:posts, primary_key: false) do
add :id, :uuid, primary_key: true
add :body, :string
add :word_count, :integer
timestamps
@namjae
namjae / application.ex
Created November 6, 2024 06:08 — forked from akrisanov/application.ex
Adding Ecto To An Elixir Application Without Phoenix
defmodule MyApp.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
@namjae
namjae / asciidoc-syntax-quick-reference.adoc
Created November 2, 2024 08:54 — forked from mojavelinux/asciidoc-syntax-quick-reference.adoc
AsciiDoc Syntax Quick Reference (sample document)

AsciiDoc Syntax Quick Reference

@namjae
namjae / gist:d35c9ec21c7b7cf2a20fc1aca266419f
Created June 23, 2024 07:47 — forked from lixianyang/gist:3e19ff50bbae1024cebc6b6fc1103848
ubuntu snap docker run as a normal user
Create and join the docker group.
$ sudo addgroup --system docker
$ sudo adduser $USER docker
$ newgrp docker
You will also need to disable and re-enable the docker snap if you added the group while it was running.
$ sudo snap disable docker
$ sudo snap enable docker
@namjae
namjae / observer.md
Created June 18, 2024 04:39 — forked from pnc/observer.md
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@namjae
namjae / debian_from_ros_pkg.md
Created November 25, 2021 07:52 — forked from awesomebytes/debian_from_ros_pkg.md
How to create a debian from a ROS package
@namjae
namjae / listop.ss
Created June 7, 2021 11:14 — forked from vishesh/listop.ss
Some common operation on Scheme List structure
(define (delete-n list n)
(if (= n 0)
(cdr list)
(cons (car list) (delete-n (cdr list) (- n 1)))))
(define (insert-n list item n)
(if (= n 0)
(cons item list)
(cons (car list) (insert-n (cdr list) item (- n 1)))))
@namjae
namjae / logging.rkt
Created May 28, 2021 09:24 — forked from Metaxal/logging.rkt
Simple usage of Racket's logging facility
#lang racket/base
; One way to define a logger
(define lg (make-logger 'my-logger))
; Define a receiver for this logger, along with a log level
(define rc (make-log-receiver lg 'error)) ; also try with 'debug
; Another way to define a logger, with additional forms
(define-logger lg2)
(define rc2 (make-log-receiver lg2-logger 'debug))