Skip to content

Instantly share code, notes, and snippets.

"""
The most atomic way to train and run inference for 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
@productdevbook
productdevbook / drizzle-orm.md
Last active April 29, 2026 02:35
Drizzle ORM PostgreSQL Best Practices Guide (2025)

Drizzle ORM PostgreSQL Best Practices Guide (2025)

Latest Drizzle ORM features and optimal schema patterns

Major 2025 Update: PostgreSQL now recommends identity columns over serial types. Drizzle has fully embraced this change.

import { pgTable, integer, text, timestamp, varchar } from 'drizzle-orm/pg-core';

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.

@HarryAnkers
HarryAnkers / GUIDE.md
Last active April 29, 2026 02:32
NVIDIA Virtual Display for Sunshine/Moonlight on Linux — No Dummy Plug Required (4K@120Hz, HDR, Custom Resolutions)

NVIDIA Virtual Display for Sunshine/Moonlight on Linux — No Dummy Plug Required

A guide for creating a virtual display on an NVIDIA GPU (tested on RTX 5080, driver 595.58) with HDR, custom resolutions, and 4K@120Hz support for headless Sunshine/Moonlight streaming on Linux.

Works on both HDMI and DisplayPort connectors with no physical display or dummy plug connected.

The Problem

Running Sunshine headless on Linux with NVIDIA is painful: