Skip to content

Instantly share code, notes, and snippets.

View dheerapat's full-sized avatar

Dheerapat Tookkane dheerapat

View GitHub Profile
@dheerapat
dheerapat / docker.txt
Last active June 23, 2026 06:03
add user to docker group
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh --dry-run
sudo usermod -aG docker $USER
newgrp docker
@dheerapat
dheerapat / ponytail-long.md
Created June 16, 2026 06:01
ponytail-long

You are a lazy senior developer. Lazy = efficient. Best code = code never written.

THE LADDER — stop at the first rung that holds:

  1. Does this need to exist? (YAGNI -> skip it, and explain why)
  2. Stdlib does it? Use it.
  3. Native platform feature covers it? (CSS over JS, DB constraint over app code)
  4. Already-installed dependencies solves it? Never add new for what a few lines do.
  5. Can it be one line? One line.
  6. Only then: minimum code that works.
@dheerapat
dheerapat / andrej.md
Created June 16, 2026 05:38
agent-principle

Follow this 4 principle while working:

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them - don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.

Code Generation Rules (Ponytail-style)

Before writing any code, answer these 6 questions:

  1. Is this feature necessary? → No: skip it (YAGNI)
  2. Can stdlib do this? → Use it
  3. Does a native platform feature already exist? → Use it
  4. Can an already-installed dependency do this? → Use it
  5. Is a one-liner sufficient? → Use the one-liner
  6. Only then: write minimum viable code
@dheerapat
dheerapat / RFC.md
Last active May 6, 2026 09:52
RFC teplate
---
title: RFC: [title of proposal]
authors: [individual or team accountable for this proposal]
state: [draft / feedbac_requested / active / abandoned / retired]
---

## Need
*Describe the specific need, problem, or opportunity this proposal addresses.*
@dheerapat
dheerapat / README.md
Last active May 5, 2026 08:33
Install archlinux on WSL2

Arch Linux is officially supported on WSL 2

Step 1 – Ensure WSL 2 is Installed

wsl --install

Step 2 – Install Arch Linux

@dheerapat
dheerapat / llm-wiki.md
Created April 21, 2026 17: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.

@dheerapat
dheerapat / docker.yaml
Last active January 28, 2026 05:32
lakehouse-lakekeeper
services:
postgres-db:
image: postgres:latest
container_name: postgres-db
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: pass
POSTGRES_DB: postgres
TZ: UTC
ports:
enum WarehouseLocationERP {
Thaphra = 'WH02',
Thairath = 'WH03',
Province = 'WH90',
MachineInventory = 'WH25'
}
enum VirtualWarehouseERP {
ReadyToUseWarehouse = '02',
Machine = '03',
@dheerapat
dheerapat / re-test.py
Last active October 5, 2024 17:49
python regex example
import re
txt = """<|python_tag|><function=spotify_song_artist>{"n": "[\"BIRDS OF A FEATHER\", \"Espresso\", \"Please Please Please\", \"Not Like Us\", \"Gata Only\"]"}</function>"""
x = re.search("<function=(\w+)>(.*?)</function>", txt)
if x:
print("YES! We have a match!")
print(x.group())
else:
print("No match")