Skip to content

Instantly share code, notes, and snippets.

View caoer's full-sized avatar
🎯
Focusing as always

Zitao Xiong caoer

🎯
Focusing as always
View GitHub Profile
@caoer
caoer / llm-wiki.md
Created April 11, 2026 23:30 — forked from karpathy/llm-wiki.md
llm-wiki

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.

@caoer
caoer / install.sh
Created October 22, 2025 23:54
ccc-statusd installation script
#!/bin/bash
# ccc-statusd installation script
# Usage: curl -fsSL https://raw.githubusercontent.com/caoer/ccc-statusd/main/install.sh | bash
set -e
REPO="caoer/ccc-statusd"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
VERSION="${VERSION:-latest}"
@caoer
caoer / dev.to.yaml
Created October 19, 2025 06:25 — forked from cor-bee/dev.to.yaml
Overdocumented Instant View Template for dev.to (https://instantview.telegram.org/contest/dev.to/template28/)
## General info:
# Function starts with @
# Variable starts with $
# Return of the most recently run function made by $@
# Key comments marked with ##
## Version of IV must be set first
~version: "2.1"
# Telegram doesn't support JW Player which is used in videoheaders

Directory structure: └── microsoft-TypeChat/ β”œβ”€β”€ SUPPORT.md β”œβ”€β”€ typescript/ β”‚ β”œβ”€β”€ examples/ β”‚ β”‚ β”œβ”€β”€ crossword/ β”‚ β”‚ β”‚ └── README.md β”‚ β”‚ β”œβ”€β”€ coffeeShop-zod/ β”‚ β”‚ β”‚ └── README.md β”‚ β”‚ β”œβ”€β”€ sentiment-zod/

Directory structure: └── modelcontextprotocol-docs/ β”œβ”€β”€ docs/ β”‚ β”œβ”€β”€ tools/ β”‚ β”‚ β”œβ”€β”€ debugging.mdx β”‚ β”‚ └── inspector.mdx β”‚ └── concepts/ β”‚ β”œβ”€β”€ roots.mdx β”‚ β”œβ”€β”€ resources.mdx β”‚ β”œβ”€β”€ architecture.mdx

@caoer
caoer / uv.md
Created December 25, 2024 19:11

Directory structure: └── docs/ β”œβ”€β”€ reference/ β”‚ β”œβ”€β”€ build_failures.md β”‚ β”œβ”€β”€ settings.md β”‚ β”œβ”€β”€ index.md β”‚ β”œβ”€β”€ resolver-internals.md β”‚ β”œβ”€β”€ benchmarks.md β”‚ β”œβ”€β”€ policies/ β”‚ β”‚ β”œβ”€β”€ license.md

β”œβ”€β”€ README.md └── docs β”œβ”€β”€ at-glance.md β”œβ”€β”€ blog.md β”œβ”€β”€ blog β”œβ”€β”€ elysia-02.md β”œβ”€β”€ elysia-03.md β”œβ”€β”€ elysia-04.md β”œβ”€β”€ elysia-05.md β”œβ”€β”€ elysia-06.md

@caoer
caoer / contracts...artifacts...build-info...c041de928c6ecfbdf734b90e8444376f.json
Created October 23, 2022 19:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "c041de928c6ecfbdf734b90e8444376f",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.7",
"solcLongVersion": "0.8.7+commit.e28d00a7",
"input": {
"language": "Solidity",
"sources": {
"contracts/1_Storage.sol": {
for file in ./* ; do mv "$file" "$(echo $file| sed -e 's/\([A-Z]\)/\L\1/g' | sed -e 's/ /_/g')" ; done
function useAsyncStorage(key: string, initialValue: string | null = null) {
const [storageItem, setStorageItem] = useState<string | null>(initialValue);
const updateStorageItem = useCallback(
function (data: string) {
void AsyncStorage.setItem(key, data).catch(e =>
console.log(`updateStorageItem error: ${e}`),
);
setStorageItem(data);
return data;