Guides
A cheat sheet answers “what is the syntax”. These 7 guides answer the question that comes first: which of the four commands do you want. Every code block below is pulled from the same 1,271 snippets the 11 sheets are built from, so nothing here is retyped and nothing can drift out of step with the reference.
- Git undo: reset, revert or restore?A decision tree for undoing things in git. Which of reset, revert, restore, amend or reflog you want, by what you are undoing and whether it is pushed.
- The regex that actually comes upEleven patterns cover most real regex work: email, URL, IPv4, dates, hex colours. Plus the eight mistakes that break the rest, from greedy .* to backtracking.
- The same task in every stack453 tasks indexed by what you want to do, 276 answered in more than one stack. How the cross-stack index is built, what it is for, and where it is thin.
- SQL joins: what each one returnsINNER, LEFT, RIGHT, FULL OUTER, CROSS and self joins, by which rows survive. Plus the ON-versus-WHERE trap that silently turns a LEFT JOIN into an INNER one.
- Docker layer caching and image sizeWhy COPY . . before npm install makes every build reinstall everything, why rm in a later layer saves nothing, and what multi-stage builds actually remove.
- The 65 mistakes, and the four that repeatEight of the eleven sheets here end in a Common Mistakes section - 65 entries. Read together, four failures recur across languages that share nothing else.
- How this cheat sheet is organized11 stacks, 152 sections, 1,271 entries, 453 task pages. What an entry contains, how search ranks, what runs offline, and which field is empty on every entry.
Straight to the reference
If you already know what you are looking for, skip the prose: 1,271 copy-ready snippets across 152 sections, and 453 tasks indexed by what you want to do.