From d2ae2c7f653f6ab389e20e9ec2d7b034b9f90ab6 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 10 Sep 2025 00:18:18 +0000 Subject: [PATCH] Update cheatsheets --- tldr/cmatrix | 6 +++++- tldr/devcontainer | 2 +- tldr/dropdb | 6 +++--- tldr/hugo | 2 +- tldr/initdb | 4 ++-- tldr/linux/eject | 2 +- tldr/linux/systemctl-freeze | 22 ++++++++++++++++++++++ tldr/linux/systemctl-suspend | 21 +++++++++++++++++++++ tldr/linux/systemctl-thaw | 22 ++++++++++++++++++++++ tldr/windows/choco | 6 +++--- tldr/windows/choco-apikey | 6 +++--- tldr/windows/choco-info | 6 +++--- tldr/windows/choco-list | 4 ++-- tldr/windows/choco-new | 2 +- tldr/windows/choco-pack | 2 +- tldr/windows/choco-pin | 6 +++--- tldr/windows/choco-push | 4 ++-- tldr/windows/choco-search | 8 ++++---- tldr/windows/choco-source | 6 +++--- 19 files changed, 103 insertions(+), 34 deletions(-) create mode 100644 tldr/linux/systemctl-freeze create mode 100644 tldr/linux/systemctl-suspend create mode 100644 tldr/linux/systemctl-thaw diff --git a/tldr/cmatrix b/tldr/cmatrix index 727784f3..6212a69c 100644 --- a/tldr/cmatrix +++ b/tldr/cmatrix @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # cmatrix > Shows a scrolling Matrix like screen in the terminal. -> More information: . +> More information: . - Enable [a]synchronous scrolling: @@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Use a screen [u]pdate delay of 100 centiseconds (1 second): `cmatrix -u 100` + +- Use [s]creensaver mode where the first keystroke exits: + +`cmatrix -s` diff --git a/tldr/devcontainer b/tldr/devcontainer index 46c112b2..8cd8f80e 100644 --- a/tldr/devcontainer +++ b/tldr/devcontainer @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Apply a Dev Container Template to a workspace: -`devcontainer templates apply --template-id {{template_id}} --template-args {{template_args}} --workspace-folder {{path/to/workspace}}` +`devcontainer templates apply {{[-t|--template-id]}} {{template_id}} {{[-a|--template-args]}} {{template_args}} {{[-w|--workspace-folder]}} {{path/to/workspace}}` - Execute a command on a running Dev Container in the current workspace: diff --git a/tldr/dropdb b/tldr/dropdb index 4631b04e..3f3fe94d 100644 --- a/tldr/dropdb +++ b/tldr/dropdb @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Destroy a database: -`dropdb {{dbname}}` +`dropdb {{database_name}}` - Request a verification prompt before any destructive actions: @@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git - Connect with a specific username and destroy a database: -`dropdb {{[-U|--username]}} {{username}} {{dbname}}` +`dropdb {{[-U|--username]}} {{username}} {{database_name}}` - Force a password prompt before connecting to the database: -`dropdb {{[-W|--password]}} {{dbname}}` +`dropdb {{[-W|--password]}} {{database_name}}` - Suppress a password prompt before connecting to the database: diff --git a/tldr/hugo b/tldr/hugo index 19833550..172d4fdf 100644 --- a/tldr/hugo +++ b/tldr/hugo @@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git - Build a site on your local IP: -`hugo server --bind {{local_ip}} --baseURL {{http://local_ip}}` +`hugo server --bind {{local_ip}} {{[-b|--baseURL]}} {{http://local_ip}}` - Build a site to a given directory: diff --git a/tldr/initdb b/tldr/initdb index 00223bb2..88720221 100644 --- a/tldr/initdb +++ b/tldr/initdb @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # initdb -> Create a PostgreSQL database on disk. +> Create a PostgreSQL database cluster on disk. > More information: . -- Create a database at `/usr/local/var/postgres`: +- Create a database cluster at `/usr/local/var/postgres`: `initdb {{[-D|--pgdata]}} /usr/local/var/postgres` diff --git a/tldr/linux/eject b/tldr/linux/eject index 58ae9d2b..01642a03 100644 --- a/tldr/linux/eject +++ b/tldr/linux/eject @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # eject -> Eject cds, floppy disks and tape drives. +> Eject CDs, floppy disks, tape drives, and USB sticks. > More information: . - Display the default device: diff --git a/tldr/linux/systemctl-freeze b/tldr/linux/systemctl-freeze new file mode 100644 index 00000000..43581522 --- /dev/null +++ b/tldr/linux/systemctl-freeze @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl freeze + +> Freeze one or more units. +> Frozen units can be resumed with `systemctl thaw`. +> More information: . + +- Freeze a specific unit: + +`systemctl freeze {{unit}}` + +- Freeze multiple units: + +`systemctl freeze {{unit1 unit2 ...}}` + +- Freeze all running units: + +`systemctl freeze '*'` diff --git a/tldr/linux/systemctl-suspend b/tldr/linux/systemctl-suspend new file mode 100644 index 00000000..cbaf4a53 --- /dev/null +++ b/tldr/linux/systemctl-suspend @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl suspend + +> Suspend the system. +> More information: . + +- Suspend the system immediately: + +`systemctl suspend` + +- Schedule a suspend after a 5 minute delay: + +`sleep 300 && systemctl suspend` + +- Suspend the system and then hibernate after a delay: + +`systemctl hybrid-sleep` diff --git a/tldr/linux/systemctl-thaw b/tldr/linux/systemctl-thaw new file mode 100644 index 00000000..33c554a5 --- /dev/null +++ b/tldr/linux/systemctl-thaw @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl thaw + +> Thaw (resume) one or more frozen units. +> Units can be frozen with `systemctl freeze`. +> More information: . + +- Thaw a specific unit: + +`systemctl thaw {{unit}}` + +- Thaw multiple units: + +`systemctl thaw {{unit1 unit2 ...}}` + +- Thaw all currently frozen units: + +`systemctl thaw '*'` diff --git a/tldr/windows/choco b/tldr/windows/choco index a38127d9..4f81aaaa 100644 --- a/tldr/windows/choco +++ b/tldr/windows/choco @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > The Chocolatey package manager. > Some subcommands such as `install` have their own usage documentation. -> More information: . +> More information: . - Execute a Chocolatey command: @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`choco -?` +`choco {{[-h|--help]}}` - Display help for a specific command: -`choco {{command}} -?` +`choco {{command}} {{[-h|--help]}}` - Display version: diff --git a/tldr/windows/choco-apikey b/tldr/windows/choco-apikey index d55f3618..5086c831 100644 --- a/tldr/windows/choco-apikey +++ b/tldr/windows/choco-apikey @@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git - Display a specific source and its API key: -`choco apikey --source "{{source_url}}"` +`choco apikey {{[-s|--source]}} "{{source_url}}"` - Set an API key for a source: -`choco apikey --source "{{source_url}}" --key "{{api_key}}"` +`choco apikey {{[-s|--source]}} "{{source_url}}" {{[-k|--api-key]}} "{{api_key}}"` - Remove an API key for a source: -`choco apikey --source "{{source_url}}" --remove` +`choco apikey {{[-s|--source]}} "{{source_url}}" --remove` diff --git a/tldr/windows/choco-info b/tldr/windows/choco-info index be5a150d..bde31158 100644 --- a/tldr/windows/choco-info +++ b/tldr/windows/choco-info @@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git - Display information for a local package only: -`choco info {{package}} --local-only` +`choco info {{package}} {{[-l|--local-only]}}` - Specify a custom source to receive packages information from: -`choco info {{package}} --source {{source_url|alias}}` +`choco info {{package}} {{[-s|--source]}} {{source_url|alias}}` - Provide a username and password for authentication: -`choco info {{package}} --user {{username}} --password {{password}}` +`choco info {{package}} {{[-u|--user]}} {{username}} {{[-p|--password]}} {{password}}` diff --git a/tldr/windows/choco-list b/tldr/windows/choco-list index 13d655b8..0ea8a47d 100644 --- a/tldr/windows/choco-list +++ b/tldr/windows/choco-list @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Display a list including local programs: -`choco list --include-programs` +`choco list {{[-i|--include-programs]}}` - Display only approved packages: @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify a custom source to display packages from: -`choco list --source {{source_url|alias}}` +`choco list {{[-s|--source]}} {{source_url|alias}}` - Provide a username and password for authentication: diff --git a/tldr/windows/choco-new b/tldr/windows/choco-new index f33afb84..29ffe79f 100644 --- a/tldr/windows/choco-new +++ b/tldr/windows/choco-new @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a new package in a custom output directory: -`choco new {{package}} --output-directory {{path/to/directory}}` +`choco new {{package}} {{[--out|--output-directory]}} {{path/to/directory}}` - Create a new package with specific 32-bit and 64-bit installer URLs: diff --git a/tldr/windows/choco-pack b/tldr/windows/choco-pack index 1823bd15..0664fa28 100644 --- a/tldr/windows/choco-pack +++ b/tldr/windows/choco-pack @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Package a NuGet specification to a specific directory: -`choco pack {{path o\specification_file}} --output-directory {{path o\output_directory}}` +`choco pack {{path o\specification_file}} {{[--out|--output-directory]}} {{path o\output_directory}}` diff --git a/tldr/windows/choco-pin b/tldr/windows/choco-pin index abd20a0a..a115c833 100644 --- a/tldr/windows/choco-pin +++ b/tldr/windows/choco-pin @@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git - Pin a package at its current version: -`choco pin add --name {{package}}` +`choco pin add {{[-n|--name]}} {{package}}` - Pin a package at a specific version: -`choco pin add --name {{package}} --version {{version}}` +`choco pin add {{[-n|--name]}} {{package}} --version {{version}}` - Remove a pin for a specific package: -`choco pin remove --name {{package}}` +`choco pin remove {{[-n|--name]}} {{package}}` diff --git a/tldr/windows/choco-push b/tldr/windows/choco-push index 46cf03b2..ca185754 100644 --- a/tldr/windows/choco-push +++ b/tldr/windows/choco-push @@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git - Push a compiled `nupkg` to the specified feed: -`choco push --source {{https://push.chocolatey.org/}}` +`choco push {{[-s|--source]}} {{https://push.chocolatey.org/}}` - Push a compiled `nupkg` to the specified feed with a timeout in seconds (default is 2700): -`choco push --source {{https://push.chocolatey.org/}} --execution-timeout {{500}}` +`choco push {{[-s|--source]}} {{https://push.chocolatey.org/}} {{[--timeout|--execution-timeout]}} {{500}}` diff --git a/tldr/windows/choco-search b/tldr/windows/choco-search index c17f0bf7..9adfe567 100644 --- a/tldr/windows/choco-search +++ b/tldr/windows/choco-search @@ -18,16 +18,16 @@ source: https://github.com/tldr-pages/tldr.git - Only include exact matches in the results: -`choco search {{query}} --exact` +`choco search {{query}} {{[-e|--exact]}}` - Confirm all prompts automatically: -`choco search {{query}} --yes` +`choco search {{query}} {{[-y|--yes]}}` - Specify a custom source to search for packages in: -`choco search {{query}} --source {{source_url|alias}}` +`choco search {{query}} {{[-s|--source]}} {{source_url|alias}}` - Provide a username and password for authentication: -`choco search {{query}} --user {{username}} --password {{password}}` +`choco search {{query}} {{[-u|--user]}} {{username}} {{[-p|--password]}} {{password}}` diff --git a/tldr/windows/choco-source b/tldr/windows/choco-source index 3f340a10..aaff050c 100644 --- a/tldr/windows/choco-source +++ b/tldr/windows/choco-source @@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git - Add a new package source: -`choco source add --name {{name}} --source {{url}}` +`choco source add {{[-n|--name]}} {{name}} {{[-s|--source]}} {{url}}` - Add a new package source with credentials: -`choco source add --name {{name}} --source {{url}} --user {{username}} --password {{password}}` +`choco source add {{[-n|--name]}} {{name}} {{[-s|--source]}} {{url}} {{[-u|--user]}} {{username}} {{[-p|--password]}} {{password}}` - Add a new package source with a client certificate: -`choco source add --name {{name}} --source {{url}} --cert {{path o \ No newline at end of file +`choco source add {{[-n|--name]}} {{name}} {{[-s|--source]}} {{url}} --cert {{path o \ No newline at end of file