From 8b085234e1ce8a7e98ddd912fa419f66ac92bef2 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 12 Nov 2025 00:20:22 +0000 Subject: [PATCH] Update cheatsheets --- tldr/az-cognitiveservices | 30 ++++++++++++++++++ tldr/chdman | 38 +++++++++++++++++++++++ tldr/linux/col | 33 ++++++++++++++++++++ tldr/linux/gdisk | 42 ++++++++++++++++++++++++++ tldr/linux/lstopo-no-graphics | 25 +++++++++++++++ tldr/linux/systemctl-reload-or-restart | 25 +++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 tldr/az-cognitiveservices create mode 100644 tldr/chdman create mode 100644 tldr/linux/col create mode 100644 tldr/linux/gdisk create mode 100644 tldr/linux/lstopo-no-graphics create mode 100644 tldr/linux/systemctl-reload-or-restart diff --git a/tldr/az-cognitiveservices b/tldr/az-cognitiveservices new file mode 100644 index 00000000..dd36ede5 --- /dev/null +++ b/tldr/az-cognitiveservices @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# az cognitiveservices + +> Manage Azure Cognitive Services accounts. +> Part of `azure-cli` (also known as `az`). +> More information: . + +- Create an API Cognitive Services account in a specific location without confirmation required: + +`az cognitiveservices account create {{[-n|--name]}} {{account_name}} {{[-g|--resource-group]}} {{resource_group}} --kind {{API_name}} {{[-l|--location]}} {{location}} --sku {{sku_name}} --yes` + +- List usages for Azure Cognitive Services account: + +`az cognitiveservices account list-usage {{[-n|--name]}} {{account_name}} {{[-g|--resource-group]}} {{resource_group}}` + +- Create a deployment for Azure Cognitive Services account: + +`az cognitiveservices account deployment create {{[-n|--name]}} {{account_name}} {{[-g|--resource-group]}} {{resource_group}} --deployment-name {{deploy_name}} --model-name {{model_name}} --model-version "{{model_version}}" --model-format {{format_name}}` + +- Create a commitment plan for Azure Cognitive Services account: + +`az cognitiveservices account commitment-plan create {{[-n|--name]}} {{account_name}} {{[-g|--resource-group]}} {{resource_group}} --commitment-plan-name "{{plan_name}}" --hosting-model "{{hosting_model}}" --plan-type "{{plan_type}}" --auto-renew {{false|true}}` + +- Delete a commitment plan from Azure Cognitive Services account: + +`az cognitiveservices account commitment-plan delete {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{account_name}} --commitment-plan-name "{{plan_name}}"` diff --git a/tldr/chdman b/tldr/chdman new file mode 100644 index 00000000..83f97a29 --- /dev/null +++ b/tldr/chdman @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# chdman + +> Manage and convert CHD (Compressed Hunks of Data) images. +> Commonly used with MAME and retro game images. +> More information: . + +- Create a CHD from a BIN/CUE pair (CD-ROM image): + +`chdman createcd {{[-i|--input]}} {{path/to/file.cue}} {{[-o|--output]}} {{path/to/file.chd}}` + +- Create a CHD from a raw hard drive image: + +`chdman createhd {{[-i|--input]}} {{path/to/disk.img}} {{[-o|--output]}} {{path/to/disk.chd}}` + +- Extract (decompress) a CHD back to BIN/CUE: + +`chdman extractcd {{[-i|--input]}} {{path/to/file.chd}} {{[-o|--output]}} {{path/to/file.cue}}` + +- Verify integrity of CHD file: + +`chdman verify {{[-i|--input]}} {{path/to/file.chd}}` + +- View CHD metadata information: + +`chdman info {{[-i|--input]}} {{path/to/file.chd}}` + +- Update a CHD file to the latest format version: + +`chdman copy {{[-i|--input]}} {{path/to/old_file.chd}} {{[-o|--output]}} {{path/to/new_file.chd}}` + +- Convert a compressed hard drive image to uncompressed (for editing): + +`chdman extracthd {{[-i|--input]}} {{path/to/disk.chd}} {{[-o|--output]}} {{path/to/disk.img}}` diff --git a/tldr/linux/col b/tldr/linux/col new file mode 100644 index 00000000..42b127b3 --- /dev/null +++ b/tldr/linux/col @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# col + +> Filter reverse line feeds from input. +> More information: . + +- Filter reverse line feeds from input: + +`{{command}} | col` + +- Filter reverse line feeds and output with spaces instead of tabs: + +`{{command}} | col {{[-x|--spaces]}}` + +- Remove backspaces, output only the last character written to each position: + +`{{command}} | col {{[-b|--no-backspaces]}}` + +- Specify a buffer size with a specific number of lines: + +`{{command}} | col {{[-l|--lines]}} {{num}}` + +- Format a manual page for viewing with `less`: + +`man ls | col {{[-b|--no-backspaces]}} | less` + +- Process a file with reverse line feeds and save the cleaned output: + +`cat {{path/to/input_file}} | col {{[-x|--spaces]}} > {{output_file}}` diff --git a/tldr/linux/gdisk b/tldr/linux/gdisk new file mode 100644 index 00000000..1d5821db --- /dev/null +++ b/tldr/linux/gdisk @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# gdisk + +> GPT (GUID Partition Table) disk partitioning tool. +> See also: `cfdisk`, `fdisk`, `parted`. +> More information: . + +- List partitions: + +`sudo gdisk {{[-l|--list]}}` + +- Start the interactive partition manipulator: + +`sudo gdisk {{/dev/sdX}}` + +- Open a help menu: + +`` + +- Print the [p]artition table: + +`

` + +- Add a [n]ew partition: + +`` + +- Select a partition to [d]elete: + +`` + +- [w]rite table to disk and exit: + +`` + +- [q]uit without saving changes: + +`` diff --git a/tldr/linux/lstopo-no-graphics b/tldr/linux/lstopo-no-graphics new file mode 100644 index 00000000..8dfe11f2 --- /dev/null +++ b/tldr/linux/lstopo-no-graphics @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lstopo-no-graphics + +> Manage and query hardware topology information. +> More information: . + +- Display the machine topology in a tree format: + +`lstopo-no-graphics` + +- Display only physical cores (ignore logical processors): + +`lstopo-no-graphics --only pu` + +- Display the topology with physical indexes: + +`lstopo-no-graphics {{[-p|--physical]}}` + +- Display help: + +`lstopo-no-graphics {{[-h|--help]}}` diff --git a/tldr/linux/systemctl-reload-or-restart b/tldr/linux/systemctl-reload-or-restart new file mode 100644 index 00000000..3f908a7a --- /dev/null +++ b/tldr/linux/systemctl-reload-or-restart @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl reload-or-restart + +> Reload `systemd` unit(s) otherwise restart them. +> More information: . + +- Reload or restart a unit: + +`systemctl reload-or-restart {{unit}}` + +- Reload or restart multiple units matching a pattern: + +`systemctl reload-or-restart {{pattern}}` + +- Run the command without waiting for the operation to complete: + +`systemctl reload-or-restart {{unit}} --no-block` + +- Apply the command only to user units: + +`systemctl reload-or-restart {{unit}} --user`