Skip to content

Restructure and enhance cheat sheets for improved readability - #566

Open
JPar99 wants to merge 9 commits into
sharevb:chore/all-my-stuffsfrom
JPar99:documentation-enhancements
Open

Restructure and enhance cheat sheets for improved readability#566
JPar99 wants to merge 9 commits into
sharevb:chore/all-my-stuffsfrom
JPar99:documentation-enhancements

Conversation

@JPar99

@JPar99 JPar99 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Comprehensively restructured four technical reference documents (Docker, Docker Swarm, Git, and chmod) to improve clarity, scannability, and usability. The changes focus on better organization, consistent formatting, and highlighting the most commonly-used commands and concepts.

Key Changes

Docker (docker.md)

  • Condensed verbose introduction into a concise definition with key concepts
  • Reorganized content into clearly-labeled sections with emoji headers (⚡, 📦, 🐳, 🚢, 🎛, 🔍, 💾, 🌐, 🧩, 🧹, 💡)
  • Created "Most-Used Commands" table at the top for quick reference
  • Converted prose-style command documentation into structured code blocks with inline comments
  • Added "Common Flags Reference" table for quick flag lookup
  • Improved visual hierarchy and scannability throughout

Docker Swarm (docker-swarm.md)

  • Restructured introduction to emphasize key features concisely
  • Added "Concepts" table explaining Node, Manager, Worker, Service, Task, and Stack
  • Reorganized node management commands into a single code block with descriptions
  • Created "Ports" reference table for network requirements
  • Added "Replica & Modes" table explaining replicated vs. global services
  • Converted verbose sections into compact, command-focused blocks
  • Improved logical flow from initialization → node management → services

Git (git-memo.content.md)

  • Expanded from 247 to 283 lines with better organization
  • Added introductory context about Git's distributed nature
  • Reorganized into logical sections: Configuration, Get Started, Staging, Commit, Branches, Merging & Rebasing, Remotes, Stashing, Inspecting, Cherry-pick, Tags, Error Recovery, Cleaning, and Debugging
  • Created "Reset modes" comparison table for clarity
  • Added helpful tips and warnings (💡, ⚠️) throughout
  • Improved command descriptions with practical context

chmod (chmod.md)

  • Expanded from 119 to 207 lines with comprehensive restructuring
  • Added visual explanation of ls -l output format
  • Created detailed permission bits table showing octal values and effects on files vs. directories
  • Reorganized symbolic mode with operator explanations
  • Expanded numeric mode section with octal-to-bits mapping table
  • Added "Common modes" reference table with typical use cases
  • Significantly improved special permission bits section with clearer explanations
  • Enhanced overall readability with better formatting and examples

Notable Implementation Details

  • Consistent use of emoji headers for visual scanning
  • Tables for quick reference of related information
  • Code blocks with inline comments instead of separate prose explanations
  • Emphasis on most-used commands appearing first or in dedicated sections
  • Added practical tips (💡) and warnings (⚠️) for important caveats
  • Improved command descriptions to include context about when and why to use them

JPar99 added 9 commits August 22, 2026 13:44
…memos

Unify the four cheat sheets on one layout: short intro, emoji section
headings, grouped command blocks with aligned inline comments, reference
tables and a resources section. Placeholders are consistently <angled>.

- chmod: ls -l breakdown, octal and symbolic tables, special bits, umask,
  recursive/selective changes, recipes, related commands and gotchas;
  fix the directory access matrix (r alone does not grant file access)
  and the --preserve-root default
- git: config and aliases, staging, commit, branching, merge/rebase with
  conflict flow, remotes, stashing, inspection, cherry-pick, tags, undo
  with a reset-mode table, cleaning, bisect, submodules and worktrees
- docker: contexts and events, build flags, registries, run/exec/inspect,
  volumes and mounts, networks, the full compose workflow, cleanup and
  one-liners
- swarm: required firewall ports, node and manager operations, live
  service updates, job modes, placement expressions, publish modes,
  health checks, secret and config rotation, task states and a
  troubleshooting table
…s clean

Trailing inline comments meant selecting a single command also picked up
the padding and its description. Move every description onto its own line
above the command it documents, keeping one code block per topic.

- each command now stands alone on its line: triple-click copies exactly
  the command, nothing else
- no comment column to re-pad when a longer command is added later, so
  adding a line no longer reindents the whole block
- code lines drop from a median of 78 columns to ~22 (p90 42), so blocks
  no longer scroll sideways on narrow screens
- wrap the three remaining long commands over several lines
- reword the descriptions that only made sense trailing a command
…CSS and JSONPath memos

Bring eight more cheat sheets onto the same layout as the Docker and Git
ones: short intro, emoji section headings, one code block per topic with
the description above each command, reference tables, resources at the end.

- tmux: session/window/pane/copy-mode tables, scripting with send-keys and
  capture-pane, a starting .tmux.conf
- screen: shared and detached attach modes, split regions, copy mode,
  logging and monitoring, nested-screen prefix
- zellij: correct the pane-mode bindings (d/r split, not v/h), add tab,
  resize, move, search and session modes, layouts, zellij run/edit/action
- nano: add the command-line options and .nanorc settings the sheet was
  missing, drop the stray H1 and broken headings
- jq: flags, core syntax, object/array/string tables, conditionals,
  variables, reduce, and runnable recipes; drop the stale AWS AMI note
  and the HTML pipe entities
- zpool: vdev and support-vdev types, import/export, properties, dataset
  and snapshot/replication commands, tuning notes
- CSS selectors: split one 60-row table into basic, combinator, attribute,
  structural, state, form, functional and pseudo-element groups; add
  :is()/:where()/:has() and a specificity table
- JSONPath: RFC 9535 functions, worked example document, filter operators
- Dockerfile: instruction reference table, BuildKit cache/secret/bind
  mounts and heredocs, COPY --chown/--chmod/--from, HEALTHCHECK,
  STOPSIGNAL, a CMD vs ENTRYPOINT table, build commands and a worked
  multi-stage example
- Compose: drop the obsolete version: framing, merge the two duplicated
  "Compose vs Swarm" sections into one table, correct the claim that
  file-based secrets are Swarm-only, and add depends_on conditions,
  profiles, watch mode, include/extends/anchors, env interpolation and
  the full CLI section
- kubectl: replace the removed rolling-update and the retired Heapster
  section, add contexts, custom-columns and JSONPath output, rollouts,
  debug containers, port-forward, secrets, labels, node maintenance and
  one-liners; tag the code blocks so they highlight
- sed: how the pattern space works, an addressing table, the full command
  reference including hold-space and branching, multi-line recipes, and a
  warning about BSD/macOS -i; merge the duplicated deletion and addressing
  sections
- regex: add flags, lazy quantifiers, named groups and backreferences,
  Unicode property escapes, replacement tokens, the JavaScript methods
  that expose groups, and a gotchas section (stateful /g, catastrophic
  backtracking, escaping user input)
- common-regex: rewrite the patterns that markdown escaping had mangled
  into unusable text, group them by subject, and add UUID, semver, CIDR,
  MAC, ISO 8601, duration, log-line and CSV patterns

Every pattern in common-regex now compiles, and the ones people copy most
(IPv4, UUID, semver, E.164, ISO dates, password rules, slug, duration,
MAC) were checked against matching and non-matching input.
- XPath: give every table a CSS-equivalent column, fix the broken
  "only children of type" expression, flag which functions are 2.0+ and
  give the 1.0 workarounds for ends-with and case folding, add the axes
  short forms, worked examples, and how to run XPath from devtools,
  xmllint, lxml, Selenium and Playwright
- conventional commits: types table with the release effect each one
  has, description do/don't table, footer reference, both ways to mark a
  breaking change, a version-bump table, and husky v9 hook syntax
- RJ45: keep the colour swatches and the pinout image, add what each pin
  carries on 10/100 vs Gigabit, the PoE standards table (correcting the
  claim that the blue pair is the PoE pair), gigabit crossover, Cat8,
  length and solid-vs-stranded rules, and a fault-finding table
- nginx: the whole sheet was a single 218-line code block; split it into
  sections with a service/CLI block, a file-layout table, location
  matching priority, root vs alias, reverse proxy and WebSocket headers,
  load-balancing methods, TLS, rate limiting, caching and gzip, a
  variable reference and a 502/504 troubleshooting table
- PowerShell: add discovery (Get-Help/Get-Command/Get-Member), functions
  and param blocks, try/catch and error preferences, Invoke-RestMethod
  and JSON/CSV conversion, services, jobs, remoting, modules and
  execution policy, PowerShell 7 operators, an alias table, and repair
  the mangled escape-character rows
Both sheets were a single unbroken code block with ASCII banners, so the
whole page rendered as one <pre> with nothing to scan. Rebuild them as
sections with key/action tables and runnable blocks.

- vim: explain the count + operator + motion grammar, add the text-object
  table (ciw, ci", da(), registers and why "0p exists, the :g and :v
  global commands, folds, completion, diff mode, undo by time, a :set
  reference and a starter vimrc
- bash: parameter expansion, arrays including associative ones, the test
  operator tables, redirection and process substitution, job control and
  traps, set -euo pipefail with its caveat, shellcheck, and an ANSI
  colour table in place of sixty lines of colour variables

The vim sheet dropped roughly a hundred lines of one person's leader-key
mappings and plugin bindings (NERDTree, Taglist, sparkup, PHP DOC), which
only worked with their dotfiles; a note now explains that leader mappings
come from your own vimrc.
Restructure memo documents for improved readability and organization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant