Restructure and enhance cheat sheets for improved readability - #566
Open
JPar99 wants to merge 9 commits into
Open
Restructure and enhance cheat sheets for improved readability#566JPar99 wants to merge 9 commits into
JPar99 wants to merge 9 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)Docker Swarm (
docker-swarm.md)Git (
git-memo.content.md)chmod (
chmod.md)ls -loutput formatNotable Implementation Details