Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-13 00:17:31 +00:00
parent d15d5b771b
commit 39d8cd0675
34 changed files with 212 additions and 45 deletions

View File

@@ -35,7 +35,7 @@ source: https://github.com/tldr-pages/tldr.git
- New working dir to set:
`crane mutate {{[-w|--workdir]}} {{path/to/workdir}}`
`crane mutate {{[-w|--workdir]}} {{path/to/work_directory}}`
- Display help:

View File

@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Path to a directory where blobs will be stored:
`crane registry serve --disk {{path/to/store_dir}}`
`crane registry serve --disk {{path/to/store_directory}}`
- Display help for `crane registry`:

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Mount an encrypted filesystem. The initialization wizard will be started on the first execution:
`cryfs {{path/to/cipher_dir}} {{path/to/mount_point}}`
`cryfs {{path/to/cipher_directory}} {{path/to/mount_point}}`
- Unmount an encrypted filesystem:
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Automatically unmount after ten minutes of inactivity:
`cryfs --unmount-idle {{10}} {{path/to/cipher_dir}} {{path/to/mount_point}}`
`cryfs --unmount-idle {{10}} {{path/to/cipher_directory}} {{path/to/mount_point}}`
- List supported ciphers:

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
- Delete versions older than 1 year from a backup stored on a WebDAV share:
`FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_dir}}`
`FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_directory}}`
- List the available backups:
@@ -28,7 +28,7 @@ source: https://github.com/tldr-pages/tldr.git
- List the files in a backup stored on a remote machine, via SSH:
`duplicity list-current-files {{[-t|--time]}} {{YYYY-MM-DD}} scp://{{user@hostname}}/{{path/to/backup/dir}}`
`duplicity list-current-files {{[-t|--time]}} {{YYYY-MM-DD}} scp://{{user@hostname}}/{{path/to/backup_directory}}`
- Restore a subdirectory from a GnuPG-encrypted local backup to a given location:

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Initialize DVC in a subdirectory:
`cd {{path/to/subdir}} && dvc init --sudir`
`cd {{path/to/subdirectory}} && dvc init --sudir`

View File

@@ -11,16 +11,16 @@ source: https://github.com/tldr-pages/tldr.git
- Initialize or mount an encrypted filesystem:
`encfs /{{path/to/cipher_dir}} /{{path/to/mount_point}}`
`encfs /{{path/to/cipher_directory}} /{{path/to/mount_point}}`
- Initialize an encrypted filesystem with standard settings:
`encfs --standard /{{path/to/cipher_dir}} /{{path/to/mount_point}}`
`encfs --standard /{{path/to/cipher_directory}} /{{path/to/mount_point}}`
- Run encfs in the foreground instead of spawning a daemon:
`encfs -f /{{path/to/cipher_dir}} /{{path/to/mount_point}}`
`encfs -f /{{path/to/cipher_directory}} /{{path/to/mount_point}}`
- Mount an encrypted snapshot of a plain directory:
`encfs --reverse {{path/to/plain_dir}} {{path/to/cipher_dir}}`
`encfs --reverse {{path/to/plain_directory}} {{path/to/cipher_directory}}`

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Clone an SVN repository:
`git svn clone {{https://example.com/subversion_repo}} {{local_dir}}`
`git svn clone {{https://example.com/subversion_repo}} {{local_directory}}`
- Clone an SVN repository starting at a given revision number:
`git svn clone {{[-r|--revision]}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}`
`git svn clone {{[-r|--revision]}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_directory}}`
- Update local clone from the remote SVN repository:

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- Initialize an encrypted filesystem:
`gocryptfs -init {{path/to/cipher_dir}}`
`gocryptfs -init {{path/to/cipher_directory}}`
- Mount an encrypted filesystem:
`gocryptfs {{path/to/cipher_dir}} {{path/to/mount_point}}`
`gocryptfs {{path/to/cipher_directory}} {{path/to/mount_point}}`
- Mount with the explicit master key instead of password:
`gocryptfs --masterkey {{path/to/cipher_dir}} {{path/to/mount_point}}`
`gocryptfs --masterkey {{path/to/cipher_directory}} {{path/to/mount_point}}`
- Change the password:
`gocryptfs --passwd {{path/to/cipher_dir}}`
`gocryptfs --passwd {{path/to/cipher_directory}}`
- Make an encrypted snapshot of a plain directory:
`gocryptfs --reverse {{path/to/plain_dir}} {{path/to/cipher_dir}}`
`gocryptfs --reverse {{path/to/plain_directory}} {{path/to/cipher_directory}}`

View File

@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Install compiled binaries:
`gprinstall --prefix {{path/to/installation/dir}}`
`gprinstall --prefix {{path/to/installation_directory}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use alternative root dir:
`gdebi {{path/to/package.deb}} --root {{path/to/root_dir}}`
`gdebi {{path/to/package.deb}} --root {{path/to/root_directory}}`
- Display version:

View File

@@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git
- Download or update an entire directory:
`mirror {{path/to/remote_dir}} {{path/to/local_output_dir}}`
`mirror {{path/to/remote_directory}} {{path/to/local_output_directory}}`
- Upload or update an entire directory:
`mirror {{[-R|--reverse]}} {{path/to/local_dir}} {{path/to/remote_output_dir}}`
`mirror {{[-R|--reverse]}} {{path/to/local_directory}} {{path/to/remote_output_directory}}`

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Complete the installation of `libtool` libraries on the system:
`libtool {{[f|finish]}} {{path/to/installation_dir}}`
`libtool {{[f|finish]}} {{path/to/installation_directory}}`
- Delete installed libraries or executables:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use a custom directory (defaults to `$TMPDIR`, or `/tmp`):
`mktemp {{[-p |--tmpdir=]}}/{{path/to/tempdir}}`
`mktemp {{[-p |--tmpdir=]}}/{{path/to/temporary_directory}}`
- Use a custom path template (`X`s are replaced with random alphanumeric characters):

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Mount a CD-ROM device (with the filetype ISO9660) to `/cdrom` (readonly):
`mount {{[-t|--types]}} {{iso9660}} {{[-o|--options]}} ro {{/dev/cdrom}} {{/cdrom}}`
`mount {{[-t|--types]}} iso9660 {{[-o|--options]}} ro {{/dev/cdrom}} /cdrom`
- Mount all the filesystems defined in `/etc/fstab`:
@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Mount a directory to another directory:
`mount {{[-B|--bind]}} {{path/to/old_dir}} {{path/to/new_dir}}`
`mount {{[-B|--bind]}} {{path/to/old_directory}} {{path/to/new_directory}}`

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Configure the `builddir` with default values:
`meson setup {{build_dir}}`
`meson setup {{build_directory}}`
- Build the project:
`meson compile -C {{path/to/build_dir}}`
`meson compile -C {{path/to/build_directory}}`
- Run all tests in the project:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use a custom directory if `$TMPDIR` is not set (the default is platform-dependent, but usually `/tmp`):
`mktemp -p /{{path/to/tempdir}}`
`mktemp -p /{{path/to/temporary_directory}}`
- Use a custom path template (`X`s are replaced with random alphanumeric characters):

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Add a PKCS #11 module to a NSS database (e.g. a Firefox profile: `$HOME/.mozilla/firefox/default-release`):
`modutil -dbdir sql:{{path/to/nss/db/dir}} -add "{{module_label}}" -libfile {{path/to/pkcs11_mod.so}}`
`modutil -dbdir sql:{{path/to/nss_database_directory}} -add "{{module_label}}" -libfile {{path/to/pkcs11_mod.so}}`
- List PKCS #11 modules in a NSS database:
`modutil -dbdir sql:{{path/to/nss/db/dir}} -list`
`modutil -dbdir sql:{{path/to/nss_database_directory}} -list`

View File

@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Add a directory (must be written with trailing slash) to the include file search path before assembling:
`nasm -i {{path/to/include_dir}}/ {{source.asm}}`
`nasm -i {{path/to/include_directory}}/ {{source.asm}}`

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use a downloaded dataset, producing all outputs:
`nextclade run {{[-D|--input-dataset]}} {{path/to/dataset_dir}} {{[-O|--output-all]}} {{path/to/output_dir}} {{path/to/sequences.fasta}}`
`nextclade run {{[-D|--input-dataset]}} {{path/to/dataset_directory}} {{[-O|--output-all]}} {{path/to/output_directory}} {{path/to/sequences.fasta}}`
- Run on multiple files:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use a custom directory (defaults to the output of `getconf DARWIN_USER_TEMP_DIR`, or `/tmp`):
`mktemp --tmpdir /{{path/to/tempdir}}`
`mktemp --tmpdir /{{path/to/temporary_directory}}`
- Use a custom path template (`X`s are replaced with random alphanumeric characters):

View File

@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Specify an output directory so that originals do not get modified:
`sips --out {{path/to/out_dir}}`
`sips --out {{path/to/output_directory}}`
- Resample image at specified size, Image aspect ratio may be altered:
@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- Convert an image from CMYK to RGB:
`sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{path/to/image.ext}} {{path/to/out_dir}}`
`sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{path/to/image.ext}} {{path/to/output_directory}}`
- Remove ColorSync ICC profile from an image:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Perform a basic analysis check on a specific project:
`pio check {{[-d|--project-dir]}} {{project_dir}}`
`pio check {{[-d|--project-dir]}} {{project_directory}}`
- Perform an analysis check for a specific environment:

33
tldr/pkl Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pkl
> Manages, evaluates, and tests Pkl configuration modules.
> More information: <https://pkl-lang.org/main/current/pkl-cli>.
- Evaluate the given Pkl modules and produce their rendering results:
`pkl eval {{module.pkl}}`
- Run as a server that communicates over standard input/output:
`pkl server`
- Evaluate Pkl modules as tests and produces a report:
`pkl test {{module.pkl}}`
- Start a REPL session:
`pkl repl`
- Prepare a Pkl project for publishing as a package:
`pkl project package {{path/to/project_directory}}`
- Resolve project dependencies and writes the resolved versions to a file at path `PklProject.deps.json`:
`pkl project resolve {{path/to/project_directory}}`

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# poetry
> Manage Python packages and dependencies.
> See also: `asdf`.
> Some subcommands such as `about`, `check`, `env`, etc. have their own usage documentation.
> See also: `asdf`, `pipenv`, `hatch`.
> More information: <https://python-poetry.org/docs/cli/>.
- Create a new Poetry project in the directory with a specific name:

43
tldr/poetry-self Normal file
View File

@@ -0,0 +1,43 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# poetry-self
> Manage the Poetry installation/runtime environment itself.
> These commands reference `pyproject.toml` and `poetry.lock` files in your Poetry configuration directory.
> See also: `asdf`.
> More information: <https://python-poetry.org/docs/cli/#self>.
- Install a package:
`poetry self add {{package_name}}`
- Install dependencies from the Poetry installation's `pyproject.toml` file:
`poetry self install`
- Lock dependencies from the Poetry installation's `pyproject.toml` file:
`poetry self lock`
- Remove a package:
`poetry self remove {{package_name}}`
- List all installed packages:
`poetry self show`
- List all installed plugins:
`poetry self show plugins`
- Sync the runtime environment with the Poetry installation's `poetry.lock` file:
`poetry self sync`
- Update dependencies from the Poetry installation's `pyproject.toml` file:
`poetry self update`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Run a command and save the output to separate files:
`pssh {{[-H|--host]}} {{host1}} {{[-H|--host]}} {{host2}} {{[-o|--outdir]}} {{path/to/output_dir}} {{hostname --ip-addresses}}`
`pssh {{[-H|--host]}} {{host1}} {{[-H|--host]}} {{host2}} {{[-o|--outdir]}} {{path/to/output_directory}} {{hostname --ip-addresses}}`
- Run a command on multiple hosts, specified in a new-line separated file:

38
tldr/resticprofile Normal file
View File

@@ -0,0 +1,38 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# resticprofile
> Configuration profiles manager for restic backup.
> See also: `restic`, `resticprofile-schedule`, `resticprofile-unschedule`.
> More information: <https://creativeprojects.github.io/resticprofile/configuration/getting_started/index.html#write-your-first-configuration-file>.
- List all saved snapshots:
`resticprofile`
- Run a backup on the default profile:
`resticprofile backup`
- Run a backup with a specific profile (default profile is "default"):
`resticprofile {{[-n|--name]}} "{{profile_name}}" backup`
- Run in dry-run mode and show the underlying restic commands:
`resticprofile --dry-run backup`
- Display the names of all profiles from the configuration file:
`resticprofile profiles`
- Generate shell completions:
`resticprofile generate {{--bash-completion|--zsh-completion}}`
- Show all details of a profile:
`resticprofile show {{[-n|--name]}} "{{profile_name}}"`

View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# resticprofile schedule
> Schedule backups and run them in the background.
> See also: `restic`, `resticprofile`, `resticprofile-unschedule`.
> More information: <https://creativeprojects.github.io/resticprofile/schedules/configuration/index.html>.
- Schedule default profile:
`resticprofile schedule`
- Schedule a profile (default profile is "default"):
`resticprofile --name "{{group_name}}" schedule`
- Schedule all profiles:
`resticprofile schedule --all`
- Don't start the job after installing:
`resticprofile schedule --no-start`
- Display status of scheduled jobs for a profile:
`resticprofile status {{[-n|--name]}} {{profile_name}}`
- Run a scheduled job manually (used by system scheduler):
`resticprofile run-schedule "backup@{{profile_name}}"`

View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# resticprofile unschedule
> The command removes jobs for schedules declared in the selected profile or group (or of all profiles and groups).
> See also: `restic`, `resticprofile`, `resticprofile-schedule`.
> More information: <https://creativeprojects.github.io/resticprofile/schedules/configuration/index.html>.
- Unschedule a backup for a specific profile:
`resticprofile unschedule {{[-n|--name]}} "{{profile_name}}"`
- Unschedule all backups:
`resticprofile unschedule --all`

View File

@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Override default configuration file and directory locations:
`soupault --config {{config_path}} --site-dir {{input_dir}} --build-dir {{output_dir}}`
`soupault --config {{config_path}} --site-dir {{input_directory}} --build-dir {{output_directory}}`
- Extract metadata into a JSON file without generating pages:

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Build documentation:
`sphinx-build {{[-b|--builder]}} {{html|epub|text|latex|man|...}} {{path/to/source_dir}} {{path/to/build_dir}}`
`sphinx-build {{[-b|--builder]}} {{html|epub|text|latex|man|...}} {{path/to/source_directory}} {{path/to/build_directory}}`
- Build documentations intended for readthedocs.io (requires the sphinx-rtd-theme pip package):
`sphinx-build {{[-b|--builder]}} {{html}} {{path/to/docs_dir}} {{path/to/build_dir}}`
`sphinx-build {{[-b|--builder]}} {{html}} {{path/to/docs_directory}} {{path/to/build_directory}}`

View File

@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
`streamlit hello`
- Run your Streamlit application:
- Run a Streamlit application:
`streamlit run {{project_name}}`

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/subdir}}`
`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

@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Save request and response data for found parameters to a directory:
`x8 {{[-u|--url]}} {{https://example.com/}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} --save-responses {{path/to/output_dir}}`
`x8 {{[-u|--url]}} {{https://example.com/}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}} --save-responses {{path/to/output_directory}}`