Skip to content

Instantly share code, notes, and snippets.

View JavaCS3's full-sized avatar
๐Ÿ˜‘
Working

Charles Wei JavaCS3

๐Ÿ˜‘
Working
View GitHub Profile
@JavaCS3
JavaCS3 / llm-wiki.md
Created April 22, 2026 13:45 — 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.

@JavaCS3
JavaCS3 / README.md
Last active November 1, 2020 11:14
2019 Personal Highlights

2019 Personal Highlights

Jan.

  1. ๅŽป็พŽๅ›ฝๅŒ—ๅกๅ‡บๅทฎ๏ผŒ็ฌฌไธ€ๆฌกๅ’Œ็พŽๅ›ฝไบบๆ‰“ๅพทๅทžๆ‰‘ๅ…‹๏ผŒๅŽปไบ†Dukeๅคงๅญฆ

Jun.

  1. ๅ‚ๅŠ ๅคงๅญฆๅŒๅญฆๅฉš็คผ๏ผŒๅฝ“ไบ†็ฌฌไบŒๆฌกไผด้ƒŽ

Jul.

  1. ๆ”พๅผƒๅ…ฌ็งŸๆˆฟ
@JavaCS3
JavaCS3 / README.md
Last active June 28, 2023 01:40
ๆญฃๅˆ™่กจ่พพๅผๅญฆไน 

ๆญฃๅˆ™่กจ่พพๅผๅญฆไน 

ๆญฃๅˆ™่กจ่พพๅผๆ˜ฏไธ€ไธชๅฏไปฅๅธฎๅŠฉๆˆ‘ไปฌๅŒน้…ๅคๆ‚ๅญ—็ฌฆไธฒๆจกๅผ็š„ๅทฅๅ…ท

ๅŒน้…ๅญ—็ฌฆ(What)

  • .
  • [abcd] [a-zA-Z] [^abcd]
  • \d \s \t \w ...

ๅŒน้…ๆ•ฐ้‡(How)

@JavaCS3
JavaCS3 / main.c
Created March 27, 2020 09:38
UUID String to C Array
#include <stdio.h>
#include <stdlib.h>
#define CHAR2INT(x) (('0' <= x && x <= '9') ? \
(x - '0') : \
(('a' <= x && x <= 'f') ? \
(10 + (x - 'a')) : \
(('A' <= x && x <= 'F') ? (10 + (x - 'A')) : (0))))
#define UUID2ARRAY(uuid) { \
const assert = require('assert')
const ENCODERS = {
raw(len) {
return function(v) {
assert(v instanceof Buffer)
const buffer = Buffer.alloc(len)
v.copy(buffer)
return buffer
@JavaCS3
JavaCS3 / color256.sh
Created August 5, 2019 13:44
color256.sh
for fgbg in 38 48 ; do #Foreground/Background
for color in {0..256} ; do #Colors
#Display the color
echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m"
#Display 10 colors per lines
if [ $((($color + 1) % 10)) == 0 ] ; then
echo #New line
fi
done
echo #New line
@JavaCS3
JavaCS3 / readme.md
Last active June 20, 2019 09:39
How to setup ssh proxy

How to setup ssh proxy

Add the following in your ~/.ssh/config

Host <dest domain/ip>
  ProxyCommand ssh -q -W %h:%p <proxy user>@<proxy domain/ip>

Example

@JavaCS3
JavaCS3 / quizz.md
Last active April 11, 2019 14:43
Interview Quizz

Interview Quizz: Cashier

A cashier in a shop need a program that will print out a receipt for a given order. And you're going to implement that.

Q1: Simple Printing

We're going to use some objects interaction to represent a payment process, and then print a receipt.

# python version
@JavaCS3
JavaCS3 / utils.py
Created February 18, 2019 03:03
Python color print and shell utils scripts
# Style Guide: https://github.com/google/styleguide/blob/gh-pages/pyguide.md
# Pythonic: https://docs.python-guide.org/writing/style/
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import string
@JavaCS3
JavaCS3 / submodule-helper.py
Created February 18, 2019 02:46
Update submodule revision recursively in case you have nested submodule
#!/usr/bin/env python
# Style Guide: https://github.com/google/styleguide/blob/gh-pages/pyguide.md
# Pythonic: https://docs.python-guide.org/writing/style/
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import re