From 9e6dfc9983083979e961a69e0b9ac0cbcd391532 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 12 Oct 2024 00:16:39 +0000 Subject: [PATCH] Update cheatsheets --- tldr/aws-sso | 29 ++++++++++++++++++++ tldr/linux/abrt-action-analyze-backtrace | 23 ++++++++++++++++ tldr/linux/abrt-action-analyze-c | 21 ++++++++++++++ tldr/linux/bleachbit | 29 ++++++++++++++++++++ tldr/linux/diffimg | 14 ++++++++++ tldr/linux/gummy | 2 +- tldr/linux/lddd | 2 +- tldr/linux/pacman | 2 +- tldr/linux/pdfattach | 26 ++++++++++++++++++ tldr/linux/pdfdetach | 30 ++++++++++++++++++++ tldr/linux/pkgfile | 2 +- tldr/linux/unopkg | 35 ++++++++++++++++++++++++ tldr/linux/waydroid | 2 +- tldr/nice | 2 +- tldr/onionsearch | 30 ++++++++++++++++++++ tldr/redis-benchmark | 2 +- tldr/ssh | 4 +-- tldr/starship | 2 +- tldr/time | 4 +++ tldr/windows/bleachbit | 12 ++++++++ tldr/windows/bleachbit_console | 28 +++++++++---------- 21 files changed, 277 insertions(+), 24 deletions(-) create mode 100644 tldr/aws-sso create mode 100644 tldr/linux/abrt-action-analyze-backtrace create mode 100644 tldr/linux/abrt-action-analyze-c create mode 100644 tldr/linux/bleachbit create mode 100644 tldr/linux/diffimg create mode 100644 tldr/linux/pdfattach create mode 100644 tldr/linux/pdfdetach create mode 100644 tldr/linux/unopkg create mode 100644 tldr/onionsearch create mode 100644 tldr/windows/bleachbit diff --git a/tldr/aws-sso b/tldr/aws-sso new file mode 100644 index 00000000..638029d9 --- /dev/null +++ b/tldr/aws-sso @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# aws sso + +> Manage access to AWS resources using Single Sign-On (SSO) credentials. +> More information: . + +- Start SSO session and refresh access tokens. Requires setup using `aws configure sso`: + +`aws sso login` + +- End SSO session and clear cached access tokens: + +`aws sso logout` + +- List all AWS accounts accessible to the user: + +`aws sso list-accounts` + +- List all roles accessible to the user for a given AWS account: + +`aws sso list-account-roles --account-id {{account}} --access-token {{token}}` + +- Retrieve short-term credentials for a specific account: + +`aws get-role-credentials --account-id {{account}} --role-name {{role}} --access-token {{token}}` diff --git a/tldr/linux/abrt-action-analyze-backtrace b/tldr/linux/abrt-action-analyze-backtrace new file mode 100644 index 00000000..be4f5b7d --- /dev/null +++ b/tldr/linux/abrt-action-analyze-backtrace @@ -0,0 +1,23 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# abrt-action-analyze-backtrace + +> Analyze C/C++ backtrace. +> Generate duplication hash, backtrace rating, and identify crash function. +> Save the data as new elements `duphash`, `rating`, `crash_function` in the problem directory. +> More information: . + +- Analyze backtrace for the current working directory: + +`abrt-action-analyze-backtrace` + +- Analyze backtrace for a specific directory: + +`abrt-action-analyze-backtrace -d {{path/to/directory}}` + +- Analyze backtrace verbosely: + +`abrt-action-analyze-backtrace -v` diff --git a/tldr/linux/abrt-action-analyze-c b/tldr/linux/abrt-action-analyze-c new file mode 100644 index 00000000..5a4e7bb6 --- /dev/null +++ b/tldr/linux/abrt-action-analyze-c @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# abrt-action-analyze-c + +> Calculate UUID for a problem data directory with `coredump`. +> More information: . + +- Calculate and save the UUID for the current working directory: + +`abrt-action-analyze-c` + +- Calculate and save the UUID for a specific directory: + +`abrt-action-analyze-c -d {{path/to/directory}}` + +- Calculate and save the UUID verbosely: + +`abrt-action-analyze-c -v` diff --git a/tldr/linux/bleachbit b/tldr/linux/bleachbit new file mode 100644 index 00000000..5c537d15 --- /dev/null +++ b/tldr/linux/bleachbit @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# bleachbit + +> Clean junk files on the filesystem. +> More information: . + +- Start the graphical user interface (GUI) version of Bleachbit: + +`bleachbit --gui` + +- Shred a file: + +`bleachbit --shred {{path/to/file}}` + +- List available cleaner options: + +`bleachbit --list-cleaners` + +- Preview the files that will be deleted and other changes that will be made before actually performing the clean-up operation: + +`bleachbit --preview {{--preset|cleaner1.option1 cleaner2.* ...}}` + +- Perform the clean-up operation and delete files: + +`bleachbit --clean {{--preset|cleaner1.option1 cleaner2.* ...}}` diff --git a/tldr/linux/diffimg b/tldr/linux/diffimg new file mode 100644 index 00000000..fddfe6d3 --- /dev/null +++ b/tldr/linux/diffimg @@ -0,0 +1,14 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# diffimg + +> Calculate intersection between two images. +> Note: the supported extensions are `.png`, `.gif`, `.jpg`, `.ps`. +> More information: . + +- Calculate the intersection between images and output an image where each pixel is the difference between corresponding pixels in input images: + +`diffimg {{path/to/input_image1.ext}} {{path/to/input_image2.ext}} {{path/to/output_image.ext}}` diff --git a/tldr/linux/gummy b/tldr/linux/gummy index 4d7a48e4..dc763d54 100644 --- a/tldr/linux/gummy +++ b/tldr/linux/gummy @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # gummy > Screen brightness/temperature manager for Linux/X11. -> More information: . +> More information: . - Set the screen temperature to 3000K: diff --git a/tldr/linux/lddd b/tldr/linux/lddd index eac35dd3..9ed50bf0 100644 --- a/tldr/linux/lddd +++ b/tldr/linux/lddd @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Find broken library links on the system. > This tool is only available on Arch Linux. -> More information: . +> More information: . - Scan directories to find and list packages with broken library links that need to be rebuilt: diff --git a/tldr/linux/pacman b/tldr/linux/pacman index 5e04fa30..f282fff4 100644 --- a/tldr/linux/pacman +++ b/tldr/linux/pacman @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pacman > Arch Linux package manager utility. -> See also: `pacman-database`, `pacman-deptest`, `pacman-files`, `pacman-key`, `pacman-mirrors`, `pacman-query`, `pacman-remove`, `pacman-sync`, `pacman-upgrade`. +> See also: `pacman-sync`, `pacman-remove`, `pacman-query`, `pacman-upgrade`, `pacman-files`, `pacman-database`, `pacman-deptest`, `pacman-key`, `pacman-mirrors`. > For equivalent commands in other package managers, see . > More information: . diff --git a/tldr/linux/pdfattach b/tldr/linux/pdfattach new file mode 100644 index 00000000..fbfce2e7 --- /dev/null +++ b/tldr/linux/pdfattach @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pdfattach + +> Add a new attachment (embedded file) to an existing PDF file. +> See also: `pdfdetach`, `pdfimages`, `pdfinfo`. +> More information: . + +- Add a new attachment to an existing PDF file: + +`pdfattach {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}` + +- Replace attachment with same name if it exists: + +`pdfattach -replace {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}` + +- Display help: + +`pdfattach -h` + +- Display version: + +`pdfattach -v` diff --git a/tldr/linux/pdfdetach b/tldr/linux/pdfdetach new file mode 100644 index 00000000..6c62694f --- /dev/null +++ b/tldr/linux/pdfdetach @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pdfdetach + +> List or extract attachments (embedded files) from a PDF file. +> See also: `pdfattach`, `pdfimages`, `pdfinfo`. +> More information: . + +- List all attachments in a file with a specific text encoding: + +`pdfdetach list -enc {{UTF-8}} {{path/to/input.pdf}}` + +- Save specific embedded file by specifying its number: + +`pdfdetach -save {{number}} {{path/to/input.pdf}}` + +- Save specific embedded file by specifying its name: + +`pdfdetach -savefile {{name}} {{path/to/input.pdf}}` + +- Save the embedded file with a custom output filename: + +`pdfdetach -save {{number}} -o {{path/to/output}} {{path/to/input.pdf}}` + +- Save the attachment from a file secured by owner/user password: + +`pdfdetach -save {{number}} {{-opw|-upw}} {{password}} {{path/to/input.pdf}}` diff --git a/tldr/linux/pkgfile b/tldr/linux/pkgfile index 83ef781f..b5bf4846 100644 --- a/tldr/linux/pkgfile +++ b/tldr/linux/pkgfile @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Search files from packages in the official repositories on Arch-based systems. > See also: `pacman files`, describing the usage of `pacman --files`. -> More information: . +> More information: . - Synchronize the pkgfile database: diff --git a/tldr/linux/unopkg b/tldr/linux/unopkg new file mode 100644 index 00000000..2a6668f4 --- /dev/null +++ b/tldr/linux/unopkg @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# unopkg + +> LibreOffice extensions manager. +> Download extensions from . +> See also: `libreoffice`. +> More information: . + +- Add and deploy given extension: + +`unopkg add {{path/to/extension}}` + +- Remove extension: + +`unopkg remove {{extensions_id}}` + +- Display information about deployed extensions: + +`unopkg list` + +- Raise extensions dialog (GUI): + +`unopkg gui` + +- Reinstall all deployed extensions: + +`unopkg reinstall` + +- Display help: + +`unopkg {{-h|--help}}` diff --git a/tldr/linux/waydroid b/tldr/linux/waydroid index 2c4c2afb..5d0e7186 100644 --- a/tldr/linux/waydroid +++ b/tldr/linux/waydroid @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Initialize Waydroid (required on first run or after reinstalling Android): -`waydroid init` +`sudo waydroid init` - Install a new Android app from a file: diff --git a/tldr/nice b/tldr/nice index 2fcb6ea9..1b42b534 100644 --- a/tldr/nice +++ b/tldr/nice @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Launch a program with altered priority: -`nice -{{niceness_value}} {{command}}` +`nice -{{niceness_value}} {{command}}` - Define the priority with an explicit option: diff --git a/tldr/onionsearch b/tldr/onionsearch new file mode 100644 index 00000000..c16fbf67 --- /dev/null +++ b/tldr/onionsearch @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# onionsearch + +> Scrape URLs on different `.onion` search engines. +> Note: `onionsearch` requires a Tor proxy running on `localhost:9050`; a Tor enabled browser is needed to visit the `.onion` websites. +> More information: . + +- Request results from all the search engines: + +`onionsearch "{{string}}"` + +- Request search results from specific search engines: + +`onionsearch "{{string}}" --engines {{tor66 deeplink phobos ...}}` + +- Exclude certain search engines when searching: + +`onionsearch "{{string}}" --exclude {{candle ahmia ...}}` + +- Limit the number of pages to load per engine: + +`onionsearch "{{stuxnet}}" --engines {{tor66 deeplink phobos ...}} --limit {{3}}` + +- List all supported search engines: + +`onionsearch --help | grep -A1 -i "supported engines"` diff --git a/tldr/redis-benchmark b/tldr/redis-benchmark index afa24b1c..3f8d1b34 100644 --- a/tldr/redis-benchmark +++ b/tldr/redis-benchmark @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # redis-benchmark > Benchmark a Redis server. -> More information: . +> More information: . - Run full benchmark: diff --git a/tldr/ssh b/tldr/ssh index 10cbb733..4151adf0 100644 --- a/tldr/ssh +++ b/tldr/ssh @@ -37,6 +37,6 @@ source: https://github.com/tldr-pages/tldr.git `ssh -J {{username}}@{{jump_host}} {{username}}@{{remote_host}}` -- Agent forwarding: Forward the authentication information to the remote machine (see `man ssh_config` for available options): +- Close a hanged session: -`ssh -A {{username}}@{{remote_host}}` +` ~ .` diff --git a/tldr/starship b/tldr/starship index 5f7db6d6..b3967d7e 100644 --- a/tldr/starship +++ b/tldr/starship @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Print the starship integration code for the specified shell: -`starship init {{bash|elvish|fish|ion|powershell|tcsh|zsh}}` +`starship init {{bash|elvish|fish|ion|powershell|tcsh|zsh|nu|xonsh|cmd}}` - Explain each part of the current prompt and show the time taken to render them: diff --git a/tldr/time b/tldr/time index 6ff1b936..3cfd3abd 100644 --- a/tldr/time +++ b/tldr/time @@ -12,3 +12,7 @@ source: https://github.com/tldr-pages/tldr.git - Run the `command` and print the time measurements to `stdout`: `time {{command}}` + +- Create a very simple stopwatch (only works in bash): + +`time read` diff --git a/tldr/windows/bleachbit b/tldr/windows/bleachbit new file mode 100644 index 00000000..92789afc --- /dev/null +++ b/tldr/windows/bleachbit @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# bleachbit + +> This command is an alias of `bleachbit_console`. + +- View documentation for the original command: + +`tldr bleachbit_console` diff --git a/tldr/windows/bleachbit_console b/tldr/windows/bleachbit_console index 87f66297..92368055 100644 --- a/tldr/windows/bleachbit_console +++ b/tldr/windows/bleachbit_console @@ -8,22 +8,22 @@ source: https://github.com/tldr-pages/tldr.git > Clean junk files on the filesystem. > More information: . -- Perform the clean-up operation and delete files: - -`bleachbit_console.exe --clean` - -- Preview the files that will be deleted and other changes that will be made before actually performing the clean-up operation: - -`bleachbit_console.exe --preview` - -- Display system information: - -`bleachbit_console.exe --sysinfo` - - Start the graphical user interface (GUI) version of Bleachbit: `bleachbit_console.exe --gui` -- Display version: +- Shred a file: -`bleachbit_console.exe --version` +`bleachbit_console.exe --shred {{path/to/file}}` + +- List available cleaner options: + +`bleachbit_console.exe --list-cleaners` + +- Preview the files that will be deleted and other changes that will be made before actually performing the clean-up operation: + +`bleachbit_console.exe --preview {{--preset|cleaner1.option1 cleaner2.* ...}}` + +- Perform the clean-up operation and delete files: + +`bleachbit_console.exe --clean {{--preset|cleaner1.option1 cleaner2.* ...}}`