Skip to content

Instantly share code, notes, and snippets.

View johnmccabe's full-sized avatar
💀

John McCabe johnmccabe

💀
View GitHub Profile

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.

@alexellis
alexellis / FAASD_MULTIPASS.md
Last active July 31, 2021 01:50
FAASD_MULTIPASS.md
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active September 10, 2026 17:11
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@johnmccabe
johnmccabe / timeout_buffered_error_channel.go
Created April 11, 2017 14:51
Dealing with Timeout via a buffered error channel
package main
import (
"fmt"
"log"
"time"
)
func work() error {
for i := 0; i < 1000; i++ {
@BretFisher
BretFisher / docker-for-mac.md
Last active August 17, 2026 16:11
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active September 2, 2026 16:29
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@mikezaccardo
mikezaccardo / same-server-entity-example.yaml
Last active November 10, 2015 14:27
SameServerEntity Example
name: "SameServerEntity Example"
location: localhost
services:
- type: org.apache.brooklyn.entity.software.base.SameServerEntity
id: parent
name: Parent Entity
children.startable.mode: background_late
brooklyn.children:
- serviceType: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@Integralist
Integralist / Ruby Lambdas.md
Last active August 28, 2025 08:25
Ruby lambdas

Lambda: standard

# Creating a lambda
l = lambda { |name| "Hi #{name}!" }

# Executing the lambda
l.call("foo") # => Hi foo!