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.

@dmorgan-github
dmorgan-github / Pdv.sc
Last active March 2, 2023 04:00
SuperCollider mini dsl for durations and values
/*
NOTE: There is a Quark for this - https://github.com/dmorgan-github/Pdv
Copy to Extensions folder and re-compile
Ryhthmically sequences numeric values which can then be used with any event key, e.g. degree or midinote.
operators:
" " - empty space separates beats/values
~ - rest
@subrezon
subrezon / pop-win-dualboot.md
Created September 23, 2022 16:56
Dual boot Pop!OS + Windows 10/11 (very easy)

This tutorial will illustrate how to set up a dual boot Pop!OS + Windows 10/11 system very easily, without losing much disk space or installing not officially supported alternative boot loaders like GRUB or rEFInd.

The main issue with dual booting Pop!OS and Windows is that unlike most other distributions, Pop!OS uses the systemd-boot bootloader, which in its default configuration does not support loading kernels from partitions other than the EFI partition. Thus, Pop!OS requires the EFI partition to be at least 500 MiB in size, whereas the size of the EFI partition created during the installation of Windows is just 100 MiB. This would suffice for GRUB or rEFInd, since these bootloaders are able to load the kernel from the root partition, but not for systemd-boot. In this guide, we will perform a customized Windows installation with an enlarged EFI partition, and use that for a 100% default Pop!OS installation.

WARNING : this will not work on already existing installations of Windows or Pop!OS, you will hav

// Only pull a value once per clock time - else, return the previous value
PtimeClutch : FilterPattern {
var <>delta;
*new {
|pattern, delta=0.0|
^super.new(pattern).delta_(delta);
}
embedInStream {
@scztt
scztt / Pmod-tests.scd
Last active January 27, 2025 14:12
Pmod.sc
(
SynthDef(\saw, {
var env, sig;
sig = Saw.ar(
\freq.kr(440) * (\fmod.ar(0).midiratio * [-1, 1]),
\amp.kr(1)
);
env = Env.adsr(releaseTime: \release.kr(1));
env = env.kr(
SAMP : Singleton {
classvar <>root, <>extensions, <>lazyLoading=true;
var <paths, buffers, <channels, <foundRoot, <foundRootModTime, markersCache, atCache;
var sortFunc;
var metadata;
*initClass {
root = "~/Desktop".standardizePath;
extensions = ["wav", "aiff", "aif", "flac", "ogg"];
}
@jdarpinian
jdarpinian / executable.c
Last active September 28, 2025 09:40
Add one line to your C/C++ source to make it executable.
///$(which true);FLAGS="-g -Wall -Wextra --std=c17 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $FLAGS "$THIS_FILE" -o "$OUT_FILE" || exit $?;exec bash -c "exec -a \"$0\" \"$OUT_FILE\" $([ $# -eq 0 ] || printf ' "%s"' "$@")"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
@adcxyz
adcxyz / Making_A_Standalone_w_3.7.0.scd
Created April 29, 2016 19:38
Making A Standalone with SC 3.7.0

/****

A full script for creating a standalone app based on the current setup and config of a SuperCollider.app - tested with 3.7.0.

c Alberto de Campo 2016

HOW TO USE this:

@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active February 1, 2026 13:03
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 10, 2026 08:47
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);