From adc1cd4dedb30c170a3e16e61190cb31518f16af Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 25 May 2025 00:22:11 +0000 Subject: [PATCH] Update cheatsheets --- tldr/atool | 42 +++++++++++++++++++++++++ tldr/linux/steamos-factory-reset | 17 ++++++++++ tldr/linux/steamos-factory-reset-config | 14 +++++++++ tldr/micromamba | 42 +++++++++++++++++++++++++ tldr/reuse | 8 +++++ 5 files changed, 123 insertions(+) create mode 100644 tldr/atool create mode 100644 tldr/linux/steamos-factory-reset create mode 100644 tldr/linux/steamos-factory-reset-config create mode 100644 tldr/micromamba diff --git a/tldr/atool b/tldr/atool new file mode 100644 index 00000000..2c3c4093 --- /dev/null +++ b/tldr/atool @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# atool + +> A script for managing file archives of various types. +> `atool` uses external archiver programs but provides a consistent command-line interface for listing, extracting, creating, and managing archives. +> More information: . + +- List files in an archive: + +`atool {{[-l|--list]}} {{path/to/archive.zip}}` + +- Extract an archive (safely creates a subdirectory if needed): + +`atool {{[-x|--extract]}} {{archive.tar.gz}}` + +- Extract an archive to a specific directory: + +`atool {{[-X|--extract-to]}} {{path/to/output_directory}} {{archive.rar}}` + +- Display a specific file's content from an archive to standard output (like `cat`): + +`atool {{[-c|--cat]}} {{archive.tar}} {{path/to/file_in_archive.txt}}` + +- Create a new archive from specified files and/or directories: + +`atool {{[-a|--add]}} {{new_archive.zip}} {{path/to/file1 path/to/file2 ...}}` + +- List files in an archive and send the output through a pager: + +`atool {{[-l|--list]}} {{[-p|--pager]}} {{large_archive.tar.bz2}}` + +- Extract multiple archives at once (each to its own subdirectory if needed): + +`atool {{[-x|--extract]}} {{[-e|--each]}} {{archive1.zip}} {{archive2.tar.gz}} {{*.rar}}` + +- Repack an archive from one format to another (e.g., .tar.gz to .tar.7z): + +`atool {{[-r|--repack]}} {{old_archive.tar.gz}} {{new_archive.tar.7z}}` diff --git a/tldr/linux/steamos-factory-reset b/tldr/linux/steamos-factory-reset new file mode 100644 index 00000000..c6a6c716 --- /dev/null +++ b/tldr/linux/steamos-factory-reset @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-factory-reset + +> Reset SteamOS to factory settings. +> More information: . + +- Begin a factory reset (requires confirmation): + +`steamos-factory-reset` + +- Display help: + +`steamos-factory-reset --help` diff --git a/tldr/linux/steamos-factory-reset-config b/tldr/linux/steamos-factory-reset-config new file mode 100644 index 00000000..86acd171 --- /dev/null +++ b/tldr/linux/steamos-factory-reset-config @@ -0,0 +1,14 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-factory-reset-config + +> Generates configuration files required by `steamos-factory-reset`. +> This command is typically called internally and not meant to be run manually. +> More information: . + +- Generate factory reset configuration data: + +`steamos-factory-reset-config` diff --git a/tldr/micromamba b/tldr/micromamba new file mode 100644 index 00000000..f91a7be6 --- /dev/null +++ b/tldr/micromamba @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# micromamba + +> A fast, minimal, standalone package and environment manager for `conda` packages. +> Drop-in replacement for `conda`, ideal for CI, Docker, and lightweight setups. +> More information: . + +- Create a new environment at a specific path, installing named packages into it: + +`micromamba create {{[-p|--prefix]}} {{/path/to/env}} {{python=3.11 numpy}}` + +- Activate an environment by name or path: + +`micromamba activate {{[-p|--prefix]}} {{/path/to/env}}` + +- Run a command inside an environment without activating it in the shell: + +`micromamba run {{[-p|--prefix]}} {{/path/to/env}} {{pytest tests/}}` + +- Install packages into the currently active environment: + +`micromamba install {{scipy pandas}}` + +- List all installed packages in the current environment: + +`micromamba list` + +- Search for packages in channels or current environment: + +`micromamba search {{package_name}}` + +- Query tree-like dependencies of a package: + +`micromamba repoquery depends {{[-t|--tree]}} {{package_name}}` + +- Show information about the current `micromamba` setup: + +`micromamba info` diff --git a/tldr/reuse b/tldr/reuse index 2bf3dd7d..6c73dc33 100644 --- a/tldr/reuse +++ b/tldr/reuse @@ -16,6 +16,14 @@ source: https://github.com/tldr-pages/tldr.git `reuse --root {{path/to/directory}} lint` +- Add copyright statement to file: + +`reuse annotate {{[-c|--copyright]}} "{{your_name}} <{{your_email}}>" --fallback-dot-license {{path/to/file}}` + +- Add licence information to file: + +`reuse annotate {{[-l|--license]}} {{spdx_identifier}} --fallback-dot-license {{path/to/file}}` + - Download a license by its SPDX identifier and place it in the LICENSES directory: `reuse download {{spdx-identifier}}`