Cheat Sheets
Quick reference tables for the things people look up again and again. Numbers on this page were generated by code, not typed by hand.
IPv4 prefix lengths
Usable hosts are total addresses minus two (network and broadcast), except /31 (two, per RFC 3021) and /32 (one). Cloud providers reserve additional addresses; see our cloud planning guide.
| Prefix | Subnet mask | Wildcard | Total addresses | Usable hosts |
|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Linux permission quick table
| Octal | Symbolic | Typical use |
| 600 | rw------- | Private keys, secrets |
| 640 | rw-r----- | Config readable by a group |
| 644 | rw-r--r-- | Ordinary files, web pages |
| 700 | rwx------ | Private directories |
| 750 | rwxr-x--- | Group-shared programs |
| 755 | rwxr-xr-x | Scripts, directories |
| 775 | rwxrwxr-x | Group-writable shared folders |
umask to resulting permissions
| umask | New files | New directories |
| 022 | 644 | 755 |
| 002 | 664 | 775 |
| 027 | 640 | 750 |
| 077 | 600 | 700 |
Cron examples
| Expression | Meaning |
*/5 * * * * | Every 5 minutes |
0 * * * * | Top of every hour |
0 2 * * * | Daily at 02:00 |
0 9 * * 1-5 | Weekdays at 09:00 |
0 0 * * 0 | Sundays at midnight |
30 2 1 * * | 1st of the month at 02:30 |
0 0 1 1 * | 1 January at midnight |
WCAG contrast thresholds
| Content | AA | AAA |
| Normal text | 4.5:1 | 7:1 |
| Large text (24px, or 18.7px bold) | 3:1 | 4.5:1 |
| UI components and graphics | 3:1 | n/a |
Common aspect ratios
| Ratio | Example size | Typical use |
| 16:9 | 1920 x 1080 | Widescreen video |
| 9:16 | 1080 x 1920 | Vertical video, stories |
| 1:1 | 1080 x 1080 | Square posts |
| 4:5 | 1080 x 1350 | Portrait feed posts |
| 4:3 | 1024 x 768 | Older screens, tablets |
| 3:2 | 1500 x 1000 | Photography |