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.

@topherhunt
topherhunt / gist:b7fa7b915d6ee3a7998363d12dc8c842
Created February 12, 2026 12:17
Claude Code: Thought-provoking spinner verbs
// Add this to `.claude/settings.json` to replace Claude Code's silly spinner verbs with something a bit harder-hitting.
"spinnerVerbs": {"mode": "replace", "verbs": [
"The electric fence stopped working years ago",
"You already know the answer",
"Comfort is the expensive kind of stuck",
"The map is not the territory",
"You're rehearsing a fear, not a fact",
"What you resist persists",
"The obstacle is the way",
@kazuph
kazuph / Claude Code macOS Notification Hooks - tmux統合対応の通知システム
Last active July 8, 2025 22:43
Claude Code macOS Notification Hooks - tmux統合対応の通知システム
# Claude Code Hooks
## stop-send-notification.js
Claudeがメッセージ生成を停止した時にmacOS通知を送るフック。
### 設定
`~/.claude/settings.json` に以下を追加:
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@DrewML
DrewML / Theming-Slack-OSX.md
Last active January 29, 2026 12:35
Theming Slack for OSX

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

How to (OSX Only)

@mujahidk
mujahidk / curl.ps1
Last active May 19, 2023 20:48
PowerShell WebClient script with basic authentication to export content from a website. Simple alternative to curl in Windows.
# Uncomment to disable Certificate errors
# [Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$url = "http://example.com/data.json"
$user = "data-user"
$password = "password"
# Output file path into current directory.
$file= ($pwd).path + "\export.json"
Write-Host "Exporting data to: $file"
after_filter -> { sleep(0.25) }
@jwood
jwood / application.html.erb
Last active March 15, 2021 16:03
Disable animations
<!-- app/views/layouts/application.html.erb -->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ... -->
<% if Rails.application.config.disable_animations %>
<%= stylesheet_link_tag('disable_animations') %>
<!-- Turn off animations in jQuery -->
<script>$.fx.off = true;</script>
require 'mina/git'
require 'json'
set :domain, '0.0.0.0'
set :user, 'nodejs'
set :deploy_to, '/home/nodejs/api'
set :repository, 'git@.../api.git'
set :branch, 'master'
set :shared_paths, [ 'tmp' ]
set :term_mode, :pretty
@brianhempel
brianhempel / bench_rails_memory_usage.rb
Last active May 22, 2026 11:34
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0