Skip to content

Instantly share code, notes, and snippets.

View waynedahlberg's full-sized avatar
🤖
Live, laugh, learn

Wayne Dahlberg waynedahlberg

🤖
Live, laugh, learn
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.

@MindfulMotif
MindfulMotif / tailwind-neutral-and-semantic-color-ramps.txt
Last active August 7, 2025 22:27
Neutral and semantic color ramps for Tailwind 3 and 4 in HEX and OKLCH format with contrast stops for the most relevant APCA contrast targets.
/* Tailwind 3 – HEX Values */
// Neutral ramp – HEX
'neutral': {
'25': '#fafafa',
'50': '#f0f0f0',
'100': '#dfdfdf',
'200': '#cdcdcd',
'300': '#b8b8b8',
@fatbobman
fatbobman / CustomPagingBehavior.swift
Last active February 5, 2026 07:54
A Custom Paging Behavior for SwiftUI
extension ScrollTargetBehavior where Self == CustomPagingBehavior {
static var customPaging: CustomPagingBehavior { .init() }
}
struct CustomPagingBehavior: ScrollTargetBehavior {
enum Direction {
case left, right, up, down, none
}
func updateTarget(_ target: inout ScrollTarget, context: TargetContext) {
@juliensagot
juliensagot / ConditionalEnvironmentOverlay.swift
Created November 8, 2024 10:40
ConditionalEnvironmentOverlay
private struct ConditionalEnvironmentOverlay<Value: Equatable, OverlayContent: View>: ViewModifier {
@Environment(\.self) private var environmentValues
private let keyPath: KeyPath<EnvironmentValues, Value>
private let value: Value
private let overlayContent: OverlayContent
init(
condition: KeyPath<EnvironmentValues, Value>,
equals value: Value,
@Lofionic
Lofionic / ContentView.swift
Last active October 22, 2024 23:34
Shader fun
import SwiftUI
struct ContentView: View {
@State private var start = Date.now
var body: some View {
VStack {
TimelineView(.animation) { timeline in
let time = start.distance(to: timeline.date)
Rectangle()
@JoshOohAhhAi
JoshOohAhhAi / index.html
Created October 12, 2024 12:49
Neuro Noise (GLSL Shader)
<div class="content">
<div class="section">
<div>
Neural Noise
</div>
</div>
<div class="section">
<div>
GLSL shader based on <a href="https://x.com/zozuar/" target="_blank">@zozuar</a> <a href="https://x.com/zozuar/status/1625182758745128981/" target="_blank">artwork</a>
</div>
@Matt54
Matt54 / GlowingLowPolySphere.swift
Last active July 7, 2024 20:07
Sun with rays entity created from many low poly spheres at varying opacity and radius + different rotation animation along each axis
import RealityKit
import SwiftUI
struct GlowingLowPolySphere: View {
@State private var opacity: Float = 1.0
@State private var isForward: Bool = false
@State private var rotationAngles: SIMD3<Float> = [0, 0, 0]
@State private var modulationTimer: Timer?
@State private var time: Double = 0.0
@State private var lastRotationUpdateTime = CACurrentMediaTime()
@davidsteppenbeck
davidsteppenbeck / AnimatingMeshView.swift
Created June 11, 2024 16:41
Animating mesh gradient for iOS 18 using TimelineView
import SwiftUI
struct AnimatingMeshView: View {
let referenceDate: Date
var body: some View {
TimelineView(.animation) { context in
let t = context.date.timeIntervalSince(referenceDate)
MeshGradient(width: 5, height: 4, points: [
@steventroughtonsmith
steventroughtonsmith / V3DViewContainer.swift
Created February 2, 2024 17:14
UIKit proxy for visionOS 3D transforms and effects
//
// V3DViewContainer.swift
// Vision3DUIKit
//
// Created by Steven Troughton-Smith on 02/02/2024.
//
import UIKit
import SwiftUI
@drewolbrich
drewolbrich / MeshEntity+GenerateSolidInteriorModel.swift
Last active May 20, 2025 14:01
A RealityKit ModelEntity extension that replaces its model with a new model with reversed triangle indices
//
// MeshEntity+GenerateSolidInteriorModel.swift
//
// Created by Drew Olbrich on 12/16/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal