krzroute.net

Reference notes.

A small set of lookup tables kept here for convenience. Everything on this page is long-settled and does not change, which is rather the point of writing it down once.

HTTP status codes

The ones that come up in practice.

CodeNameMeans
200OKRequest succeeded.
201CreatedSucceeded and a new resource exists.
204No ContentSucceeded, deliberately no body.
301Moved PermanentlyUse the new URL from now on.
302FoundTemporary redirect; keep using the old URL.
304Not ModifiedYour cached copy is still good.
400Bad RequestMalformed; the server won't parse it.
401UnauthorizedNot authenticated. Credentials missing or bad.
403ForbiddenAuthenticated, but not allowed.
404Not FoundNo such resource.
409ConflictClashes with the current state.
429Too Many RequestsRate limited. Back off.
500Internal Server ErrorThe server broke.
502Bad GatewayAn upstream returned something invalid.
503Service UnavailableDown or overloaded. Usually temporary.
504Gateway TimeoutAn upstream did not answer in time.

Cron expression fields

Five fields, in order, separated by spaces.

PositionFieldRange
1Minute0–59
2Hour0–23
3Day of month1–31
4Month1–12
5Day of week0–6, Sunday is 0

* every value  ·  */n every nth  ·  a-b a range  ·  a,b a list

ExpressionRuns
0 3 * * *Every day at 03:00.
*/15 * * * *Every fifteen minutes.
0 9 1 * *09:00 on the first of each month.
30 2 * * 002:30 every Sunday.

Data size units

Decimal units are powers of ten; binary units are powers of two. They are not the same, which is why a drive sold as 1 TB shows up as roughly 931 GiB.

UnitBytesBasis
kB1,000103
MB1,000,000106
GB1,000,000,000109
TB1,000,000,000,0001012
KiB1,024210
MiB1,048,576220
GiB1,073,741,824230
TiB1,099,511,627,776240