AI & Agents20
Batch APIs
Cheatsheet of LLM batch APIs: what they trade (latency for cost), the request anatomy, and the limits that shape a real batch job.
14 rows →Chunking for RAG
Cheatsheet of RAG chunking strategies: fixed-size, sentence-aware, markdown-aware, semantic, and late chunking — when each wins and the pitfalls that quietly kill recall.
12 rows →Context Rot: Lost in the Middle
Stuffing a context window does not stuff it evenly. Models attend strongly to the start and end of their context and fade in the middle — the U-shaped recall curve. Put the critical facts at the edges, or retrieve instead of stuffing.
2 diagrams →Context Window Growth
Cheatsheet timeline of context window growth: from GPT-2's 1K tokens to the million-token era — the milestones that changed what prompts could hold.
10 rows →Context Windows, Visually
Watch a prompt fill the window — and what happens when it doesn't fit.
2 diagrams →Embeddings, Visually
Cheatsheet of embedding fundamentals: what the vector means, the distance metrics (cosine vs dot vs euclidean), dimension tradeoffs, and the geometry everyone should see once.
12 rows →Function Calling, End to End
Function calling is a round trip with strict roles: you describe tools with JSON Schema, the model decides when to call one, YOUR code executes it, and the result goes back to the model to finish the answer. The schema is the contract.
2 diagrams →How LLM Pricing Works
Input tokens, output tokens, and cache reads each cost differently — watch the three lanes and where the dollars go.
2 diagrams →How LLM Tokens Work
See text become tokens — why English runs ~4 characters per token, why code and JSON cost more, and why CJK text is the densest of all.
2 diagrams →Knowledge Cutoff
Cheatsheet of LLM knowledge cutoffs: why they exist, what they actually mean, the mitigations (RAG, tools, dating the prompt), and the questions they break.
12 rows →LLM Model Landscape
Every major model side by side: context window, input/output price per million tokens, and tokens per dollar — generated from the CosmoDev model snapshot.
88 rows →MCP Protocol
Cheatsheet of the Model Context Protocol: the roles (host, client, server), the three primitives (resources, tools, prompts), transports, and lifecycle.
14 rows →Model Quantization
Cheatsheet of LLM quantization formats: bits per weight, the memory a 7B model needs in each, and the quality tradeoffs — FP32 to 4-bit and the GGUF naming.
14 rows →Prompt Caching, Visually
Why sending the same big prompt twice can cost a tenth of the price: providers cache your prompt prefix, charge a small surcharge to write it, and discount every read that reuses it. See the break-even and how prefix stability pays.
2 diagrams →Rate Limits & Retries
Cheatsheet of LLM API rate limiting: the response headers to read, the error codes to expect, and the retry strategies that actually work.
19 rows →Streaming & SSE
Cheatsheet of Server-Sent Events as LLM APIs use them: wire anatomy, the chunk shape every provider converges on, and client patterns for parsing deltas.
15 rows →Structured Outputs
Cheatsheet of JSON-mode and strict structured outputs: what each mode guarantees, the schema rules strict mode enforces, and the failure modes to design around.
14 rows →Temperature & Top-p, Visually
Two dials control model randomness — temperature spreads the odds, top-p cuts the tail.
2 diagrams →The Agent Loop (ReAct)
An agent is a model in a loop: think, act, observe, repeat. Interleaving reasoning with tool calls grounds every step in what the last step actually returned — and every loop needs a brake.
2 diagrams →Vision Tokens: Tiles, Not Pixels
Vision models do not see your screenshot — they see tiles. The image is cut into 512-pixel squares, each becoming a fixed block of tokens; a high-detail pass doubles the grid. That is why one screenshot can cost 800+ tokens while a tight crop costs a fraction.
2 diagrams →Frontend Architecture10
CSS Flexbox
Every common flexbox property, grouped by where it applies: the container and the item. Each row pairs the property with its common values and what it does.
13 rows →CSS Functions
The CSS functions that do the most work, grouped by job: compute sizes, read custom properties, mix and pick colors, paint gradients, apply filters, draw shapes, transform boxes, and pick values with logic. Each row pairs the function with a one-line example.
62 rows →CSS Grid
Every common CSS grid property, grouped by where it applies: the container, the item, and the sizing units. Each row pairs the property with its common values.
33 rows →CSS Selectors
Every common CSS selector, grouped by family: basic, combinators, pseudo-classes, pseudo-elements, and attribute selectors. Each row pairs the selector with a one-line example.
53 rows →Monorepo or Polyrepo?
Answer a few questions about how tightly your projects are coupled, whether you need atomic cross-project changes, how your teams are organized, and your build-tooling appetite to choose between a monorepo, polyrepo, or a hybrid setup.
4 questions →React Hooks
The React hooks used day to day, grouped by job: hold state, run effects, memoize work, share context, and reach outside the render. Each row pairs the hook with what it is for.
24 rows →Which CSS Approach?
Answer a few questions about how much of a design system you want, whether styles depend on runtime values, what build step you can accept, and how you want styles scoped to find the right styling approach: Tailwind, CSS Modules, CSS-in-JS, Sass, or plain CSS.
4 questions →Which Frontend Framework?
Answer a few questions about what the team already knows, how much bundle size and runtime perf matter, whether you want conventions or flexibility, and how much you weigh ecosystem and hiring to choose between React, Vue, Svelte, Angular, and SolidJS.
4 questions →Which Rendering Strategy?
Answer a few questions about how often content changes, whether SEO matters, whether pages are public or personalized, and where you can afford compute to choose between Static Site Generation, Incremental Static Regeneration, Server-Side Rendering, and Client-Side Rendering.
4 questions →Which State Management?
Answer a few questions about where the state lives, how big the app is, how often the state changes, and whether you need strict devtools to find the right React state approach: useState, Context, Zustand, Redux Toolkit, Jotai, or a server cache like React Query.
4 questions →CSS & Design5
Color Spaces
The CSS color spaces and functions developers actually choose between — sRGB, Display-P3 and wide gamut, HSL and HSV, OKLCH and OKLab — what each one models, its gamut and clipping behavior, real syntax examples, and when to prefer it.
22 rows →CSS Easing & cubic-bezier()
A decision reference for CSS timing functions: what each named easing expands to, how the four cubic-bezier() control points shape motion, proven curve presets, and when to enter versus exit.
28 rows →CSS Units
Every CSS unit: absolute, font-relative, viewport-relative, the fluid functions, and the angle, time, and resolution units, what each one is measured against and when to reach for it.
38 rows →Tailwind Breakpoints
Tailwind's responsive breakpoints as reference rows: the sm-to-2xl min-width tiers, the max-* variants, mobile-first patterns, container queries, and the gotchas around rem, ranges, and arbitrary values.
26 rows →z-index & Stacking Contexts
How CSS stacking contexts actually work: what creates one, the painting order inside it, how flex and grid children earn z-index without position, and which values are worth using.
26 rows →Data13
Data Formats
Data formats compared by structure and best use.
33 rows →Database Objects
Every core PostgreSQL schema object — structure, tables, views, indexes, types, identity, routines, security, and replication — in one dense reference.
45 rows →Datetime Formats
The datetime formats developers actually meet — ISO 8601, RFC 3339, RFC 2822, Unix time, and database types — with anatomy, timezone behavior, and parsing gotchas.
26 rows →JSON Variants
The JSON family compared — strict RFC 8259 JSON, JSON5, JSONC, and JSON Lines — by what each variant allows, forbids, and the parser quirks behind them.
26 rows →NoSQL Data Modeling
Modeling patterns for document, key-value, wide-column, graph, and vector stores — when to embed, reference, denormalize, or bucket.
28 rows →PostgreSQL Data Types
Every common PostgreSQL column data type, grouped by family: whole numbers, decimals, text, time, booleans and UUIDs, JSON, network addresses, composite types, and extension types. Each row shows what the type stores and when to choose it.
46 rows →SQL Aggregate Functions
SQL aggregate functions, GROUP BY, HAVING, and distinct/advanced aggregates mapped to return values and one-line examples on an orders table.
29 rows →SQL Indexing
A cheatsheet on SQL index types, design patterns, and maintenance.
31 rows →SQL Joins
SQL JOIN types compared: inner, outer, cross, self, lateral, natural — what each returns and a one-line example.
8 rows →SQL Window Functions
Every common SQL window function and the clauses that control them, grouped by job: rank rows, peek at neighbours, run totals across a frame, and pull first or last values. Each row pairs the function with a one-line example.
27 rows →Which Data Structure?
Answer a few questions about how you look things up, whether order and uniqueness matter, and whether the relationships are hierarchical or a network to choose between an array, set, map, object, tree, or graph.
4 questions →Which Database?
Answer a few questions about the shape of your data, how strict the schema must be, how you mainly query, and your scale and consistency needs to choose between a relational (Postgres), document, key-value, wide-column, vector, or search database.
4 questions →Which ORM?
Answer a few questions about how much SQL you want to write, how you define your schema, how much bundle weight matters, and your team's taste to choose between Prisma, Drizzle, TypeORM, and raw SQL or a query builder.
4 questions →Web & HTTP14
Common MIME Types
The MIME types you send and receive most often, grouped by family: text, application data, images, audio and video, and forms. Each row pairs the type with its file extensions.
53 rows →CORS
How the browser decides between simple and preflighted cross-origin requests, and the fetch and response headers that control each exchange.
28 rows →DNS Record Types
The DNS record types that carry addresses, aliases, mail routing, verification text, and service discovery, each with a real wire value.
22 rows →HTTP Headers
A reference for the request and response headers that negotiate content, security, caching, and identity on every HTTP exchange.
58 rows →HTTP Methods
Every HTTP request method in one table: method, safe, idempotent, request body, and typical use. The quick-reference companion to the HTTP Methods tool.
9 rows →HTTP Security Headers
The response headers that control content isolation, framing, referrer leakage, feature access, and transport security, with the value that holds for each.
21 rows →HTTP Status Codes
Every common HTTP response status code, grouped by class: what it means and when you'll see it. The quick-reference companion to the HTTP Status Codes tool.
55 rows →HTTP Versions
Side-by-side reference for HTTP/1.0, HTTP/1.1, HTTP/2, and HTTP/3: transport, connection model, header compression, key features, and adoption notes.
24 rows →Redirects 301–308
The 3xx redirect status codes as decision rows: which code to pick, what each preserves about the request, and how browsers and search engines cache the hop.
22 rows →TLS Handshake
The TLS 1.2 and 1.3 handshake message flow, cipher-suite anatomy, and session resumption, with the failure mode of each step.
31 rows →Which API Style?
Answer a few questions about your direction, data shapes, and transport to find the right API style: REST, GraphQL, gRPC, WebSocket, SSE, or Webhooks.
4 questions →Which Caching Strategy?
Answer a few questions about how stale your data may be, who it is shared with, and how much traffic your origin can take to find the right caching approach: no cache, a short TTL, a CDN, stale-while-revalidate, or conditional ETag checks.
3 questions →Which Hosting?
A four-question guide that maps your traffic, ops appetite, latency needs, and cost shape to a hosting platform.
4 questions →Which HTTP Method?
Answer a few questions about your intent and state changes to pick the right HTTP method: GET, POST, PUT, PATCH, DELETE, or HEAD.
2 questions →Tooling & CLI11
curl Flags
The curl flags used day to day, grouped by job: shape the request, set headers, authenticate, present an identity, control output, follow redirects, tune the connection, and debug. Each row pairs the flag with a realistic invocation.
54 rows →Docker Commands
The Docker commands used day to day, grouped by job: build and move images, run and stop containers, tune docker run with flags, read logs and stats, reach inside a container, copy files and talk to registries, manage volumes and networks, drive Compose, and reclaim disk space.
75 rows →Git Commands
The Git commands you actually use, grouped by job: set up a repo, snapshot work, branch and merge, read history, share with a remote, undo mistakes, stash work, and manage files and submodules. Each row pairs the command with a realistic invocation.
55 rows →jq Recipes
The jq filters used day to day, grouped by job: reach into a value, filter and select, work the collections, transform values and strings, reshape into a new object or array, update paths in place, branch on logic, and handle advanced reduction, plus the command-line flags that shape input and output. Each row pairs the filter with the result it produces.
65 rows →kubectl Commands
The kubectl commands used day to day, grouped by job: read the cluster, inspect workloads, apply and roll back changes, expose services, manage nodes, and create config objects. Each row pairs the command with a realistic invocation.
59 rows →Linux File Permissions
Octal and symbolic modes for chmod, plus setuid, setgid, and sticky bits.
42 rows →Vim Motions
The Vim keystrokes used day to day, grouped by job: move around, edit text, select, record macros, drop marks, search and replace, save and quit, and manage splits, tabs, and files. Each row pairs the keys with what they do.
65 rows →Which CI/CD?
Four questions route you to the CI/CD platform that fits your hosting, speed budget, and team.
4 questions →Which Linting Tool?
Answer a few questions about how much config you want, how much speed matters, whether you want formatting bundled in, and how large your plugin needs are to choose between ESLint, Biome, Oxlint, and StandardJS.
4 questions →Which Package Manager?
A decision guide that ranks npm, pnpm, Yarn (Berry), and bun against your project's real trade-offs.
5 questions →Which Testing Framework?
A four-question decision guide that weighs your answers toward Vitest, Jest, Playwright, or Cypress.
4 questions →Languages4
tsconfig Options
The tsconfig options that matter, grouped by job: tighten type-checking, set the language target and modules, control what gets emitted, map import paths, structure multi-project builds, and tune the remaining checks.
55 rows →TypeScript Generics
The generics patterns you reach for, grouped by job: declare a type parameter, constrain it, default it, branch with a conditional, capture with infer, and map over a shape. Each row pairs the pattern with a one-line example.
28 rows →TypeScript Type Narrowing
The ways TypeScript narrows a type inside a branch, grouped by technique: built-in guards, custom predicates, assertion functions, discriminated unions, equality and truthiness flow, and aliased and deferred narrowing. Each row pairs the technique with a one-line example.
23 rows →TypeScript Utility Types
TypeScript's built-in utility types and the keywords that travel with them, grouped by job: reshape an object, filter a union, describe a function, transform a literal string, and capture types from values. Each row shows the type and a real alias you would write.
22 rows →Accessibility1
Networking & Infra2
Common Network Ports
Cheatsheet of well-known TCP/UDP ports for web, mail, database, directory, and operations services.
53 rows →WHOIS & RDAP Reference
Cheatsheet for domain registration data: the WHOIS-to-RDAP shift, RDAP query paths, response fields, common EPP status codes, and the IANA bootstrap.
31 rows →JavaScript & Data2
JavaScript Array Methods
Every common JavaScript array method, grouped by behavior: whether it mutates, what it returns, and when to reach for it. A quick-reference for the methods you use every day.
40 rows →Regex Tokens
Every core regex token: anchors, character classes, quantifiers, groups, and flags. What each one means, with a concrete match. The quick-reference companion to the Regex Tester tool.
55 rows →Privacy & Security3
How Browser Fingerprinting Works
Your browser leaks dozens of harmless-looking signals — canvas, fonts, timezone, headers — that combine into a hash unique enough to recognize you without any cookie.
2 diagrams →How Encryption Works
Symmetric turns plaintext into ciphertext with one shared key; asymmetric splits it into a public key that locks and a private key that unlocks — watch both directions flow.
2 diagrams →How Shamir's Secret Sharing Works
A secret becomes points on a random polynomial; any threshold of shares reconstructs the line — and fewer shares reveal nothing at all.
2 diagrams →Security1
Security & Infra4
Auth Flows
Four ways to prove who a request is from: session cookies, JWT, OAuth2, and API keys, each shown as a live animated diagram, with a side-by-side comparison to help you choose.
4 diagrams →Git internals, explained
How Git really works: the three trees behind every commit, a branch as a movable pointer, and what rebase does that merge does not, each shown as a live animated diagram.
3 diagrams →Rate limiting, explained
Three ways APIs stay fair under load: the token bucket, the sliding window and the 429 Retry-After backoff dance, each shown as a live animated diagram.
3 diagrams →Which Auth Method?
Answer a few questions about your client, your state, and your revocation needs to find the right authentication flow: session cookies, JWT, OAuth2, or API keys.
3 questions →Web & Networking7
API Styles
Ten ways your app talks to a server: REST, GraphQL, gRPC, WebSocket, SSE, Webhooks, SOAP, MQTT, Long Polling and WebRTC, each shown as a live animated diagram, with a side-by-side comparison to help you choose.
10 diagrams →CDN caching, explained
How a CDN serves your files from edge POPs: the instant HIT path, the MISS path back to your origin, and how purges and TTLs keep copies fresh, each shown as a live animated diagram with a side-by-side comparison.
3 diagrams →Container Queries, Visually
Media queries adapt a component to the page; container queries adapt it to the box it actually lives in — and container units (cqw, cqi) make the adaptation fluid with no breakpoints at all. See who watches whom, and why components become portable.
2 diagrams →How an HTTP request lives and dies
Follow one page load end to end: the DNS lookup that finds the server, the TLS handshake that encrypts the line, and the flight through CDN edge to origin and back, each shown as a live animated diagram.
3 diagrams →How the Browser Renders a Page
Every frame you see is the end of a pipeline: parse, style, layout, paint, composite. Every performance rule is about doing less of it — and the tier your change touches (reflow, repaint, or composite-only) decides what it costs.
2 diagrams →Image Formats: JPEG, PNG, WebP, AVIF
Four lanes, one decision: JPEG for photos, PNG for transparency and pixel-perfection, WebP for both at ~30% less, AVIF smallest of all at a slower encode. Underneath them all sits one axis — lossy versus lossless.
2 diagrams →The JavaScript Event Loop, Explained
How JavaScript runs async code on one thread: each turn of the event loop empties the call stack, drains promise microtasks, then runs one macrotask, and why a long task freezes everything.
3 diagrams →