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
@frankhinek
frankhinek / index.html
Last active August 1, 2026 20:51
Web5 CRUD Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web5 CRUD Example</title>
<script src="https://unpkg.com/@tbd54566975/web5"></script>
</head>
@4piu
4piu / Tailscale-to-Wireguard.md
Last active August 1, 2026 20:49
Route Tailscale exit node traffic to Wireguard

This script enables you to forward all traffic from a Tailscale exit node through a WireGuard tunnel.

Most mobile devices support only one active VPN connection at a time. As a result, users can't simultaneously use Tailscale for connectivity and route their internet traffic through another VPN. This script provides a workaround by turning a Tailscale exit node into a VPN bridge. When clients use this special exit node, their internet traffic is protected by the VPN while still maintaining Tailscale connectivity.

Requirements:

  • Enable forwarding
  • Tailscale need to run with --netfilter-mode=[off|nodivert] for manual routing control
  • Set Table = off in Wireguard config to manual control ip rules
  • Set PostUp and PreDown script in Wireguard config
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@BumgeunSong
BumgeunSong / README.md
Created July 30, 2026 13:46
AI 시대의 개발자는 검증을 설계한다 (5) - Test를 검증하는 변형

Mutation 검증 — Agent Skill & Commit Gate Hook

통과하는 테스트도 false green일 수 있습니다. 지킨다고 주장하는 동작이 깨져도 여전히 초록불인 테스트요. 커버리지는 이걸 못 잡습니다. 코드가 실행됐다는 것만 말할 뿐, 버그를 막는지는 말해주지 않으니까요.

확인하는 방법은 단순합니다. 버그를 심어보면 됩니다. 갑옷이 화살을 막는지 알려면 실제로 쏴봐야 하는 것처럼요.

@zhangqifan
zhangqifan / AnimatedGlyphLabel.swift
Created August 1, 2026 09:24
AnimatedGlyphLabel — a single-line UIKit label that transitions text one glyph at a time (CoreText layout, per-glyph spring + gaussian blur stagger). Self-contained, iOS 13+, zero dependencies.
#if os(iOS)
import CoreImage
import CoreImage.CIFilterBuiltins
import CoreText
import UIKit
/// A single-line UIKit label that transitions text one glyph at a time.
///
/// The intrinsic content size follows the current text. Glyphs are laid out
/// individually from the leading edge, which suits short strings such as

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.