Developer Guides & Tutorials

Practical, in-depth guides covering essential developer topics. Each guide includes clear explanations, code examples, and links to related tools you can use right away.

All Guides

How to Decode JWT Tokens

Learn the structure of JSON Web Tokens, how to decode them safely, and what each claim means.

How to Find and Fix Leaked Secrets and API Keys

Scan code and git history for leaked keys, recognize secret formats, and rotate-then-scrub when one leaks.

Base64 Encode and Decode in JavaScript

btoa/atob, Unicode handling, Node Buffer, URL-safe variant, file encoding — every gotcha.

Base64 Encode and Decode in Python

b64encode, urlsafe variant, bytes vs str, file streaming, padding rules.

How to Convert XML to JSON

Attribute conventions, repeated elements, code in JS/Python/PHP/Java, round-tripping.

How to Convert CSV to JSON

Row-to-object mapping, RFC 4180 quoting, type coercion, code in JavaScript and Python.

How to Convert JSON to TypeScript

Infer interfaces from JSON, handle nulls and optionals, quicktype, and the one-sample trap.

How to Generate a JSON Schema

Infer a Draft 2020-12 schema from a sample, then tighten it; validate with Ajv and jsonschema.

How to Convert Markdown to HTML

marked, markdown-it, python-markdown, GFM flavors, and sanitizing against XSS.

How to Parse a User Agent String

UA anatomy, ua-parser-js, Client Hints, Python user-agents, and why not to hand-roll it.

How to Count Tokens for GPT-4 and Claude

Exact tiktoken counts for GPT, the count_tokens API for Claude, and cost estimation.

What Is a Token?

LLM tokens explained: words vs tokens, BPE, the ~0.75 words-per-token rule.

How to Format JSONL for OpenAI Fine-Tuning

The messages format, roles, the weight field, example minimums, and the array trap.

How to Format JSONL for Claude Fine-Tuning

The Bedrock Claude format, the top-level system field, alternation rules, and quotas.

Diff Strings or Files in JavaScript

jsdiff, diff-match-patch, manual line walks, unified diff output, whitespace + performance.

Diff Strings or Files in Python

difflib (stdlib), Levenshtein, deepdiff, unified diff, ndiff, SequenceMatcher.

How to Read a Unified Diff

Hunk headers, +/- prefixes, context lines, git diff format, applying patches.

What Is Base64 Encoding?

Understand when and why to use Base64 encoding, with examples in multiple programming languages.

Regex Cheat Sheet

A complete reference for regular expression syntax with practical examples and common patterns.

Understanding Unix Timestamps

What Unix timestamps are, how they work across time zones, and how to convert them in any language.

JSON Formatting Best Practices

Best practices for structuring, validating, and formatting JSON in APIs, config files, and data pipelines.

SQL Formatting Best Practices

Keyword casing, leading commas, JOIN and CTE layout, aliasing, and snake_case naming for readable queries.

camelCase vs snake_case vs kebab-case

What each naming style is, which languages and contexts use it, and how to convert between them.

UUID vs GUID

Are UUIDs and GUIDs the same thing? Mostly yes — but the differences occasionally matter.

Cron Expression Examples

Copy-paste cron expressions for every 5 minutes, daily, weekly, monthly, business hours, and more.

JWT vs Session Authentication

Honest tradeoffs between JWT and session auth, with concrete security guidance.

SHA-256 vs Bcrypt

Why SHA-256 is wrong for passwords and bcrypt is right — with migration patterns and code.

YAML vs JSON

When to use YAML for configuration and JSON for data interchange.

JavaScript Regex Guide

Flags, RegExp methods, lookbehind, named groups, and Unicode property escapes.

Python Regex Guide

The re module, raw strings, named groups, verbose mode, and gotchas.

Go Regex Guide

The regexp package, RE2 limits (no backreferences/lookahead), MustCompile, named groups.

Java Regex Guide

Pattern and Matcher, flags, named groups, the double-backslash trap, replaceAll.

PHP Regex Guide

preg_match, delimiters, modifiers, named groups, the u (UTF-8) modifier, return-value traps.

Rust Regex Guide

The regex crate, no backreferences or lookaround, compiling once, named groups.

C# Regex Guide

The Regex class, GeneratedRegex, variable-length lookbehind, ReDoS timeouts.

Ruby Regex Guide

Literals, match? vs =~, named captures, the ^/$ line-anchor trap, /m dotall.

Regex Lookahead & Lookbehind

Zero-width assertions explained with examples and engine support tables.

Extract Emails With Regex

Pull every email address out of any text — patterns, JS, Python, Bash, edge cases.

Extract URLs With Regex

Pull every URL out of any text — patterns, JS, Python, Bash, trailing punctuation.

Extract Phone Numbers With Regex

US and international patterns — JS, Python, Bash, extensions, when to use libphonenumber.

Parse Log Lines With Regex

Apache, Nginx, syslog, app logs — named groups in JS, Python, Bash, plus stack traces.

Regex Find and Replace

Capture groups, backreferences, $1 vs \1 — JS, Python, sed, vim with examples.

HTML Entities Cheat Sheet

Reserved characters, currency, arrows, math, Greek — named, numeric, hex.