From 1f13609819843a68c7e5ae9fd69c00b774ee07a6 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 27 Jul 2025 00:24:12 +0000 Subject: [PATCH] Update cheatsheets --- tldr/cargo-install | 4 ++++ tldr/exrex | 10 +++++----- tldr/file-rename | 12 ++++++++++++ tldr/linux/apt-install | 17 +++++++++++++++++ tldr/linux/dnf-install | 4 ++-- tldr/linux/free | 2 +- tldr/linux/qm-cloudinit | 2 +- tldr/linux/rename | 30 +++++------------------------- tldr/linux/rename.util | 35 +++++++++++++++++++++++++++++++++++ tldr/linux/sbctl | 2 +- tldr/manim | 37 +++++++++++++++++++++++++++++++++++++ tldr/perl-rename | 12 ++++++++++++ tldr/prename | 12 ++++++++++++ tldr/qwen | 38 ++++++++++++++++++++++++++++++++++++++ tldr/rename | 35 +++++++++++++++++++++++++++++++++++ 15 files changed, 217 insertions(+), 35 deletions(-) create mode 100644 tldr/file-rename create mode 100644 tldr/linux/apt-install create mode 100644 tldr/linux/rename.util create mode 100644 tldr/manim create mode 100644 tldr/perl-rename create mode 100644 tldr/prename create mode 100644 tldr/qwen create mode 100644 tldr/rename diff --git a/tldr/cargo-install b/tldr/cargo-install index 45476ff6..70d6fc31 100644 --- a/tldr/cargo-install +++ b/tldr/cargo-install @@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git `cargo install --git {{repo_url}} --{{branch|tag|rev}} {{branch_name|tag|commit_hash}}` +- Install a package from a local directory: + +`cargo install --path {{path/to/package}}` + - List all installed packages and their versions: `cargo install --list` diff --git a/tldr/exrex b/tldr/exrex index 871c35d8..8392bfab 100644 --- a/tldr/exrex +++ b/tldr/exrex @@ -15,23 +15,23 @@ source: https://github.com/tldr-pages/tldr.git - Generate a random string that matches a `regex`: -`exrex --random '{{regex}}'` +`exrex {{[-r|--random]}} '{{regex}}'` - Generate at most 100 strings that match a `regex`: -`exrex --max-number {{100}} '{{regex}}'` +`exrex {{[-m|--max-number]}} {{100}} '{{regex}}'` - Generate all possible strings that match a `regex`, joined by a custom delimiter string: -`exrex --delimiter "{{, }}" '{{regex}}'` +`exrex {{[-d|--delimiter]}} "{{, }}" '{{regex}}'` - Print count of all possible strings that match a `regex`: -`exrex --count '{{regex}}'` +`exrex {{[-c|--count]}} '{{regex}}'` - Simplify a `regex`: -`exrex --simplify '{{ab|ac}}'` +`exrex {{[-s|--simplify]}} '{{ab|ac}}'` - Print eyes: diff --git a/tldr/file-rename b/tldr/file-rename new file mode 100644 index 00000000..835f53c4 --- /dev/null +++ b/tldr/file-rename @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# file-rename + +> This command is an alias of `rename`. + +- View documentation for the original command: + +`tldr -p common rename` diff --git a/tldr/linux/apt-install b/tldr/linux/apt-install new file mode 100644 index 00000000..4c019548 --- /dev/null +++ b/tldr/linux/apt-install @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apt install + +> Install packages for Debian-based distributions. +> More information: . + +- Install a package, or update it to the latest version: + +`sudo apt install {{package}}` + +- Display verbose package version information during installation or update: + +`sudo apt install {{[-V|--verbose-versions]}} {{package}}` diff --git a/tldr/linux/dnf-install b/tldr/linux/dnf-install index a75e115c..d543ef54 100644 --- a/tldr/linux/dnf-install +++ b/tldr/linux/dnf-install @@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git - Add the Extra Packages for Enterprise Linux (EPEL) repositories: -`sudo dnf {{[in|install]}} https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm` +`sudo dnf {{[in|install]}} https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{10}}.noarch.rpm` - Add Remi's RPM repository: -`sudo dnf {{[in|install]}} https://rpms.remirepo.net/enterprise/remi-release-8.rpm` +`sudo dnf {{[in|install]}} https://rpms.remirepo.net/enterprise/remi-release-{{8}}.rpm` diff --git a/tldr/linux/free b/tldr/linux/free index 10f72c17..1a74cfe7 100644 --- a/tldr/linux/free +++ b/tldr/linux/free @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Refresh the output every 2 seconds: -`free {{[-s|--seconds]}} {{2}}` +`free {{[-s|--seconds]}} 2` diff --git a/tldr/linux/qm-cloudinit b/tldr/linux/qm-cloudinit index cb3657f3..9a76470b 100644 --- a/tldr/linux/qm-cloudinit +++ b/tldr/linux/qm-cloudinit @@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git `qm {{[clou|cloudinit]}} {{vm_id}} -ipconfig {{ipconfig}}` -- Configure a shell script to execute before `cloud-ini` is run on a virtual machine: +- Configure a shell script to execute before `cloudinit` is run on a virtual machine: `qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}` diff --git a/tldr/linux/rename b/tldr/linux/rename index d566e7a5..92603976 100644 --- a/tldr/linux/rename +++ b/tldr/linux/rename @@ -5,32 +5,12 @@ source: https://github.com/tldr-pages/tldr.git --- # rename -> Rename multiple files. -> Note: This page refers to the command from the `util-linux` package. -> For the Perl version, see `file-rename` or `perl-rename`. -> Warning: This command has no safeguards and will overwrite files without prompting. -> More information: . +> `rename` can refer to multiple commands with the same name. -- Rename files using simple substitutions (substitute 'foo' with 'bar' wherever found): +- View documentation for the Perl version: -`rename {{foo}} {{bar}} {{*}}` +`tldr -p common rename` -- Dry-run - display which renames would occur without performing them: +- View documentation for the `util-linux` version: -`rename {{[-vn|--verbose --no-act]}} {{foo}} {{bar}} {{*}}` - -- Do not overwrite existing files: - -`rename {{[-o|--no-overwrite]}} {{foo}} {{bar}} {{*}}` - -- Change file extensions: - -`rename {{.ext}} {{.bak}} {{*.ext}}` - -- Prepend "foo" to all filenames in the current directory: - -`rename {{''}} {{'foo'}} {{*}}` - -- Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits: - -`rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}` +`tldr rename.util` diff --git a/tldr/linux/rename.util b/tldr/linux/rename.util new file mode 100644 index 00000000..d814d73b --- /dev/null +++ b/tldr/linux/rename.util @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# rename + +> Rename multiple files. +> WARNING: This command will overwrite files without prompting unless the dry-run option is used. +> Note: This page refers to the command from the `util-linux` package. +> More information: . + +- Rename files using simple substitutions (substitute 'foo' with 'bar' wherever found): + +`rename {{foo}} {{bar}} {{*}}` + +- Dry-run - display which renames would occur without performing them: + +`rename {{[-vn|--verbose --no-act]}} {{foo}} {{bar}} {{*}}` + +- Do not overwrite existing files: + +`rename {{[-o|--no-overwrite]}} {{foo}} {{bar}} {{*}}` + +- Change file extensions: + +`rename {{.ext}} {{.bak}} {{*.ext}}` + +- Prepend "foo" to all filenames in the current directory: + +`rename {{''}} {{'foo'}} {{*}}` + +- Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits: + +`rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}` diff --git a/tldr/linux/sbctl b/tldr/linux/sbctl index 0bb44a1d..7bf5c559 100644 --- a/tldr/linux/sbctl +++ b/tldr/linux/sbctl @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Enroll the custom secure boot keys and Microsoft's UEFI vendor certificates: -`sbctl enroll-keys --microsoft` +`sbctl enroll-keys {{[-m|--microsoft]}}` - Automatically run `create-keys` and `enroll-keys` based on the settings in `/etc/sbctl/sbctl.conf`: diff --git a/tldr/manim b/tldr/manim new file mode 100644 index 00000000..1ffb4576 --- /dev/null +++ b/tldr/manim @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# manim + +> Animation engine for explanatory math videos. +> More information: . + +- Render a scene from a Python script using the default settings: + +`manim {{path/to/file.py}} {{SceneName}}` + +- Render with live preview (auto-opens the video file after rendering): + +`manim {{[-pql|--preview --quality low]}} {{path/to/file.py}} {{SceneName}}` + +- Render at high quality (1080p 60fps): + +`manim {{[-pqh|--preview --quality high]}} {{path/to/file.py}} {{SceneName}}` + +- Specify a custom output file name: + +`manim {{[-o|--output_file]}} {{output_file_name}} {{path/to/file.py}} {{SceneName}}` + +- Render using a specific resolution and frame rate: + +`manim {{[-r|--resolution]}} {{1920,1080}} {{[-f|--fps]}} {{60}} {{path/to/file.py}} {{SceneName}}` + +- List available scenes in a file without rendering: + +`manim --list_scenes {{path/to/file.py}}` + +- Display help: + +`manim --help` diff --git a/tldr/perl-rename b/tldr/perl-rename new file mode 100644 index 00000000..bd09f6ad --- /dev/null +++ b/tldr/perl-rename @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# perl-rename + +> This command is an alias of `rename`. + +- View documentation for the original command: + +`tldr -p common rename` diff --git a/tldr/prename b/tldr/prename new file mode 100644 index 00000000..c147b3d3 --- /dev/null +++ b/tldr/prename @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# prename + +> This command is an alias of `rename`. + +- View documentation for the original command: + +`tldr -p common rename` diff --git a/tldr/qwen b/tldr/qwen new file mode 100644 index 00000000..37268d42 --- /dev/null +++ b/tldr/qwen @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# qwen + +> Launch an interactive prompt with Qwen3-Coder. +> See also: `gemini`. +> More information: . + +- Start a REPL session to chat interactively: + +`qwen` + +- Send the output of another command to Qwen and exit immediately: + +`{{echo "Summarize the history of Rome"}} | qwen {{[-p|--prompt]}}` + +- Override the default model (default: qwen3-coder-max): + +`qwen {{[-m|--model]}} {{model_name}}` + +- Run inside a sandbox container: + +`qwen {{[-s|--sandbox]}}` + +- Execute a prompt then stay in interactive mode: + +`qwen {{[-i|--prompt-interactive]}} "{{Give me an example of recursion in Python}}"` + +- Include all files in context: + +`qwen {{[-a|--all-files]}}` + +- Show memory usage in status bar: + +`qwen --show-memory-usage` diff --git a/tldr/rename b/tldr/rename new file mode 100644 index 00000000..b818c076 --- /dev/null +++ b/tldr/rename @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# rename + +> Rename a file or group of files with a regular expression. +> WARNING: This command will overwrite files without prompting unless the dry-run option is used. +> Note: This page refers to the Perl version, also known as `file-rename`. +> More information: . + +- Replace `from` with `to` in the filenames of the specified files: + +`rename 's/{{from}}/{{to}}/' {{*.txt}}` + +- Dry-run - display which changes would occur without performing them: + +`rename -n 's/{{from}}/{{to}}/' {{*.txt}}` + +- Change the extension: + +`rename 's/\.old$/\.new/' {{*.txt}}` + +- Change to lowercase (use `-f` in case-insensitive filesystems): + +`rename {{[-f|--force]}} 'y/A-Z/a-z/' {{*.txt}}` + +- Capitalize first letter of every word in the name: + +`rename {{[-f|--force]}} 's/(\w)/\U$1/g' {{*.txt}}` + +- Replace spaces with underscores: + +`rename 's/\s+/_/g' {{*.txt}}`