Skip to content

Instantly share code, notes, and snippets.

View gracefullight's full-sized avatar
๐Ÿ‡ฆ๐Ÿ‡บ

Eunkwang Shin gracefullight

๐Ÿ‡ฆ๐Ÿ‡บ
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 24, 2026 08:44
microgpt
"""
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
"mcpServers": {
"codex_subagent": {
"command": "npx",
"args": [
"-y",
"@openai/codex",
"mcp",
"-c model=\"gpt-5\"",
"-c model_reasoning_effort=\"high\""
]
@ruvnet
ruvnet / *README.md
Last active January 29, 2026 18:13
ChatGPT Codex Agent.md and environment setup script

Getting Started with ChatGPT Codex + Mastra Agents

Step-by-Step Instructions

  1. Open the ChatGPT Codex task setup panel. This is where you configure your environment before starting a task.

  2. Locate the "Setup Script" field. Youโ€™ll see a note that internet access is disabled after the script runs.

@thesamesam
thesamesam / xz-backdoor.md
Last active February 20, 2026 09:37
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@hyperupcall
hyperupcall / settings.jsonc
Last active February 14, 2026 10:14
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@kconner
kconner / macOS Internals.md
Last active February 20, 2026 23:45
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@DublinCity
DublinCity / AsyncLocalStorage.md
Last active January 2, 2026 06:55
AsyncLocalStorage

AsyncLocalStorage

์–ด๋–ค ๋ฌธ์ œ๊ฐ€ ์žˆ๋‚˜์š”

์šฐ๋ฆฌ์˜ ์„œ๋ฒ„๋กœ ํ•˜๋‚˜์˜ request๊ฐ€ ๋“ค์–ด์˜ค๋ฉด ์„œ๋ฒ„๋Š” ์‘๋‹ต์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ์—ฌ๋Ÿฌ API๋ฅผ ํ˜ธ์ถœํ•˜๊ณ  ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•˜์—ฌ ํ•„์š”ํ•œ ์‘๋‹ต์„ ๋Œ๋ ค์ค๋‹ˆ๋‹ค. requset๋Š” ๋™์‹œ์— ์—ฌ๋Ÿฌ๊ฐœ ๋“ค์–ด์˜ค๊ธฐ ๋•Œ๋ฌธ์— ์šฐ๋ฆฌ๋Š” request๋งˆ๋‹ค ์–ด๋–ค ์ž‘์—…์„ ์ˆ˜ํ–‰ํ–ˆ๋Š”์ง€ ๊ทธ๋ฃนํ•‘ํ•˜์—ฌ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๊ฒƒ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€์žฅ ์ผ๋ฐ˜์ ์ธ ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ์š”์ฒญ๋งˆ๋‹ค requestID ๋ฅผ ์ƒ์„ฑํ•ด ํ• ๋‹นํ•˜๊ณ  ์ˆ˜ํ–‰ํ•˜๋Š” ์ž‘์—…๋งˆ๋‹ค requestID ๋ฅผ ํ•จ๊ป˜ ๊ธฐ๋กํ•˜์—ฌ requestID ๋‹จ์œ„๋กœ ๊ทธ๋ฃนํ•‘ํ•ด ํ™•์ธํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ํŒจํ„ด์€ Ruby on rails ๋‚˜ Python Django ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ๊ฐ request๋Š” ํ•˜๋‚˜์˜ thread์— ํ• ๋‹น๋˜์–ด ๋™๊ธฐ๋กœ ์ฒ˜๋ฆฌ๋˜๊ธฐ ๋•Œ๋ฌธ์— requestID ์™€ ๊ฐ™์€ ์š”์ฒญ ์ •๋ณด๋Š” thread context ์— ์ €์žฅํ•˜์—ฌ ํ•„์š”ํ•  ๋•Œ ๊บผ๋‚ด ์‚ฌ์šฉํ•˜๋ฉด ๋˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

โš ๏ธ Warning: this document is out of date.

For the most recent webpack5 instructions see MIGRATION.md.

Storybook experimental Webpack 5 support

Storybook 6.2 includes experimental Webpack 5 support. Webpack 5 brings a variety of performance improvements, as well as exciting new features like module federation. Here's a quick guide to get you going.

Intro

@spro
spro / next-ssr-recoil.js
Last active June 12, 2025 09:29
Attempt at SSR with Recoil - setting initial atom values with Next.js getServerSideProps
import {useEffect} from 'react'
import {RecoilRoot, useRecoilState, atom} from 'recoil'
// User data
const user1 = {username: 'joe', bio: "You will never see me, unless of course this example is totally broken."}
const user2 = {username: 'bob', bio: "I am the one true user."}
const user3 = {username: 'fred', bio: "Just kidding, make way for the new guy."}
// Recoil atom to store user. The default user is user1, but it will be