Skip to content

Instantly share code, notes, and snippets.

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.

@ppoffice
ppoffice / xstartup
Last active April 22, 2026 22:31
VNC xstartup for Ubuntu Desktop (Gnome)
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
export DESKTOP_SESSION=/usr/share/xsessions/ubuntu.desktop
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
dbus-launch --exit-with-session /usr/bin/gnome-session --systemd --session=ubuntu
@mogzol
mogzol / Create a bootable USB for Lenovo Yoga Slim 7X.md
Last active April 22, 2026 22:30
Create a bootable USB for Lenovo Yoga Slim 7X

Create a bootable USB for Lenovo Yoga Slim 7X

I originally wrote this as a Reddit comment, but it was deleted (I guess because it has links? idk), so I'm creating this Gist instead to document how I was able to boot the Windows installer on this laptop.

Note that the easiest solution is to just download the recovery media creator from Lenovo's support site, but I wanted to run the stock Windows installer, so this outlines how to do that.


Here are the steps I took to boot the Windows installer on my Lenovo Yoga Slim 7X (with an ARM64 Snapdragon Elite X CPU). I initially tried using Rufus, and while that drive did show up in the boot menu, selecting it would just hang on the YOGA logo forever.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 22, 2026 22:29
set -e, -u, -o, -x pipefail explanation
@PowerUserZ
PowerUserZ / discord-access.md
Last active April 22, 2026 22:24
Discord access

Discord Access Guide

Voice / calls: Voice channels are not covered by this guide. Voice servers use region-specific Google Cloud endpoints that cannot be reliably pinned. If voice/calls don't work after applying these fixes, use a VPN or see Method 3.


Method 1 — Change your DNS (try this first)

Changing your DNS resolver is the least invasive fix. No system files are touched, and it often resolves the block on its own without needing to edit hosts.

@ccagle8
ccagle8 / hexToKmlColor.php
Last active April 22, 2026 22:16
PHP Function - Transform hex color to KML format. Used on https://cartographyvectors.com
/*
# KML files use a combined hexadecimal value in place of the normal HTML rgba value.
# The format is described in detail here: https://developers.google.com/kml/documentation/kmlreference#elements-specific-to-balloonstyle
#
# Syntax Example:
# $kmlColor = hexToKmlColor('#CC0000', 40); // returns `6600CC00`
#
# This function can handle all formats of hex values: with or without the hash, shorthand or long.
# It also handles opacity values either in percentage or decimal form.
#
@Haseeb-Qureshi
Haseeb-Qureshi / claude-code-harness-deep-dive.md
Created March 31, 2026 21:26
Inside the Claude Code source

Inside the Claude Code source

Anthropic's Claude Code CLI source code leaked onto GitHub recently. All of it. About 1,900 files and a lot of TypeScript.

I read through the key modules. What follows is a breakdown of the surprising parts: how the system actually works, where Anthropic made clever engineering choices, and where their approach diverges from OpenAI's Codex in ways you wouldn't guess from using either tool.

Lifecycle of a request

Here's what happens when you type a message into Claude Code: