Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-30 00:20:37 +00:00
parent 44de08faea
commit a2961fe873
59 changed files with 463 additions and 80 deletions

2
tldr/!
View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# !
> Reuse and expand the shell history in `sh`, Bash, Zsh, `rbash` and `ksh`.
> Reuse and expand the shell history in `sh`, Bash, Zsh, `rbash`, and `ksh`.
> More information: <https://gnu.org/software/bash/manual/bash.html#Event-Designators>.
- Substitute with the previous command and run it with `sudo`:

View File

@@ -6,31 +6,32 @@ source: https://github.com/tldr-pages/tldr.git
# ani-cli
> A cli to browse and watch anime.
> See also: `animdl`.
> More information: <https://manned.org/ani-cli>.
- Search anime by name:
`ani-cli "{{anime_name}}"`
`ani-cli "{{anime_title}}"`
- Download an episode:
`ani-cli {{[-d|--download]}} "{{anime_name}}"`
`ani-cli {{[-d|--download]}} "{{anime_title}}"`
- Download a range of episodes:
`ani-cli {{[-d|--download]}} {{[-r|--range]}} "{{1 6}}" "{{anime_name}}"`
`ani-cli {{[-d|--download]}} {{[-r|--range]}} "{{1 6}}" "{{anime_title}}"`
- Download the entire series (a range of all episodes):
`ani-cli {{[-d|--download]}} {{[-r|--range]}} "1 -1" "{{anime_name}}"`
`ani-cli {{[-d|--download]}} {{[-r|--range]}} "1 -1" "{{anime_title}}"`
- Use VLC as the media player:
`ani-cli {{[-v|-vlc]}} "{{anime_name}}"`
`ani-cli {{[-v|-vlc]}} "{{anime_title}}"`
- Watch a specific episode:
`ani-cli {{[-e|--episode]}} {{episode_number}} "{{anime_name}}"`
`ani-cli {{[-e|--episode]}} {{episode_number}} "{{anime_title}}"`
- Continue watching anime from history:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# animdl
> A highly efficient, powerful and fast anime scraper.
> A highly efficient, powerful, and fast anime scraper.
> See also: `ani-cli`.
> More information: <https://github.com/justfoolingaround/animdl>.

View File

@@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git
- Recursively search files in a bzip2 compressed tar archive for a pattern:
`bzgrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/tar/file}}`
`bzgrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/tar_file}}`
- Search `stdin` for lines that do not match a pattern:
`cat {{path/to/bz/compressed/file}} | bzgrep {{[-v|--invert-match]}} "{{search_pattern}}"`
`cat {{path/to/bz_compressed_file}} | bzgrep {{[-v|--invert-match]}} "{{search_pattern}}"`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Run command as new root directory:
`sudo chroot {{path/to/new/root}} {{command}}`
`sudo chroot {{path/to/new_root}} {{command}}`
- Use a specific user and group:

29
tldr/conda-update Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# conda update
> Update packages within a conda environment, including conda itself.
> More information: <https://docs.conda.io/projects/conda/en/latest/commands/update.html>.
- Update all packages in the current environment:
`conda update {{[--all|--update-all]}}`
- Update a specific package in the current environment:
`conda update {{package_name}}`
- Update conda itself in the base environment:
`conda update {{[-n|--name]}} base conda`
- Update packages while ignoring pinned packages:
`conda update --no-pin`
- Update packages in offline mode:
`conda update --offline`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use current directory as the repository, initialize a SFTP storage and encrypt the storage with a password:
`duplicacy init {{[-e|-encrypt]}} {{snapshot_id}} {{sftp://user@192.168.2.100/path/to/storage/}}`
`duplicacy init {{[-e|-encrypt]}} {{snapshot_id}} {{sftp://user@192.168.2.100/path/to/storage}}/`
- Save a snapshot of the repository to the default storage:

View File

@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
- Backup a directory via FTPS to a remote machine, encrypting it with a password:
`FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source/directory}} {{ftps://user@hostname/target/directory/path/}}`
`FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source_directory}} {{ftps://user@hostname/path/to/target_directory}}/`
- Backup a directory to Amazon S3, doing a full backup every month:
@@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git
- List the available backups:
`duplicity collection-status "file://{{absolute/path/to/backup/directory}}"`
`duplicity collection-status "file://{{absolute/path/to/backup_directory}}"`
- List the files in a backup stored on a remote machine, via SSH:
@@ -32,4 +32,4 @@ source: https://github.com/tldr-pages/tldr.git
- Restore a subdirectory from a GnuPG-encrypted local backup to a given location:
`PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --path-to-restore {{relative/path/restoredirectory}} file://{{absolute/path/to/backup/directory}} {{path/to/directory/to/restore/to}}`
`PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --path-to-restore {{relative/path/restoredirectory}} file://{{absolute/path/to/backup_directory}} {{path/to/directory_to_restore_to}}`

View File

@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- Upload a file to the host:
`PS > upload {{path/to/local/file}} {{path/to/remote/file}}`
`PS > upload {{path/to/local_file}} {{path/to/remote_file}}`
- List all loaded PowerShell functions:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Search multiple directories for duplicate files and cache the results:
`fclones group --cache {{path/to/directory1 path/to/directory2}}`
`fclones group --cache {{path/to/directory1 path/to/directory2 ...}}`
- Search only the specified directory for duplicate files, skipping subdirectories and save the results into a file:

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Recursively synchronize a directory to a destination using 8 concurrent synchronization jobs spread over two remote workers (machine1 and machine2):
`fpsync -v -n 8 -E -w login@machine1 -w login@machine2 -d /{{path/to/shared/directory}} /{{path/to/source}}/ /{{path/to/destination}}/`
`fpsync -v -n 8 -E -w login@machine1 -w login@machine2 -d /{{path/to/shared_directory}} /{{path/to/source}}/ /{{path/to/destination}}/`
- Recursively synchronize a directory to a destination using 4 local workers, each one transferring at most 1000 files and 100 MB per synchronization job:

View File

@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
- Clone repositories from a newline-separated list of remote locations, then register them as workspaces:
`git bulk --addworkspace {{workspace_name}} /{{path/to/root/directory}} --from /{{path/to/file}}`
`git bulk --addworkspace {{workspace_name}} /{{path/to/root_directory}} --from /{{path/to/file}}`
- List all registered workspaces:

View File

@@ -23,4 +23,4 @@ source: https://github.com/tldr-pages/tldr.git
- Move everything from sub-folder one level up:
`git filter-repo --path-rename {{path/to/folder/:}}`
`git filter-repo --path-rename {{path/to/folder}}/:`

View File

@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Download and install a package, specified by its import path:
`go get {{package_path}}`
`go get {{path/to/package}}`
- Compile and run a source file (it has to contain a `main` package):

View File

@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Compile a main package into an executable, enabling data race detection:
`go build -race -o {{path/to/executable}} {{path/to/main/package}}`
`go build -race -o {{path/to/executable}} {{path/to/main_package}}`

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Test the package in the current directory and run all benchmarks for 50 seconds:
`go test -v -bench . -benchtime {{50s}}`
`go test -v -bench . -benchtime 50s`
- Test the package with coverage analysis:

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Format C/C++ source according to the Linux style guide, automatically back up the original files, and replace with the indented versions:
`indent {{[-linux|--linux-style]}} {{path/to/source.c}} {{path/to/another_source.c}}`
`indent {{[-linux|--linux-style]}} {{path/to/source1.c path/to/source2.c ...}}`
- Format C/C++ source according to the GNU style, saving the indented version to a different file:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Open a core dump in interactive debug mode:
`jhsdb clhsdb --core {{path/to/core_dump}} --exe {{path/to/jdk/bin/java}}`
`jhsdb clhsdb --core {{path/to/core_dump}} --exe {{path/to/jdk_or_bin_or_java}}`
- Start a remote debug server:

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Use a specific key file to open a password database:
`keepass2 {{path/to/database.kbdx}} -keyfile:{{path/to/key/file.key}}`
`keepass2 {{path/to/database.kbdx}} -keyfile:{{path/to/key_file.key}}`

View File

@@ -36,4 +36,4 @@ source: https://github.com/tldr-pages/tldr.git
- Permanently add custom kubeconfig files:
`export KUBECONFIG="{{$HOME.kube/config:path/to/custom/kubeconfig.yaml}}" kubectl config get-contexts`
`export KUBECONFIG="{{$HOME.kube/config:path/to/custom_kubeconfig.yaml}}" kubectl config get-contexts`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- Start an interactive shell (Bash, by default) in a new root directory:
`arch-chroot {{path/to/new/root}}`
`arch-chroot {{path/to/new_root}}`
- Specify the user (other than the current user) to run the shell as:
`arch-chroot -u {{user}} {{path/to/new/root}}`
`arch-chroot -u {{user}} {{path/to/new_root}}`
- Run a custom command (instead of the default Bash) in the new root directory:
`arch-chroot {{path/to/new/root}} {{command}} {{command_arguments}}`
`arch-chroot {{path/to/new_root}} {{command}} {{command_arguments}}`
- Specify the shell, other than the default Bash (in this case, the `zsh` package should have been installed in the target system):
`arch-chroot {{path/to/new/root}} {{zsh}}`
`arch-chroot {{path/to/new_root}} {{zsh}}`

View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# ARK: Survival Evolved
> Create and start a headless ARK: Survival Evolved server.
> More information: <https://ark.wiki.gg/wiki/Server_configuration>.
- Start the server with a specific map:
`{{path/to/ShooterGameServer}} {{TheIsland}}`
- Start the server with a specific session name, server password, and admin password:
`{{path/to/ShooterGameServer}} {{TheIsland}}?SessionName={{session_name}}?ServerPassword={{server_password}}?ServerAdminPassword={{admin_password}}`
- Start the server with a specific port and set a maximum player count:
`{{path/to/ShooterGameServer}} {{TheIsland}}?Port={{7777}}?MaxPlayers={{1..70}}`
- Enable PvE and disabling PvP:
`{{path/to/ShooterGameServer}} {{TheIsland}}?ServerPVE=true`
- Set a multiplier to scale the server difficulty, affecting the maximum level of wild creatures:
`{{path/to/ShooterGameServer}} {{TheIsland}}?DifficultyOffset={{1.0}}`
- Enable a specific event:
`{{path/to/ShooterGameServer}} {{TheIsland}} -ActiveEvent={{Summer}}`
- Enable automatic mod downloading, installation, and updating (Steam only):
`{{path/to/ShooterGameServer}} {{TheIsland}} -automanagedmods`
- Enable crossplay between Steam and Epic Games Store:
`{{path/to/ShooterGameServer}} {{TheIsland}} -crossplay -PublicIPForEpic={{ip_address}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Test the package in the current directory using a new root directory:
`autopkgtest -- {{chroot}} {{path/to/new/root}}`
`autopkgtest -- {{chroot}} {{path/to/new_root}}`
- Test the package in the current directory without rebuilding it:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create a Debian Unstable system inside the `sid-root` directory with a local mirror:
`sudo debootstrap sid {{path/to/sid-root}}/ {{file:///path/to/mirror/}}`
`sudo debootstrap sid {{path/to/sid-root}}/ {{file:///path/to/mirror}}/`
- Switch to a bootstrapped system:

34
tldr/linux/hyprpicker Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# hyprpicker
> Minimal Wayland color picker for wlroots compositors (e.g., Hyprland).
> Requires a Wayland session. For clipboard autocopy, `wl-copy` must be installed.
> More information: <https://wiki.hypr.land/Hypr-Ecosystem/hyprpicker/>.
- Pick a color in the default (hex) format:
`hyprpicker`
- Pick a color and output in a specific format:
`hyprpicker {{[-f|--format]}} {{hex|rgb|hsl|hsv|cmyk}}`
- Copy the picked color to the clipboard:
`hyprpicker {{[-a|--autocopy]}}`
- Disable colored output (print plain text only):
`hyprpicker {{[-n|--no-fancy]}}`
- Store the picked color in a shell variable:
`{{color}}=$(hyprpicker {{[-f|--format]}} {{hex}})`
- Display help:
`hyprpicker {{[-h|--help]}}`

View File

@@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
- Install the `base` package, the Linux kernel and firmware for common hardware:
`pacstrap {{path/to/new/root}} {{base}} {{linux}} {{linux-firmware}}`
`pacstrap {{path/to/new_root}} {{base}} {{linux}} {{linux-firmware}}`
- Install the `base` package, the Linux LTS kernel and `base-devel` build tools:
`pacstrap {{path/to/new/root}} {{base}} {{base-devel}} {{linux-lts}}`
`pacstrap {{path/to/new_root}} {{base}} {{base-devel}} {{linux-lts}}`
- Install packages and copy the host's Pacman config to the target:
`pacstrap -P {{path/to/new/root}} {{packages}}`
`pacstrap -P {{path/to/new_root}} {{packages}}`
- Install packages without copying the host's mirrorlist to the target:
`pacstrap -M {{path/to/new/root}} {{packages}}`
`pacstrap -M {{path/to/new_root}} {{packages}}`
- Use an alternate configuration file for Pacman:
`pacstrap -C {{path/to/pacman.conf}} {{path/to/new/root}} {{packages}}`
`pacstrap -C {{path/to/pacman.conf}} {{path/to/new_root}} {{packages}}`
- Install packages using the package cache on the host instead of on the target:
`pacstrap -c {{path/to/new/root}} {{packages}}`
`pacstrap -c {{path/to/new_root}} {{packages}}`
- Initialize an empty `pacman` keyring in the target without copying it from the host:
`pacstrap -K {{path/to/new/root}} {{packages}}`
`pacstrap -K {{path/to/new_root}} {{packages}}`
- Install packages in interactive mode (prompts for confirmation):
`pacstrap -i {{path/to/new/root}} {{packages}}`
`pacstrap -i {{path/to/new_root}} {{packages}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Send a file or directories:
`qrcp send {{path/to/file_or_directory path/to/file_directory ...}}`
`qrcp send {{path/to/file_or_directory1 path/to/file_directory2 ...}}`
- Receive files:

View File

@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
- Open one or more images as a slideshow:
`sxiv -S {{seconds}} {{path/to/image1 path/to/image2}}`
`sxiv -S {{seconds}} {{path/to/image1 path/to/image2 ...}}`
- Open one or more images in thumbnail mode:
`sxiv -t {{path/to/image1 path/to/image2}}`
`sxiv -t {{path/to/image1 path/to/image2 ...}}`

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Remove a user in other root directory:
`sudo userdel {{[-R|--root]}} {{path/to/other/root}} {{username}}`
`sudo userdel {{[-R|--root]}} {{path/to/other_root}} {{username}}`
- Remove a user along with the home directory and mail spool:

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
- Start the GUI and import MIDI or Hydrogen file:
`lmms --import {{path/to/midi/or/hydrogen/file}}`
`lmms --import {{path/to/midi_or_hydrogen_file}}`
- Start the GUI with a specified window size:
@@ -28,16 +28,16 @@ source: https://github.com/tldr-pages/tldr.git
- Dump a `.mmpz` file:
`lmms dump {{path/to/mmpz/file.mmpz}}`
`lmms dump {{path/to/mmpz_file.mmpz}}`
- Render a project file:
`lmms render {{path/to/mmpz_or_mmp/file}}`
`lmms render {{path/to/mmpz_or_mmp_file}}`
- Render the individual tracks of a project file:
`lmms rendertracks {{path/to/mmpz_or_mmp/file}} {{path/to/dump/directory}}`
`lmms rendertracks {{path/to/mmpz_or_mmp_file}} {{path/to/dump_directory}}`
- Render with custom samplerate, format, and as a loop:
`lmms render --samplerate {{88200}} --format {{ogg}} --loop --output {{path/to/output/file.ogg}}`
`lmms render --samplerate {{88200}} --format {{ogg}} --loop --output {{path/to/output_file.ogg}}`

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Pass application-specific classpaths to compiler:
`mpijavac -cp {{path/to/my/app.jar}} {{path/to/source_file.java}}`
`mpijavac -cp {{path/to/app.jar}} {{path/to/source_file.java}}`
- Show the flags necessary to build MPI Java applications:

View File

@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Mount a directory into a specific instance:
`multipass mount {{path/to/local/directory}} {{instance_name}}:{{path/to/target/directory}}`
`multipass mount {{path/to/local_directory}} {{instance_name}}:{{path/to/target_directory}}`

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Start a synchronization session between a local directory and a remote host:
`mutagen sync create --name={{session_name}} /{{path/to/local/directory}}/ {{user}}@{{host}}:/{{path/to/remote/directory}}/`
`mutagen sync create --name={{session_name}} /{{path/to/local_directory}}/ {{user}}@{{host}}:/{{path/to/remote_directory}}/`
- Start a synchronization session between a local directory and a Docker container:
`mutagen sync create --name={{session_name}} /{{path/to/local/directory}}/ docker://{{user}}@{{container_name}}/{{path/to/remote/directory}}/`
`mutagen sync create --name={{session_name}} /{{path/to/local_directory}}/ docker://{{user}}@{{container_name}}/{{path/to/remote_directory}}/`
- Stop a running session:

View File

@@ -6,19 +6,19 @@ source: https://github.com/tldr-pages/tldr.git
# nginx
> Nginx web server.
> More information: <https://nginx.org/en/>.
> More information: <https://nginx.org/docs/switches.html>.
- Start server with the default configuration file:
- Start the server with the default configuration file:
`nginx`
- Start server with a custom configuration file:
- Start the server with a custom configuration file:
`nginx -c {{configuration_file}}`
- Start server with a prefix for all relative paths in the configuration file:
- Start the server with a prefix for all relative paths in the configuration file:
`nginx -c {{configuration_file}} -p {{prefix/for/relative/paths}}`
`nginx -c {{configuration_file}} -p {{path/to/prefix}}`
- Test the configuration without affecting the running server:

View File

@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- Download the latest version of a package and install it globally:
`npm {{[i|install]}} {{[-g|--global]}} {{package_name}}`
`npm {{[i|install]}} {{package_name}} {{[-g|--global]}}`
- Uninstall a package and remove it from the list of dependencies in `package.json`:

17
tldr/npm-ping Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm ping
> Ping `npm` registry.
> More information: <https://docs.npmjs.com/cli/npm-ping>.
- Ping the default `npm` registry:
`npm ping`
- Ping custom `npm` registry:
`npm ping --registry {{custom_registry_url}}`

41
tldr/npm-pkg Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm pkg
> Show or modify `package.json` properties.
> More information: <https://docs.npmjs.com/cli/npm-pkg>.
- Get the value of a specific property:
`npm pkg get {{name}}`
- Get multiple properties at once:
`npm pkg get {{name version ...}}`
- Get multiple values across all workspaces:
`npm pkg get {{name}} {{version}} {{[--ws|--workspaces]}}`
- Get a nested or array property value:
`npm pkg get {{contributors[0].email}}`
- Set a property to a specific value:
`npm pkg set {{property}}={{value}}`
- Set multiple properties at once:
`npm pkg set {{property1}}={{value1}} {{property2}}={{value2}}`
- Delete a property from `package.json`:
`npm pkg delete {{scripts.build}}`
- Auto-fix common errors in `package.json`:
`npm pkg fix`

42
tldr/npm-profile Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm profile
> Manage the npm profile and related settings.
> Note: This command is unaware of workspaces.
> More information: <https://docs.npmjs.com/cli/npm-profile>.
- View the npm profile details:
`npm profile get`
- View a specific property of the profile:
`npm profile get {{property}}`
- Set or update a profile property:
`npm profile set {{property}} {{value}}`
- Set the public email address:
`npm profile set email {{email}}`
- Set the public name:
`npm profile set fullname {{name}}`
- Set a new password interactively:
`npm profile set password`
- Enable two-factor authentication (2FA) (defaults to `auth-and-writes`):
`npm profile enable-2fa {{auth-only|auth-and-writes}}`
- Disable two-factor authentication (2FA):
`npm profile disable-2fa`

41
tldr/npm-publish Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm publish
> Publish a package to the npm registry.
> More information: <https://docs.npmjs.com/cli/publish>.
- Publish the current package to the default npm registry:
`npm publish`
- Publish a package from a specific directory:
`npm publish {{path/to/package_directory}}`
- Publish a scoped package with public access:
`npm publish --access public`
- Publish a scoped package with restricted (private) access:
`npm publish --access restricted`
- Publish a package to a custom registry:
`npm publish --registry {{https://registry.npmjs.org/}}`
- Run a dry run to see what would be published without uploading:
`npm publish --dry-run`
- Publish a package with a specific distribution tag (e.g., beta):
`npm publish --tag {{beta}}`
- Publish with a one-time password for 2FA-enabled accounts:
`npm publish --otp {{one_time_password}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Analyze one or more directories:
`phan --directory {{path/to/directory}} --directory {{path/to/another_directory}}`
`phan {{--directory path/to/directory1 --directory path/to/directory2 ...}}`
- Specify a configuration file (defaults to `.phan/config.php`):

View File

@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Edit the configuration file with a specific editor:
`pip config edit {{--global|--user|--site}} --editor {{path/to/editor/binary}}`
`pip config edit {{--global|--user|--site}} --editor {{path/to/editor_binary}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Print a colorful table with the translation progress of a file:
`pocount {{path/to/file/file.po}}`
`pocount {{path/to/file.po}}`
- Print translation progress of various files, one line per file:

29
tldr/rabbitmq-upgrade Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# rabbitmq-upgrade
> Manage the upgrade of a RabbitMQ node.
> More information: <https://www.rabbitmq.com/docs/man/rabbitmq-upgrade.8.html>.
- Wait for all quorum queues to have an above minimum online quorum:
`rabbitmq-upgrade await_online_quorum_plus_one`
- Put the node in maintenance mode:
`rabbitmq-upgrade drain`
- Put the node out of maintenance and into regular operating mode:
`rabbitmq-upgrade revive`
- Run post-upgrade tasks:
`rabbitmq-upgrade post_upgrade`
- Display help:
`rabbitmq-upgrade help`

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Remove files or directories from specified locations and place them in the graveyard:
`rip {{path/to/file_or_directory}} {{path/to/another/file_or_directory}}`
`rip {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- Interactively remove files or directories, with a prompt before every removal:
`rip --inspect {{path/to/file_or_directory}} {{path/to/another/file_or_directory}}`
`rip --inspect {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- List all files and directories in the graveyard that were originally within the current directory:

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show amount of space used by children folders:
`skicka du {{path/to/parent/folder}}`
`skicka du {{path/to/parent_folder}}`
- Create a folder:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Run a Shadowsocks proxy by specifying the configuration file:
`ss-local -c {{path/to/config/file.json}}`
`ss-local -c {{path/to/config_file.json}}`
- Use a plugin to run the proxy client:

View File

@@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git
- Optimize all SVG files within a directory (overwrites the original files):
`svgo {{[-f|--folder]}} {{path/to/directory/with/svg/files}}`
`svgo {{[-f|--folder]}} {{path/to/directory_with_svg_files}}`
- Optimize all SVG files within a directory and save the resulting files to another directory:
`svgo {{[-f|--folder]}} {{path/to/input/directory}} {{[-o|--output]}} {{path/to/output/directory}}`
`svgo {{[-f|--folder]}} {{path/to/input_directory}} {{[-o|--output]}} {{path/to/output_directory}}`
- Optimize SVG content passed from another command, and save the result to a file:

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Use a specific user profile directory:
`thunderbird --profile {{path/to/profile/directory}}`
`thunderbird --profile {{path/to/profile_directory}}`

42
tldr/trafilatura Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# trafilatura
> A Python tool for web scraping and crawling that extracts main text, metadata, and comments from web pages.
> Designed for creating text corpora and extracting structured content.
> More information: <https://trafilatura.readthedocs.io/en/latest/usage-cli.html#further-information>.
- Extract text from a URL:
`trafilatura {{[-u|--URL]}} {{url}}`
- Extract text and save to a file:
`trafilatura {{[-u|--URL]}} {{url}} {{[-o|--output-dir]}} {{path/to/output.txt}}`
- Extract text in JSON format:
`trafilatura {{[-u|--URL]}} {{url}} --json`
- Extract text from multiple URLs listed in a file:
`trafilatura {{[-i|--input-file]}} {{path/to/url_list.txt}}`
- Crawl a website using its sitemap:
`trafilatura --sitemap {{url_to_sitemap.xml}}`
- Extract text while preserving HTML formatting:
`trafilatura {{[-u|--URL]}} {{url}} --formatting`
- Extract text including comments:
`trafilatura {{[-u|--URL]}} {{url}} --with-comments`
- Display help:
`trafilatura {{[-h|--help]}}`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Convert object data from multiple JSON files to a CSV file with header (`-oh`) and double quote:
`trdsql -ocsv -oh "SELECT * FROM {{path/to/file/*.json}}" | sed 's/\([^,]*\)/"&"/g' > {{path/to/file.csv}}`
`trdsql -ocsv -oh "SELECT * FROM {{path/to/directory/*.json}}" | sed 's/\([^,]*\)/"&"/g' > {{path/to/file.csv}}`
- Interpret JSON list as a table and put objects inside as columns (path/to/file.json: `{"list":[{"age":"26","name":"Tanaka"}]}`):

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Build for production at root or subdirectory:
`trunk build --release --dist {{path/to/distribution}} --public-url /{{path/to/app/subdirectory}}`
`trunk build --release --dist {{path/to/distribution}} --public-url /{{path/to/app_subdirectory}}`
- List all available tools in the repo and if they are enabled:

View File

@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Create a virtual machine and kickstart an automated deployment based on Fedora 35 using only remote resources (no ISO required):
`virt-install {{[-n|--name]}} {{vm_name}} --memory {{2048}} --disk path={{path/to/image.qcow2}},size={{20}} {{[-l|--location]}} {{https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/}} {{[-x|--extra-args]}} "{{inst.ks=https://path/to/valid/kickstart.org}}"`
`virt-install {{[-n|--name]}} {{vm_name}} --memory {{2048}} --disk path={{path/to/image.qcow2}},size={{20}} {{[-l|--location]}} {{https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/}} {{[-x|--extra-args]}} "{{inst.ks=https://path/to/valid_kickstart.org}}"`

12
tldr/windows/ghy Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# ghy
> This command is an alias of `Get-History`.
- View documentation for the original command:
`tldr Get-History`

12
tldr/windows/h Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# h
> This command is an alias of `Get-History`.
- View documentation for the original command:
`tldr Get-History`

12
tldr/windows/history Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# history
> This command is an alias of `Get-History`.
- View documentation for the original command:
`tldr Get-History`

12
tldr/windows/sal Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# sal
> This command is an alias of `Set-Alias`.
- View documentation for the original command:
`tldr set-alias`

18
tldr/windows/set-alias Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# Set-Alias
> A powershell command to set or modify alias.
> Note: `sal` can be used as an alias for `Set-Alias`.
> More information: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-alias>.
- Create or reassign new alias:
`Set-Alias -Name {{text}} -Value {{command}}`
- Add a description to alias:
`Set-Alias -Name {{text}} -Value {{command}} -Description "{{description}}"`

View File

@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
> Windows Package Manager.
> More information: <https://learn.microsoft.com/windows/package-manager/winget>.
- Install a package:
- Install a package (use `--source` when package is available from multiple sources):
`winget {{[add|install]}} {{package}}`

View File

@@ -10,23 +10,23 @@ source: https://github.com/tldr-pages/tldr.git
- Grep a pattern in a compressed file (case-sensitive):
`zgrep {{pattern}} {{path/to/compressed/file}}`
`zgrep {{pattern}} {{path/to/compressed_file}}`
- Grep a pattern in a compressed file (case-insensitive):
`zgrep {{[-i|--ignore-case]}} {{pattern}} {{path/to/compressed/file}}`
`zgrep {{[-i|--ignore-case]}} {{pattern}} {{path/to/compressed_file}}`
- Output count of lines containing matched pattern in a compressed file:
`zgrep {{[-c|--count]}} {{pattern}} {{path/to/compressed/file}}`
`zgrep {{[-c|--count]}} {{pattern}} {{path/to/compressed_file}}`
- Display the lines which don't have the pattern present (Invert the search function):
`zgrep {{[-v|--invert-match]}} {{pattern}} {{path/to/compressed/file}}`
`zgrep {{[-v|--invert-match]}} {{pattern}} {{path/to/compressed_file}}`
- Grep a compressed file for multiple patterns:
`zgrep {{[-e|--regexp]}} "{{pattern_1}}" {{[-e|--regexp]}} "{{pattern_2}}" {{path/to/compressed/file}}`
`zgrep {{[-e|--regexp]}} "{{pattern_1}}" {{[-e|--regexp]}} "{{pattern_2}}" {{path/to/compressed_file}}`
- Use extended `regex` (supporting `?`, `+`, `{}`, `()` and `|`):
@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:
`zgrep --{{context|before-context|after-context}} 3 {{pattern}} {{path/to/compressed/file}}`
`zgrep --{{context|before-context|after-context}} 3 {{pattern}} {{path/to/compressed_file}}`