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.

@shanselman
shanselman / copilot-cli-oh-my-posh-statusline.md
Last active June 23, 2026 17:09
Use Oh My Posh for the GitHub Copilot CLI statusline

Use Oh My Posh for the GitHub Copilot CLI statusline

GitHub Copilot CLI has an experimental statusline feature that can run a local command and render the command's output at the bottom of the Copilot terminal UI.

If you already use Oh My Posh, you can use the same engine, colors, and segments to render a Copilot-aware statusline in a few minutes.

This guide shows a Windows + PowerShell setup, but the idea is portable:

  1. Copilot calls a local script.
  2. Copilot sends session state to the script as JSON on stdin.
@aasmith
aasmith / gist:1f50c4354d2cc7a16470
Last active June 23, 2026 17:08 — forked from pvalkone/gist:9292589
How to set up IPMI Serial-Over-LAN (SOL) on a ASRock C2550D4I motherboard running FreeNAS
BIOS Setup
----------
1) Boot into the BIOS setup utility (press F2 or DEL) and open Advanced > Serial Port Console Redirection.
2) Disable COM1 and EMS console redirection and enable SOL redirection.
3) Set the SOL console redirection settings as follows:
Aptio Setup Utility - Copyright (C) 2012 American Megatrends, Inc.
Advanced
/----------------------------------------------------+-------------------------\
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active June 23, 2026 17:07
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@nmnmcc
nmnmcc / neovim.md
Created July 16, 2025 06:14
NeoVim Cheat Sheet

NeoVim Cheat Sheet

I. Basic Concepts

1. Modes

NeoVim is a modal editor, primarily featuring the following modes:

  • Normal Mode: The default mode for navigating, deleting, copying, and pasting text. Press Esc to return to this mode from others.
  • Insert Mode: Used for typing text. Enter it with keys like i, a, o.
@RickMcKay777
RickMcKay777 / statusline.sh
Created June 23, 2026 17:01
Claude Status Bar
#!/bin/bash
# Claude Code custom status line — two lines:
# Line 1: folder + full path + git branch (if in a repo) + [model ctx:%] (left)
# Line 2: 5-hour and 7-day usage with color-coded bars + reset countdowns (right-aligned)
#
# Reads the JSON Claude Code pipes to it on stdin. Requires: jq, GNU sed, wc, date.
# Right-alignment uses the COLUMNS env var (Claude Code sets it on v2.1.153+).
#
# Install:
# 1. Save this file (e.g. ~/.claude/statusline.sh)
@JonasGroeger
JonasGroeger / git-libsecret.md
Last active June 23, 2026 17:02 — forked from maelvls/README.md
Guide: How to install git-credential-helper / libsecret in Debian / Ubuntu

Storing your GIT credentials in libsecret

# Install dependencies
$ sudo apt install make gcc git libsecret-1-0 libsecret-1-dev libglib2.0-dev

# Compile binary
$ sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret

# Configure git to use binary as credential storage
@vahidk
vahidk / colorTransform.js
Last active June 23, 2026 16:58
Convert RGB to HSL and vice versa in Javascript.
// This code is based on https://en.wikipedia.org/wiki/HSL_and_HSV
// Free to use for any purpose. No attribution needed.
function rgbToHsl(r, g, b) {
r /= 255; g /= 255; b /= 255;
let max = Math.max(r, g, b);
let min = Math.min(r, g, b);
let d = max - min;
let h;
if (d === 0) h = 0;