From 11112904725a47e897501148d1de6c865581bc6f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 13 Oct 2025 00:20:52 +0000 Subject: [PATCH] Update cheatsheets --- tldr/brew-abv | 12 ++++++++ tldr/brew-info | 33 ++++++++++++++++++++++ tldr/cluster | 29 ++++++++++++++++++++ tldr/diffimg | 13 +++++++++ tldr/dijkstra | 25 +++++++++++++++++ tldr/dos/cd | 2 +- tldr/dotty | 26 ++++++++++++++++++ tldr/gh-at | 12 ++++++++ tldr/gh-attestation | 37 +++++++++++++++++++++++++ tldr/gh-rs | 12 ++++++++ tldr/gh-ruleset | 41 ++++++++++++++++++++++++++++ tldr/gvedit | 25 +++++++++++++++++ tldr/gvgen | 37 +++++++++++++++++++++++++ tldr/gvmap | 33 ++++++++++++++++++++++ tldr/kubectl-attach | 29 ++++++++++++++++++++ tldr/linux/pvck | 37 +++++++++++++++++++++++++ tldr/linux/pw-jack | 25 +++++++++++++++++ tldr/linux/semanage-login | 34 +++++++++++++++++++++++ tldr/linux/systemctl-list-automounts | 26 ++++++++++++++++++ tldr/mvn-archetype | 17 ++++++++++++ 20 files changed, 504 insertions(+), 1 deletion(-) create mode 100644 tldr/brew-abv create mode 100644 tldr/brew-info create mode 100644 tldr/cluster create mode 100644 tldr/diffimg create mode 100644 tldr/dijkstra create mode 100644 tldr/dotty create mode 100644 tldr/gh-at create mode 100644 tldr/gh-attestation create mode 100644 tldr/gh-rs create mode 100644 tldr/gh-ruleset create mode 100644 tldr/gvedit create mode 100644 tldr/gvgen create mode 100644 tldr/gvmap create mode 100644 tldr/kubectl-attach create mode 100644 tldr/linux/pvck create mode 100644 tldr/linux/pw-jack create mode 100644 tldr/linux/semanage-login create mode 100644 tldr/linux/systemctl-list-automounts create mode 100644 tldr/mvn-archetype diff --git a/tldr/brew-abv b/tldr/brew-abv new file mode 100644 index 00000000..9ccaa2aa --- /dev/null +++ b/tldr/brew-abv @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# brew abv + +> This command is an alias of `brew info`. + +- View documentation for the original command: + +`tldr brew info` diff --git a/tldr/brew-info b/tldr/brew-info new file mode 100644 index 00000000..f950df4a --- /dev/null +++ b/tldr/brew-info @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# brew info + +> Display information for Homebrew installation and formulae. +> More information: . + +- Display statistics for Homebrew installation: + +`brew info` + +- Display more information about a formula or cask: + +`brew info {{formula|cask}}` + +- Display verbose information about a formula or cask: + +`brew info {{[-v|--verbose]}} {{formula|cask}}` + +- Display information about a formula or cask in JSON format: + +`brew info --json {{formula|cask}}` + +- Print JSON of currently installed formulae: + +`brew info --json --installed` + +- Display help: + +`brew info {{[-h|--help]}}` diff --git a/tldr/cluster b/tldr/cluster new file mode 100644 index 00000000..b898d919 --- /dev/null +++ b/tldr/cluster @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# cluster + +> Find clusters in a graph and augment the graph with this information. +> More information: . + +- Generate clusters that optimize modularity and print the result to `stdout`: + +`cluster {{input.gv}}` + +- Specify a target number of [C]lusters (approximate) to generate (0 by default, meaning a number that approximately optimizes the modularity): + +`cluster -C {{5}} {{input.gv}}` + +- Use a different [c]lustering method (0: modularity clustering, 1: modularity quality): + +`cluster -c {{0|1}} {{input.gv}}` + +- Save the [o]utput to a file: + +`cluster -o {{output.gv}} {{input.gv}}` + +- Enable [v]erbose mode: + +`cluster -v {{input.gv}}` diff --git a/tldr/diffimg b/tldr/diffimg new file mode 100644 index 00000000..6e8ce39c --- /dev/null +++ b/tldr/diffimg @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# diffimg + +> Generate an image where each pixel is the difference between corresponding pixels in the 2 source images. +> More information: . + +- Compare two images and output the difference image to the specified file: + +`diffimg {{path/to/image1}} {{path/to/image2}} {{path/to/output_image}}` diff --git a/tldr/dijkstra b/tldr/dijkstra new file mode 100644 index 00000000..dda477f2 --- /dev/null +++ b/tldr/dijkstra @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# dijkstra + +> Compute shortest-path distances from a single source node in a graph. +> More information: . + +- Compute distances from a given source node in a graph file: + +`dijkstra {{source_node_file}}` + +- Treat the graph as [d]irected when computing distances: + +`dijkstra -d {{source_node_file}}` + +- Record the [p]revious closest node for each node on the shortest path: + +`dijkstra -p {{source_node_file}}` + +- [a]ssign large distance values to unreachable nodes: + +`dijkstra -a {{source_node_file}}` diff --git a/tldr/dos/cd b/tldr/dos/cd index 976239c2..ac0493a8 100644 --- a/tldr/dos/cd +++ b/tldr/dos/cd @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # CD > Change the current working directory. -> More information: . +> More information: . - Go to the specified directory: diff --git a/tldr/dotty b/tldr/dotty new file mode 100644 index 00000000..1778fa1a --- /dev/null +++ b/tldr/dotty @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# dotty + +> A customizable interactive graph editor for the X Window System. +> Note: This tool has been deprecated, but this entry is retained to aid anyone still using it. +> More information: . + +- Open a graph file (`.gv` or `.dot`) in the Dotty editor: + +`dotty {{path/to/graph.gv}}` + +- Start Dotty with the [V]ersion information displayed: + +`dotty -V` + +- Set the [l]ayout [m]ode to synchronous or asynchronous: + +`dotty -lm {{sync|async}} {{path/to/graph.gv}}` + +- Set the m[e]ssage verbosity [l]evel (`0` for minimal, `1` for detailed): + +`dotty -el {{0|1}} {{path/to/graph.gv}}` diff --git a/tldr/gh-at b/tldr/gh-at new file mode 100644 index 00000000..abe76fd3 --- /dev/null +++ b/tldr/gh-at @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh at + +> This command is an alias of `gh attestation`. + +- View documentation for the original command: + +`tldr gh attestation` diff --git a/tldr/gh-attestation b/tldr/gh-attestation new file mode 100644 index 00000000..a83fb729 --- /dev/null +++ b/tldr/gh-attestation @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh attestation + +> Download and verify artifact attestations to ensure their integrity and provenance. +> More information: . + +- Download attestations for a local file associated with a specific repository: + +`gh {{[at|attestation]}} download {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}` + +- Download attestations for an OCI container image associated with an organization: + +`gh {{[at|attestation]}} download oci://{{image_uri}} {{[-o|--owner]}} {{organization_name}}` + +- Verify a local artifact online against attestations from a specific repository: + +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}` + +- Verify an artifact, requiring it was signed by a specific reusable workflow for enhanced security: + +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-o|--owner]}} {{organization_name}} --signer-workflow {{owner}}/{{repo}}/{{path/to/workflow.yml}}` + +- Verify an artifact and output the detailed verification results as JSON for use in policy engines: + +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-o|--owner]}} {{organization_name}} --format json` + +- Perform a fully offline verification using a downloaded bundle and a custom trusted root file: + +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-b|--bundle]}} {{path/to/bundle.jsonl}} --custom-trusted-root {{path/to/trusted_root.jsonl}}` + +- Save the trusted root of signing certificates to a file for offline verification: + +`gh {{[at|attestation]}} trusted-root > {{path/to/trusted_root.jsonl}}` diff --git a/tldr/gh-rs b/tldr/gh-rs new file mode 100644 index 00000000..ffd1d5f7 --- /dev/null +++ b/tldr/gh-rs @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh rs + +> This command is an alias of `gh ruleset`. + +- View documentation for the original command: + +`tldr gh ruleset` diff --git a/tldr/gh-ruleset b/tldr/gh-ruleset new file mode 100644 index 00000000..f5f6ee1d --- /dev/null +++ b/tldr/gh-ruleset @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh ruleset + +> Manage GitHub repository rulesets. +> More information: . + +- List all rulesets for the current repository: + +`gh {{[rs|ruleset]}} {{[ls|list]}}` + +- List all rulesets for a specific organization: + +`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-o|--org]}} {{organization_name}}` + +- Check the rules that apply to the current branch: + +`gh {{[rs|ruleset]}} check` + +- Check the rules that apply to a specific branch in another repository: + +`gh {{[rs|ruleset]}} check {{branch_name}} {{[-R|--repo]}} {{owner}}/{{repo}}` + +- Interactively select and view a ruleset for the current repository: + +`gh {{[rs|ruleset]}} view` + +- View a specific ruleset by its ID: + +`gh {{[rs|ruleset]}} view {{ruleset_id}}` + +- View an organization-level ruleset by its ID: + +`gh {{[rs|ruleset]}} view {{ruleset_id}} {{[-o|--org]}} {{organization_name}}` + +- Open the list of rulesets for a specific repository in the browser: + +`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repo}} {{[-w|--web]}}` diff --git a/tldr/gvedit b/tldr/gvedit new file mode 100644 index 00000000..7f1872f8 --- /dev/null +++ b/tldr/gvedit @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gvedit + +> Simple Graphviz graph editor and viewer. +> More information: . + +- Open a Graphviz file in the editor: + +`gvedit {{path/to/graph.gv}}` + +- [s]cale coordinates from points to inches (useful for layouts generated by Graphviz tools): + +`gvedit -s {{path/to/graph.gv}}` + +- Enable [v]erbose mode: + +`gvedit -v {{path/to/graph.gv}}` + +- Display help: + +`gvedit -?` diff --git a/tldr/gvgen b/tldr/gvgen new file mode 100644 index 00000000..c7be3b26 --- /dev/null +++ b/tldr/gvgen @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gvgen + +> Generate simple, structured abstract graphs. +> More information: . + +- Generate a [c]ycle with 10 vertices and edges and write it to `stdout`: + +`gvgen -c {{10}}` + +- Generate a 4×3 [g]rid: + +`gvgen -g {{4,3}}` + +- Generate a binary [t]ree of height 5: + +`gvgen -t {{5}}` + +- Generate a complete [b]ipartite graph with 3 and 4 vertices: + +`gvgen -b {{3,4}}` + +- Create a [r]andom graph and [o]utput it to a file: + +`gvgen -r {{10,5}} -o {{random.gv}}` + +- Generate a [d]irected graph with [v]erbose output: + +`gvgen -d -v -c {{6}}` + +- Display help: + +`gvgen -?` diff --git a/tldr/gvmap b/tldr/gvmap new file mode 100644 index 00000000..4208d5e7 --- /dev/null +++ b/tldr/gvmap @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gvmap + +> Find clusters and creates a geographical map highlighting clusters. +> More information: . + +- Generate a clustered map layout from a DOT format graph: + +`gvmap {{graph.gv}} -o {{output.xdot}}` + +- Generate a map using existing cluster subgraphs from the input: + +`gvmap -D {{graph.gv}}` + +- Include graph edges in the [o]utput map: + +`gvmap -e {{graph.gv}} -o {{output.xdot}}` + +- Specify a [c]olor scheme (1: pastel, 2: blue-yellow, 3: white-red, etc.): + +`gvmap -c {{1|2|3|...}} {{graph.gv}} -o {{output.xdot}}` + +- Set the maximum number of [C]lusters (by default 0, meaning there is no limit): + +`gvmap -C {{10}} {{graph.gv}} -o {{output.xdot}}` + +- Only draw cluster 2 (by default, all clusters are drawn): + +`gvmap -highlight={{2}} {{graph.gv}} -o {{output.xdot}}` diff --git a/tldr/kubectl-attach b/tldr/kubectl-attach new file mode 100644 index 00000000..29ea4a8d --- /dev/null +++ b/tldr/kubectl-attach @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl attach + +> Attach to a process that is already running inside an existing container. +> More information: . + +- Get output from a pod: + +`kubectl attach {{pod_name}}` + +- Get output from a container in the specified pod: + +`kubectl attach {{pod_name}} {{[-c|--container]}} {{container_name}}` + +- Get output from the first pod of a replica set: + +`kubectl attach {{[rs|replicaset]}}/{{replicaset_name}}` + +- Create an interactive session with a pod: + +`kubectl attach {{pod_name}} {{[-it|--stdin --tty]}}` + +- Create an interactive session with a specific container from a pod: + +`kubectl attach {{pod_name}} {{[-c|--container]}} {{container_name}} {{[-it|--stdin --tty]}}` diff --git a/tldr/linux/pvck b/tldr/linux/pvck new file mode 100644 index 00000000..d0583785 --- /dev/null +++ b/tldr/linux/pvck @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pvck + +> Check and repair LVM metadata on physical volumes. +> More information: . + +- Print LVM on-disk headers and structures (label, PV header, MDA header, metadata area): + +`pvck {{/dev/sdXN}} --dump headers` + +- Print the current VG metadata text: + +`pvck {{/dev/sdXN}} --dump metadata` + +- List all metadata versions found in the metadata area: + +`pvck {{/dev/sdXN}} --dump metadata_all` + +- Search common locations for metadata when headers may be damaged, and save it to a file: + +`pvck {{/dev/sdXN}} --dump metadata_search {{[-f|--file]}} {{path/to/metadata.txt}}` + +- Select the second metadata area (mda2) when printing metadata: + +`pvck {{/dev/sdXN}} --dump metadata --settings "mda_num=2"` + +- Repair headers and metadata using a metadata input file (use with care): + +`pvck {{/dev/sdXN}} --repair {{[-f|--file]}} {{path/to/metadata_file}}` + +- Repair only the PV header and label header: + +`pvck {{/dev/sdXN}} --repairtype pv_header` diff --git a/tldr/linux/pw-jack b/tldr/linux/pw-jack new file mode 100644 index 00000000..958f7913 --- /dev/null +++ b/tldr/linux/pw-jack @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pw-jack + +> Run a JACK application with PipeWire. +> More information: . + +- Run a command with its arguments, using PipeWire: + +`pw-jack {{command}} {{argument1 argument2 ...}}` + +- Run a command in verbose mode: + +`pw-jack -v {{command}}` + +- Connect to a specific remote PipeWire instance: + +`pw-jack -r {{remote_instance_name}} {{command}}` + +- Display help: + +`pw-jack -h` diff --git a/tldr/linux/semanage-login b/tldr/linux/semanage-login new file mode 100644 index 00000000..2e87d87a --- /dev/null +++ b/tldr/linux/semanage-login @@ -0,0 +1,34 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# semanage-login + +> Manage SELinux login mappings between Linux users and SELinux users. +> See also: `semanage`, `semanage-user`. +> More information: . + +- List all login mappings: + +`sudo semanage login {{[-l|--list]}}` + +- Add a login mapping (map Linux user to SELinux user): + +`sudo semanage login {{[-a|--add]}} {{[-s|--seuser]}} {{selinux_user}} {{linux_username}}` + +- Delete a login mapping: + +`sudo semanage login {{[-d|--delete]}} {{linux_username}}` + +- Modify an existing login mapping: + +`sudo semanage login {{[-m|--modify]}} {{[-s|--seuser]}} {{selinux_user}} {{linux_username}}` + +- Add a login mapping with a specific MLS/MCS range: + +`sudo semanage login {{[-a|--add]}} {{[-s|--seuser]}} {{user_u}} {{[-r|--range]}} {{s0-s0:c0.c1023}} {{linux_username}}` + +- List only customized login mappings: + +`sudo semanage login {{[-l|--list]}} {{[-C|--locallist]}}` diff --git a/tldr/linux/systemctl-list-automounts b/tldr/linux/systemctl-list-automounts new file mode 100644 index 00000000..7ba807e8 --- /dev/null +++ b/tldr/linux/systemctl-list-automounts @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl list-automounts + +> List automount units currently in memory, showing mount paths and unit names. +> See also: `systemctl list-units`, `systemctl list-unit-files`. +> More information: . + +- List automount units currently in memory: + +`systemctl list-automounts` + +- List all automount units, including inactive ones: + +`systemctl list-automounts {{[-a|--all]}}` + +- Filter automount units by state: + +`systemctl list-automounts --state {{active|inactive|failed|...}}` + +- Filter automount units by name pattern: + +`systemctl list-automounts {{pattern1 pattern2 ...}}` diff --git a/tldr/mvn-archetype b/tldr/mvn-archetype new file mode 100644 index 00000000..6f3a3ee7 --- /dev/null +++ b/tldr/mvn-archetype @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# mvn archetype + +> Generate a new Maven project from a predefined template (archetype). +> More information: . + +- Generate a new project interactively: + +`mvn archetype:generate` + +- Generate a project non-interactively with specific archetype and project parameters: + +`mvn archetype:generate --define archetypeGroupId={{group_id}} --define archetypeArtifactId={{artifact_id}} --define archetypeVersion={{version}} --define groupId={{project_group_id}} --define artifactId={{project_name}} --define interactiveMode=false`