From a94cb9991c56253608afe81d6d2976aad8b490a6 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 31 Oct 2025 00:20:00 +0000 Subject: [PATCH] Update cheatsheets --- tldr/c++ | 12 +++++++++++ tldr/linux/dutree | 33 ++++++++++++++++++++++++++++++ tldr/nest | 12 +++++++++-- tldr/npm-shrinkwrap | 22 ++++++++++++++++++++ tldr/pnpm | 12 +++++------ tldr/rabbitmq-diagnostics | 34 ++++++++++++++++++++++++++++++ tldr/rabbitmq-plugins | 25 +++++++++++++++++++++++ tldr/rabbitmq-queues | 33 ++++++++++++++++++++++++++++++ tldr/rabbitmq-streams | 41 +++++++++++++++++++++++++++++++++++++ tldr/windows/clear-history | 42 ++++++++++++++++++++++++++++++++++++++ tldr/windows/clhy | 12 +++++++++++ tldr/windows/netsh | 38 ++++++++++++++++++++++++++++++++++ tldr/windows/ren | 12 +++++++++++ tldr/windows/rename-item | 30 +++++++++++++++++++++++++++ tldr/windows/rni | 12 +++++++++++ 15 files changed, 362 insertions(+), 8 deletions(-) create mode 100644 tldr/c++ create mode 100644 tldr/linux/dutree create mode 100644 tldr/npm-shrinkwrap create mode 100644 tldr/rabbitmq-diagnostics create mode 100644 tldr/rabbitmq-plugins create mode 100644 tldr/rabbitmq-queues create mode 100644 tldr/rabbitmq-streams create mode 100644 tldr/windows/clear-history create mode 100644 tldr/windows/clhy create mode 100644 tldr/windows/netsh create mode 100644 tldr/windows/ren create mode 100644 tldr/windows/rename-item create mode 100644 tldr/windows/rni diff --git a/tldr/c++ b/tldr/c++ new file mode 100644 index 00000000..8aee43cc --- /dev/null +++ b/tldr/c++ @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# c++ + +> This command is an alias of `g++`. + +- View documentation for original command: + +`tldr g++` diff --git a/tldr/linux/dutree b/tldr/linux/dutree new file mode 100644 index 00000000..26ded318 --- /dev/null +++ b/tldr/linux/dutree @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# dutree + +> Analyze file system usage with colorful text-based trees. +> More information: . + +- Show a graphical tree of the current directory: + +`dutree` + +- Show a specific directory: + +`dutree {{path/to/directory}}` + +- Aggregate items smaller than a number of KB (or M for MB, or G for GB): + +`dutree --aggr {{number}}K` + +- Show subdirectories up to the specified depth (default is 1): + +`dutree --depth {{depth}}` + +- Skip directories for a fast local overview: + +`dutree --files-only` + +- Exclude hidden files: + +`dutree --no-hidden` diff --git a/tldr/nest b/tldr/nest index 049c5e8a..ae00d076 100644 --- a/tldr/nest +++ b/tldr/nest @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Display information about installed nest version: -`nest info` +`nest {{[i|info]}}` - Create a new NestJS project in a directory of the same name: -`nest new {{project_name}}` +`nest {{[n|new]}} {{project_name}}` - Build a specific NestJS project: @@ -27,3 +27,11 @@ source: https://github.com/tldr-pages/tldr.git - Import a library into the current NestJS project: `nest add {{library_name}}` + +- Generate a new component: + +`nest {{[g|generate]}} {{module|controller|service|...}} {{component_name}}` + +- Display help: + +`nest` diff --git a/tldr/npm-shrinkwrap b/tldr/npm-shrinkwrap new file mode 100644 index 00000000..a727300c --- /dev/null +++ b/tldr/npm-shrinkwrap @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm shrinkwrap + +> Lock down the dependencies of a package, creating a `npm-shrinkwrap.json` file. +> Similar to `package-lock.json` but intended for published packages. +> More information: . + +- Generate a `npm-shrinkwrap.json` file from the current `package-lock.json`: + +`npm shrinkwrap` + +- Run in production mode (excludes devDependencies): + +`npm shrinkwrap --production` + +- Force recreate the shrinkwrap file even if it already exists: + +`npm shrinkwrap --force` diff --git a/tldr/pnpm b/tldr/pnpm index 9f9086b6..ed6b02b5 100644 --- a/tldr/pnpm +++ b/tldr/pnpm @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Download all the packages listed as dependencies in `package.json`: -`pnpm install` +`pnpm {{[i|install]}}` - Download a specific version of a package and add it to the list of dependencies in `package.json`: @@ -23,20 +23,20 @@ source: https://github.com/tldr-pages/tldr.git - Download a package and add it to the list of dev dependencies in `package.json`: -`pnpm add {{[-D|--save-dev]}} {{module_name}}` +`pnpm add {{module_name}} {{[-D|--save-dev]}}` - Download a package and install it globally: -`pnpm add {{[-g|--global]}} {{module_name}}` +`pnpm add {{module_name}} {{[-g|--global]}}` - Uninstall a package and remove it from the list of dependencies in `package.json`: -`pnpm remove {{module_name}}` +`pnpm {{[rm|remove]}} {{module_name}}` - Print a tree of locally installed modules: -`pnpm list` +`pnpm {{[ls|list]}}` - List top-level globally installed modules: -`pnpm list {{[-g|--global]}} --depth {{0}}` +`pnpm {{[ls|list]}} {{[-g|--global]}} --depth {{0}}` diff --git a/tldr/rabbitmq-diagnostics b/tldr/rabbitmq-diagnostics new file mode 100644 index 00000000..40b4758a --- /dev/null +++ b/tldr/rabbitmq-diagnostics @@ -0,0 +1,34 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rabbitmq-diagnostics + +> Diagnose, monitor, and run health checks on RabbitMQ nodes. +> Many subcommands are delegated to `rabbitmqctl`. +> More information: . + +- List resource alarms: + +`rabbitmq-diagnostics alarms` + +- List node certificates: + +`rabbitmq-diagnostics certificates` + +- Check if RabbitMQ is running on the specified node: + +`rabbitmq-diagnostics check_running --node {{node}}` + +- Run peer discovery: + +`rabbitmq-diagnostics discover_peers` + +- List listeners (bound sockets): + +`rabbitmq-diagnostics listeners` + +- Print the last `n` log lines on the specified node: + +`rabbitmq-diagnostics log_tail --number {{n}} --node {{node}}` diff --git a/tldr/rabbitmq-plugins b/tldr/rabbitmq-plugins new file mode 100644 index 00000000..27c6cf47 --- /dev/null +++ b/tldr/rabbitmq-plugins @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rabbitmq-plugins + +> Manage RabbitMQ plugins. +> More information: . + +- List plugins: + +`rabbitmq-plugins list` + +- Enable a plugin: + +`rabbitmq-plugins enable {{plugin}}` + +- Disable a plugin: + +`rabbitmq-plugins disable {{plugin}}` + +- Enable a plugin and disable the rest: + +`rabbitmq-plugins set {{plugin}}` diff --git a/tldr/rabbitmq-queues b/tldr/rabbitmq-queues new file mode 100644 index 00000000..d7611c9b --- /dev/null +++ b/tldr/rabbitmq-queues @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rabbitmq-queues + +> Manage RabbitMQ queues. +> More information: . + +- Grow quorum queue clusters by adding a member on the specified node: + +`rabbitmq-queues grow {{node}} {{all|even}}` + +- Rebalance leaders of replicated queues across nodes: + +`rabbitmq-queues rebalance {{all|quorum|stream}}` + +- Shrink quorum queue clusters by removing any members on the specified node: + +`rabbitmq-queues shrink {{node}}` + +- Add a quorum queue member on the specified node: + +`rabbitmq-queues add_member {{queue}} {{node}}` + +- Delete a quorum queue member on the specified node: + +`rabbitmq-queues delete_member {{queue}} {{node}}` + +- Display quorum status of a quorum queue: + +`rabbitmq-queues quorum_status {{queue}}` diff --git a/tldr/rabbitmq-streams b/tldr/rabbitmq-streams new file mode 100644 index 00000000..c7d5cf60 --- /dev/null +++ b/tldr/rabbitmq-streams @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rabbitmq-streams + +> Manage RabbitMQ streams. +> More information: . + +- Add a stream replica on the specified node: + +`rabbitmq-streams add_replica {{stream}} {{node}}` + +- Delete a stream replica on the specified node: + +`rabbitmq-streams delete_replica {{stream}} {{node}}` + +- Display the status of a stream: + +`rabbitmq-streams stream_status {{stream}}` + +- Restart a stream: + +`rabbitmq-streams restart_stream {{stream}}` + +- List stream connections: + +`rabbitmq-streams list_stream_connections` + +- List all stream consumers: + +`rabbitmq-streams list_stream_consumers` + +- List all stream publishers: + +`rabbitmq-streams list_stream_publishers` + +- List tracking information for a stream: + +`rabbitmq-streams list_stream_tracking {{stream}}` diff --git a/tldr/windows/clear-history b/tldr/windows/clear-history new file mode 100644 index 00000000..ee662cad --- /dev/null +++ b/tldr/windows/clear-history @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# Clear-History + +> A powershell command to clear the entries in the current session. +> Note: `clhy` can be used as an alias for `Clear-History`. +> More information: . + +- Clear all command history from current session: + +`Clear-History` + +- Clear command by specific name: + +`Clear-History -CommandLine "{{command}}"` + +- Clear multiple commands by name: + +`Clear-History -CommandLine "{{command_1}}", "{{command_2}}"` + +- Clear a specific history entry by ID: + +`Clear-History -Id {{id_number}}` + +- Clear multiple IDs: + +`Clear-History -Id {{id_1}}, {{id_2}}, {{id_3}}` + +- Clear commands within a range of IDs: + +`Clear-History -Id ({{start_id}}..{{end_id}})` + +- Show what would be deleted: + +`Clear-History -WhatIf` + +- Ask for confirmation before clearing: + +`Clear-History -Confirm` diff --git a/tldr/windows/clhy b/tldr/windows/clhy new file mode 100644 index 00000000..1630effa --- /dev/null +++ b/tldr/windows/clhy @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# clhy + +> This command is an alias of `Clear-History`. + +- View documentation for the original command: + +`tldr Clear-History` diff --git a/tldr/windows/netsh b/tldr/windows/netsh new file mode 100644 index 00000000..bb265856 --- /dev/null +++ b/tldr/windows/netsh @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# netsh + +> Manage Windows network settings. +> Some subcommands such as `wlan` have their own usage documentation. +> More information: . + +- Add a helper Dynamic Link Library (DLL): + +`netsh add helper {{path o ile.dll}}` + +- Show all loaded helper DLLs: + +`netsh show helper` + +- Delete a helper DLL: + +`netsh delete helper {{path o ile.dll}}` + +- Export your network configuration settings to a file: + +`netsh dump > {{path o\output_file.txt}}` + +- Show available network interfaces for tracing: + +`netsh trace show interfaces` + +- Exit the shell: + +`exit` + +- Display help: + +`netsh help` diff --git a/tldr/windows/ren b/tldr/windows/ren new file mode 100644 index 00000000..005abfae --- /dev/null +++ b/tldr/windows/ren @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# ren + +> This command is an alias of `Rename-Item`. + +- View documentation for original command: + +`tldr Rename-Item` diff --git a/tldr/windows/rename-item b/tldr/windows/rename-item new file mode 100644 index 00000000..3ab4f15a --- /dev/null +++ b/tldr/windows/rename-item @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# Rename-Item + +> Powershell command to rename an item. +> Note: `ren` and `rni` can both be used as an alias for `Rename-Item`. +> More information: . + +- Rename a file: + +`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}"` + +- Rename a directory: + +`Rename-Item -Path "{{path/to/directory}}" -NewName "{{new_directory_name}}"` + +- Rename and move a file: + +`Rename-Item -Path "{{path/to/file}}" -NewName "{{path/to/new_file_name}}"` + +- Rename a file by force: + +`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" -Force` + +- Prompt confirmation before renaming a file: + +`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" {{[-Confirm|-cf]}}` diff --git a/tldr/windows/rni b/tldr/windows/rni new file mode 100644 index 00000000..0817fc25 --- /dev/null +++ b/tldr/windows/rni @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# rni + +> This command is an alias of `Rename-Item`. + +- View documentation for original command: + +`tldr Rename-Item`