Skip to content

Instantly share code, notes, and snippets.

View webbertakken's full-sized avatar
🧙
Learning new things

Webber Takken webbertakken

🧙
Learning new things
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.

@webbertakken
webbertakken / Microsoft.PowerShell_profile.ps1
Created February 9, 2025 19:14
My PowerShell profile
# General modules
Import-Module -Name PSReadLine # typeahead predictions and whatnot
Import-Module -Name Terminal-Icons # Icons when listing directories
Import-Module -Name PSFzf # activate using `Ctrl T`, `Ctrl R` and `Alt C`
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 # Exposes `refreshenv`
Invoke-Expression (&starship init powershell)
# Advanced completion features (arrow up and down after having started typing)
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
@webbertakken
webbertakken / starship.toml
Last active March 30, 2026 13:57
My terminal prompt configuration for Starship.rs
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
#############
# Notes #
#############
# This config assumes you have a Nerd Font installed and enabled in your terminal.
# I use 'FiraCode Nerd Font Mono', but you should be able to use any Nerd Font you like.
@webbertakken
webbertakken / package.json
Last active April 18, 2025 18:24
Definitive cross-platform lint-staged config (explained)
{
// 1. Use these exact dependencies
"devDependencies": {
"husky": "=8.0.3",
"lint-staged": "=13.2.1"
}
// 2. Make sure it installs when people install dependencies
"scripts": {
"prepare": "husky install"
@rmorse
rmorse / react-router-dom-v.6.02.prompt.blocker.js
Last active January 12, 2026 13:14
Adds back in `useBlocker` and `usePrompt` to `react-router-dom` version 6.0.2 (they removed after the 6.0.0 beta, temporarily)
/**
* These hooks re-implement the now removed useBlocker and usePrompt hooks in 'react-router-dom'.
* Thanks for the idea @piecyk https://github.com/remix-run/react-router/issues/8139#issuecomment-953816315
* Source: https://github.com/remix-run/react-router/commit/256cad70d3fd4500b1abcfea66f3ee622fb90874#diff-b60f1a2d4276b2a605c05e19816634111de2e8a4186fe9dd7de8e344b65ed4d3L344-L381
*/
import { useContext, useEffect, useCallback } from 'react';
import { UNSAFE_NavigationContext as NavigationContext } from 'react-router-dom';
/**
* Blocks all navigation attempts. This is useful for preventing the page from
* changing until some condition is met, like saving form data.
@webbertakken
webbertakken / .gitattributes
Last active June 1, 2026 10:02
.gitattributes for Unity projects
#
# Git attributes for Unity projects
#
# Compiled by the GameCI community under the MIT license - https://game.ci
#
# Latest version at https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc
#
# Ensure that text files that any contributor introduces to the repository have their line endings normalized
* text=auto
@sindresorhus
sindresorhus / esm-package.md
Last active May 28, 2026 08:41
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nodkz
nodkz / .babelrc.js
Last active April 27, 2026 04:19
Babel 7.0 with .babelrc.js DEPRECATED! This config was created when babel 7 was in beta
/* eslint-disable prefer-template */
const path = require('path');
const aliases = require('./aliases');
// ///////////////////////////////////////////////////////////////
// ////////////////// PLUGINS ////////////////////////////////
// ///////////////////////////////////////////////////////////////
const commonPlugins = [
@dahjelle
dahjelle / pre-commit.sh
Created July 13, 2016 16:48
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done