Skip to content

Instantly share code, notes, and snippets.

@lijie2000
lijie2000 / llm-wiki.md
Created April 7, 2026 15:56 — 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.

@lijie2000
lijie2000 / quad-forge.sh
Created March 1, 2026 17:45 — forked from kevinma2010/quad-forge.sh
一键启动多 Agent tmux 工作区:OpenCode/Droid/Claude/Codex 负责执行
#!/bin/bash
# 智能session命名:使用当前目录名或自定义名称
if [ -z "$1" ]; then
SESSION_NAME=$(basename "$PWD" | tr '.' '-' | tr ' ' '-')
else
SESSION_NAME=$1
fi
# 检查session是否已存在
tmux has-session -t "$SESSION_NAME" 2>/dev/null
@lijie2000
lijie2000 / wsl2-zsh-powerlevel10k.md
Created February 22, 2026 19:27 — forked from zachrank/wsl2-zsh-powerlevel10k.md
WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

WSL 2 + Windows Terminal + Oh My Zsh + Powerlevel10k

wsl2-zsh-powerlevel10k

This gist takes heavy inspiration from kevin-smets / iterm2-solarized.md gist for iTerm2.

Windows Subsystem for Linux 2 (WSL 2)

The first thing that you will want to do is install WSL 2 and a Linux distro.

@lijie2000
lijie2000 / microgpt.py
Created February 12, 2026 00:51 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference 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
@lijie2000
lijie2000 / bolt_mega_prompt.md
Created September 14, 2025 20:15 — forked from iamnolanhu/bolt_mega_prompt.md
Bolt.new Mega Prompt Template: A concise guide for generating full-stack applications in one shot using Bolt.new. Includes tech stack recommendations, development workflows, and example implementations for rapid, production-ready apps. Perfect for developers seeking efficient, scalable solutions. Questions? founder@sigmasynapses.com

BOLT.NEW MEGA PROMPT - One-Shot Application Generator

Based on 38,787 words of Bolt.new expert insights and best practices

SYSTEM CONTEXT

You are an expert full-stack developer with deep knowledge of Bolt.new, modern web frameworks, and rapid application development. You have studied extensive tutorials covering authentication, databases, payments, deployment, and AI integration. Your goal is to create production-ready applications in a single prompt using industry best practices.

CORE PRINCIPLES FROM BOLT.NEW EXPERTS

1. ENHANCED PROMPTING STRATEGY

  • Always use the "Enhanced Prompt" feature in Bolt.new before building
@lijie2000
lijie2000 / code-editor-rules.md
Created December 17, 2024 01:29 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@lijie2000
lijie2000 / zustand-internals.jsx
Created December 17, 2024 00:00
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
@lijie2000
lijie2000 / 1-CustomerCreatedEventSqsConsumer.java
Created July 8, 2024 02:52 — forked from rponte/1-CustomerCreatedEventSqsConsumer.java
Spring Boot: Testing a @SqsListener with TestContainers and LocalStack
package br.com.zup.edu.app2.xxx.samples.aws.sqs;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.Customer;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.CustomerRepository;
import io.awspring.cloud.messaging.listener.SqsMessageDeletionPolicy;
import io.awspring.cloud.messaging.listener.annotation.SqsListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.messaging.handler.annotation.Header;
@lijie2000
lijie2000 / top-brew-packages.txt
Created March 6, 2024 16:20 — forked from pmkay/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles

Configure prettier, eslint, husky (pre commit hook), lint-staged in react + typescript project

Steps to configure prettier, eslint, husky (pre commit hook), lint-staged in react + typescript project created using create-react-app. This is opinionated configuration with airbnb's style guide as the base style guide.

Step 1 :: Setup prettier

1.1) Install prettier as dev dependency.

npm install --save-dev --save-exact prettier