Skip to content

Instantly share code, notes, and snippets.

View jauderho's full-sized avatar

Jauder Ho jauderho

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.

@karpathy
karpathy / microgpt.py
Last active August 17, 2026 23:14
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active July 29, 2026 05:48
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
import os
import re
import sys
from urllib.parse import urlparse, urlunparse
import toml
PIPFILE_TO_UV_DEP_NAMES = {"packages": "dependencies", "dev-packages": "dev-dependencies"}
@Bartvz
Bartvz / balance-irqs.sh
Created October 17, 2024 15:18
A script to balance IRQs for the Belkin RT3200 running OpenWRT
#!/bin/sh
# Function to set IRQ affinity
set_affinity() {
irq=$1
cpu_mask=$2
# Check if the CPU mask is valid
if echo "$cpu_mask" | grep -qE '^[0-9A-Fa-f]+$'; then
echo "$cpu_mask" > "/proc/irq/$irq/smp_affinity" 2>/dev/null
@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
#!/usr/bin/python3
# import requests
import json
import time
from datetime import datetime, timedelta
from urllib.parse import quote
import jwt
import uuid
import logging
@jauderho
jauderho / gist:67ff70804f21d88bd66e69d84e5d8783
Last active June 29, 2024 20:26
HOWTO: Switch OpenWrt from using wolfssl to mbedtls manually (22.03 to 23.05)
#!/bin/sh
#
# from https://forum.openwrt.org/t/openwrt-23-05-0-rc1-first-release-candidate/162544/27
#
# auc will not work as-is to upgrade from 22.03 to 23.05 due to the mbedtls switch
# therefore, we need to first switch from wolfssl to mbedtls while on 22.03 before using auc
#
cd /root || exit
opkg update
/**
* This sketch connects an AirGradient DIY sensor to a WiFi network, and sends
* these metrics via MQTT. Adapted from original by Jeff Geerling.
*/
#include <AirGradient.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PubSubClient.h>

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.