Skip to content

Instantly share code, notes, and snippets.

View wongyouth's full-sized avatar

Ryan Wang wongyouth

View GitHub Profile
@wongyouth
wongyouth / format.sh
Created September 27, 2018 16:14
用于 nideshop-mpvue 原生转mpvue用
sed -i '' \
-e 's/that\.data/that/' \
-e 's/this\.data/this/' \
-e 's/that\.setData(/Object.assign(that.$data, /' \
-e 's/this\.setData(/Object.assign(this.$data, /' \
-e 's!//\([^ ]\)!// \1!' \
-e 's/function(/function (/' \
-e 's/^\( *\)\([^ (.]\{1,\}\)(/\1\2 (/' \
-e 's/ == / === /' \
-e 's/ *;? *$//' \
@wongyouth
wongyouth / docker-compose.yml
Last active May 26, 2019 07:04
docker-compose.yml of Jenkins with nginx as reverse proxy
version: '2'
services:
jenkins:
image: jenkinsci/blueocean
user: root
restart: always
volumes:
- jenkins-data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- $HOME/jenkins:/home
@wongyouth
wongyouth / install-docker-ce.sh
Last active July 15, 2019 13:33
Install docker-ce into Ubuntu
# install docker-ce on ubuntu
sudo apt-get update && \
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
@wongyouth
wongyouth / traefik.yml
Last active June 24, 2019 03:25
Docker Swarm mode with reverse proxy traefik config example
version: '3.3'
services:
reverse-proxy:
image: traefik:v1.7
ports:
- target: 80
published: 80
mode: host
- target: 8080
published: 8080
@wongyouth
wongyouth / colorize.rb
Created June 27, 2025 06:54 — forked from thebinarypenguin/colorize.rb
A simple function to colorize console output of Ruby scripts using ANSI escape codes.
def colorize(value, color)
case color
when :black then "\e[30m" + value.to_s + "\e[0m"
when :red then "\e[31m" + value.to_s + "\e[0m"
when :green then "\e[32m" + value.to_s + "\e[0m"
when :yellow then "\e[33m" + value.to_s + "\e[0m"
when :blue then "\e[34m" + value.to_s + "\e[0m"
when :magenta then "\e[35m" + value.to_s + "\e[0m"
when :cyan then "\e[36m" + value.to_s + "\e[0m"
when :white then "\e[37m" + value.to_s + "\e[0m"
@wongyouth
wongyouth / llm-wiki.md
Created June 17, 2026 09:01 — 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.