Skip to content

Instantly share code, notes, and snippets.

@aaron5470
aaron5470 / extract-sourcemap.mjs
Created March 31, 2026 13:43 — forked from sorrycc/extract-sourcemap.mjs
Extract original source code from JavaScript .map (source map) files. Reads sourcesContent, skips node_modules, reconstructs the original file tree.
#!/usr/bin/env node
/**
* Extract original source code from a JavaScript source map file.
*
* Usage:
* node extract-sourcemap.mjs <path-to-.map-file> [output-dir]
*
* Example:
* node extract-sourcemap.mjs cli.js.map ./src-extracted
@aaron5470
aaron5470 / microgpt.py
Created February 12, 2026 23:44 — 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