From 67b1d9150b46c8912f210c155ba194a457dac4ed Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 23 Sep 2025 00:19:31 +0000 Subject: [PATCH] Update cheatsheets --- tldr/codecrafters | 4 ++++ tldr/gh | 8 ++++---- tldr/gh-alias | 2 +- tldr/gh-codespace | 16 ++++++++-------- tldr/gh-completion | 4 ++-- tldr/gh-config | 6 +++--- tldr/gh-extension | 6 +++--- tldr/gh-gist | 6 +++--- tldr/gh-gpg-key | 26 ++++++++++++++++++++++++++ tldr/gh-help | 2 +- tldr/gh-issue | 6 +++--- tldr/gh-issue-create | 14 +++++++------- tldr/gh-label | 6 +++--- tldr/gh-pr | 4 ++-- tldr/gh-pr-create | 10 +++++----- tldr/gh-pr-merge | 2 +- tldr/gh-release | 4 ++-- tldr/gh-repo | 8 ++++---- tldr/gh-repo-create | 10 +++++----- tldr/gh-screensaver | 4 ++-- tldr/gh-secret | 6 +++--- tldr/gh-ssh-key | 10 +++++----- tldr/gh-workflow | 2 +- tldr/linux/lvmsar | 22 ++++++++++++++++++++++ tldr/npm-exec | 29 +++++++++++++++++++++++++++++ tldr/npx | 23 +++-------------------- tldr/osx/duti | 1 + tldr/osx/fuser | 17 +++++++++++++++++ 28 files changed, 170 insertions(+), 88 deletions(-) create mode 100644 tldr/gh-gpg-key create mode 100644 tldr/linux/lvmsar create mode 100644 tldr/npm-exec create mode 100644 tldr/osx/fuser diff --git a/tldr/codecrafters b/tldr/codecrafters index c4b376e8..ab367b90 100644 --- a/tldr/codecrafters +++ b/tldr/codecrafters @@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Commit changes and submit, to move to the next stage: `codecrafters submit` + +- Update language version: + +`codecrafters update-buildpack` diff --git a/tldr/gh b/tldr/gh index 6e6470ef..5c584d13 100644 --- a/tldr/gh +++ b/tldr/gh @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Create a new issue: -`gh issue create` +`gh issue {{[new|create]}}` - View and filter the open issues of the current repository: -`gh issue list` +`gh issue {{[ls|list]}}` - View an issue in the default web browser: @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a pull request: -`gh pr create` +`gh pr {{[new|create]}}` - View a pull request in the default web browser: @@ -35,7 +35,7 @@ source: https://github.com/tldr-pages/tldr.git - Check out a specific pull request locally: -`gh pr checkout {{pr_number}}` +`gh {{[co|pr checkout]}} {{pr_number|url|branch}}` - Check the status of a repository's pull requests: diff --git a/tldr/gh-alias b/tldr/gh-alias index c02b53f4..11e1815e 100644 --- a/tldr/gh-alias +++ b/tldr/gh-alias @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List all the aliases `gh` is configured to use: -`gh alias list` +`gh alias {{[ls|list]}}` - Create a `gh` subcommand alias: diff --git a/tldr/gh-codespace b/tldr/gh-codespace index 1da5341a..6573dea5 100644 --- a/tldr/gh-codespace +++ b/tldr/gh-codespace @@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git - Create a codespace in GitHub interactively: -`gh codespace create` +`gh {{[cs|codespace]}} create` - List all available codespaces: -`gh codespace list` +`gh {{[cs|codespace]}} {{[ls|list]}}` - Connect to a codespace via SSH interactively: -`gh codespace ssh` +`gh {{[cs|codespace]}} ssh` - Transfer a specific file to a codespace interactively: -`gh codespace cp {{path/to/source_file}} remote:{{path/to/remote_file}}` +`gh {{[cs|codespace]}} cp {{path/to/source_file}} remote:{{path/to/remote_file}}` - List the ports of a codespace interactively: -`gh codespace ports` +`gh {{[cs|codespace]}} ports` - Display the logs from a codespace interactively: -`gh codespace logs` +`gh {{[cs|codespace]}} logs` - Delete a codespace interactively: -`gh codespace delete` +`gh {{[cs|codespace]}} delete` - Display help for a subcommand: -`gh codespace {{code|cp|create|delete|edit|...}} --help` +`gh {{[cs|codespace]}} {{code|cp|create|delete|edit|...}} {{[-h|--help]}}` diff --git a/tldr/gh-completion b/tldr/gh-completion index 5a1a280b..2b0dc62b 100644 --- a/tldr/gh-completion +++ b/tldr/gh-completion @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Append the `gh` completion script to `~/.bashrc`: -`gh completion {{[-s|--shell]}} {{bash}} >> {{~/.bashrc}}` +`gh completion {{[-s|--shell]}} bash >> ~/.bashrc` - Append the `gh` completion script to `~/.zshrc`: -`gh completion {{[-s|--shell]}} {{zsh}} >> {{~/.zshrc}}` +`gh completion {{[-s|--shell]}} zsh >> ~/.zshrc` - Display the subcommand help: diff --git a/tldr/gh-config b/tldr/gh-config index 978f7e6a..8c101ce8 100644 --- a/tldr/gh-config +++ b/tldr/gh-config @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # gh config -> Change configuration for GitHub cli. +> Change configuration for GitHub CLI. > More information: . - Display what Git protocol is being used: @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Set protocol to SSH: -`gh config set git_protocol {{ssh}}` +`gh config set git_protocol ssh` - Use `delta` in side-by-side mode as the default pager for all `gh` commands: -`gh config set pager '{{delta --side-by-side}}'` +`gh config set pager 'delta --side-by-side'` - Set text editor to Vim: diff --git a/tldr/gh-extension b/tldr/gh-extension index bf1025f5..e8e94e35 100644 --- a/tldr/gh-extension +++ b/tldr/gh-extension @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - List installed extensions: -`gh {{[ext|extension]}} list` +`gh {{[ext|extension]}} {{[ls|list]}}` - Upgrade a specific extension: @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - List installed extensions: -`gh {{[ext|extension]}} list` +`gh {{[ext|extension]}} {{[ls|list]}}` - Remove an extension: @@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help about a subcommand: -`gh {{[ext|extension]}} {{subcommand}} --help` +`gh {{[ext|extension]}} {{subcommand}} {{[-h|--help]}}` diff --git a/tldr/gh-gist b/tldr/gh-gist index 09099cfd..de30d49a 100644 --- a/tldr/gh-gist +++ b/tldr/gh-gist @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Create a new Gist from one or more files: -`gh gist create {{path/to/file1 path/to/file2 ...}}` +`gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}}` - Create a new Gist with a specific [desc]ription: -`gh gist create {{path/to/file1 path/to/file2 ...}} {{[-d|--desc]}} "{{description}}"` +`gh gist {{[new|create]}} {{path/to/file1 path/to/file2 ...}} {{[-d|--desc]}} "{{description}}"` - Edit a Gist: @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - List up to 42 Gists owned by the currently logged in user: -`gh gist list {{[-L|--limit]}} {{42}}` +`gh gist {{[ls|list]}} {{[-L|--limit]}} 42` - View a Gist in the default browser without rendering Markdown: diff --git a/tldr/gh-gpg-key b/tldr/gh-gpg-key new file mode 100644 index 00000000..876eb64c --- /dev/null +++ b/tldr/gh-gpg-key @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh gpg-key + +> Manage GPG keys registered with the authorized GitHub account. +> See also: `gpg`. +> More information: . + +- List GPG keys in the authorized GitHub account: + +`gh gpg-key {{[ls|list]}}` + +- Add a GPG key to the authorized GitHub account by specifying the key file: + +`gh gpg-key add {{path/to/key_file}}` + +- Add a GPG key to the authorized GitHub account by specifying the key ID: + +`gpg {{[-a|--armor]}} --export {{key_id}} | gh gpg-key add -` + +- Delete a GPG key from the authorized GitHub account: + +`gh gpg-key delete {{key_id}}` diff --git a/tldr/gh-help b/tldr/gh-help index 4dfe7881..4583cd0b 100644 --- a/tldr/gh-help +++ b/tldr/gh-help @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Display help for the `gh help` subcommand: -`gh help --help` +`gh help {{[-h|--help]}}` - Display help about environment variables that can be used with `gh`: diff --git a/tldr/gh-issue b/tldr/gh-issue index 3cbff1b0..517e343e 100644 --- a/tldr/gh-issue +++ b/tldr/gh-issue @@ -18,15 +18,15 @@ source: https://github.com/tldr-pages/tldr.git - Create a new issue in the default web browser: -`gh issue create {{[-w|--web]}}` +`gh issue {{[new|create]}} {{[-w|--web]}}` - List the last 10 issues with the `bug` label: -`gh issue list {{[-L|--limit]}} {{10}} {{[-l|--label]}} "{{bug}}"` +`gh issue {{[ls|list]}} {{[-L|--limit]}} 10 {{[-l|--label]}} "bug"` - List closed issues made by a specific user: -`gh issue list {{[-s|--state]}} closed {{[-A|--author]}} {{username}}` +`gh issue {{[ls|list]}} {{[-s|--state]}} closed {{[-A|--author]}} {{username}}` - Display the status of issues relevant to the user, in a specific repository: diff --git a/tldr/gh-issue-create b/tldr/gh-issue-create index 505942da..bd357e93 100644 --- a/tldr/gh-issue-create +++ b/tldr/gh-issue-create @@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git - Create a new issue against the current repository interactively: -`gh issue create` +`gh issue {{[new|create]}}` - Create a new issue with the `bug` label interactively: -`gh issue create {{[-l|--label]}} "{{bug}}"` +`gh issue {{[new|create]}} {{[-l|--label]}} "bug"` - Create a new issue interactively and assign it to the specified users: -`gh issue create {{[-a|--assignee]}} {{user1,user2,...}}` +`gh issue {{[new|create]}} {{[-a|--assignee]}} {{user1,user2,...}}` - Create a new issue with a title, body and assign it to the current user: -`gh issue create {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}" {{[-a|--assignee]}} "{{@me}}"` +`gh issue {{[new|create]}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}" {{[-a|--assignee]}} "@me"` - Create a new issue interactively, reading the body text from a file: -`gh issue create {{[-F|--body-file]}} {{path/to/file}}` +`gh issue {{[new|create]}} {{[-F|--body-file]}} {{path/to/file}}` - Create a new issue in the default web browser: -`gh issue create {{[-w|--web]}}` +`gh issue {{[new|create]}} {{[-w|--web]}}` - Display help: -`gh issue create --help` +`gh issue {{[new|create]}} {{[-h|--help]}}` diff --git a/tldr/gh-label b/tldr/gh-label index 205f5b4f..8c310bfa 100644 --- a/tldr/gh-label +++ b/tldr/gh-label @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - List labels for the repository in the current directory: -`gh label list` +`gh label {{[ls|list]}}` - View labels for the repository in the current directory in the default web browser: -`gh label list {{[-w|--web]}}` +`gh label {{[ls|list]}} {{[-w|--web]}}` - Create a label with a specific name, description and color in hexadecimal format for the repository in the current directory: @@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help for a subcommand: -`gh label {{subcommand}} --help` +`gh label {{subcommand}} {{[-h|--help]}}` diff --git a/tldr/gh-pr b/tldr/gh-pr index 7919be48..4e39a2c8 100644 --- a/tldr/gh-pr +++ b/tldr/gh-pr @@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git - Create a pull request: -`gh pr create` +`gh pr {{[new|create]}}` - Check out a specific pull request locally: -`gh pr checkout {{pr_number}}` +`gh {{[co|pr checkout]}} {{pr_number|url|branch}}` - View the changes made in the pull request for the current branch: diff --git a/tldr/gh-pr-create b/tldr/gh-pr-create index 0ecf669f..0521ecab 100644 --- a/tldr/gh-pr-create +++ b/tldr/gh-pr-create @@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git - Interactively create a pull request: -`gh pr create` +`gh pr {{[new|create]}}` - Create a pull request, determining the title and description from the commit messages of the current branch: -`gh pr create {{[-f|--fill]}}` +`gh pr {{[new|create]}} {{[-f|--fill]}}` - Create a draft pull request: -`gh pr create {{[-d|--draft]}}` +`gh pr {{[new|create]}} {{[-d|--draft]}}` - Create a pull request specifying the base branch, title, and description: -`gh pr create {{[-B|--base]}} {{base_branch}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}"` +`gh pr {{[new|create]}} {{[-B|--base]}} {{base_branch}} {{[-t|--title]}} "{{title}}" {{[-b|--body]}} "{{body}}"` - Start opening a pull request in the default web browser: -`gh pr create {{[-w|--web]}}` +`gh pr {{[new|create]}} {{[-w|--web]}}` diff --git a/tldr/gh-pr-merge b/tldr/gh-pr-merge index bf18a46a..002ba046 100644 --- a/tldr/gh-pr-merge +++ b/tldr/gh-pr-merge @@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`gh pr merge --help` +`gh pr merge {{[-h|--help]}}` diff --git a/tldr/gh-release b/tldr/gh-release index 1eac85a7..0ac36245 100644 --- a/tldr/gh-release +++ b/tldr/gh-release @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List releases in a GitHub repository, limited to 30 items: -`gh release list` +`gh release {{[ls|list]}}` - Display information about a specific release: @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a new release: -`gh release create {{tag}}` +`gh release {{[new|create]}} {{tag}}` - Delete a specific release: diff --git a/tldr/gh-repo b/tldr/gh-repo index 3011474c..0485f958 100644 --- a/tldr/gh-repo +++ b/tldr/gh-repo @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a new repository (if the repository name is not set, the default name will be the name of the current directory): -`gh repo create {{name}}` +`gh repo {{[new|create]}} {{name}}` - Clone a repository: @@ -26,12 +26,12 @@ source: https://github.com/tldr-pages/tldr.git - List repositories owned by a specific user or organization (if the owner is not set, the default owner will be the currently logged in user): -`gh repo list {{owner}}` +`gh repo {{[ls|list]}} {{owner}}` - List only non-forks repositories and limit the number of repositories to list (default: 30): -`gh repo list {{owner}} --source {{[-L|--limit]}} {{limit}}` +`gh repo {{[ls|list]}} {{owner}} --source {{[-L|--limit]}} {{limit}}` - List repositories with a specific primary coding language: -`gh repo list {{owner}} {{[-l|--language]}} {{language_name}}` +`gh repo {{[ls|list]}} {{owner}} {{[-l|--language]}} {{language_name}}` diff --git a/tldr/gh-repo-create b/tldr/gh-repo-create index 375acd96..d3ccbbdf 100644 --- a/tldr/gh-repo-create +++ b/tldr/gh-repo-create @@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git - Create a new repository interactively: -`gh repo create` +`gh repo {{[new|create]}}` - Create a new repository with a specified name and description: -`gh repo create {{repo_name}} {{[-d|--description]}} "{{repo_description}}"` +`gh repo {{[new|create]}} {{repo_name}} {{[-d|--description]}} "{{repo_description}}"` - Create a private repository from the current directory: -`gh repo create {{[-s|--source]}} . --private` +`gh repo {{[new|create]}} {{[-s|--source]}} . --private` - Clone the new repository locally after creation: -`gh repo create {{repo_name}} {{[-c|--clone]}}` +`gh repo {{[new|create]}} {{repo_name}} {{[-c|--clone]}}` - Push the current directory to a new GitHub repository: -`gh repo create {{[-s|--source]}} . --public` +`gh repo {{[new|create]}} {{[-s|--source]}} . --public` diff --git a/tldr/gh-screensaver b/tldr/gh-screensaver index fee12241..37883a55 100644 --- a/tldr/gh-screensaver +++ b/tldr/gh-screensaver @@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git - Run the "marquee" screensaver with a specific text and font: -`gh screensaver {{[-s|--saver]}} {{marquee}} -- --message="{{message}}" --font={{font_name}}` +`gh screensaver {{[-s|--saver]}} marquee -- --message="{{message}}" --font={{font_name}}` - Run the "starfield" screensaver with a specific density and speed: -`gh screensaver {{[-s|--saver]}} {{starfield}} -- --density {{500}} --speed {{10}}` +`gh screensaver {{[-s|--saver]}} starfield -- --density {{500}} --speed {{10}}` - List available screensavers: diff --git a/tldr/gh-secret b/tldr/gh-secret index 39984bd7..c4b3c59d 100644 --- a/tldr/gh-secret +++ b/tldr/gh-secret @@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git - List secret keys for the current repository: -`gh secret list` +`gh secret {{[ls|list]}}` - List secret keys for a specific organization: -`gh secret list {{[-o|--org]}} {{organization}}` +`gh secret {{[ls|list]}} {{[-o|--org]}} {{organization}}` - List secret keys for a specific repository: -`gh secret list {{[-R|--repo]}} {{owner}}/{{repository}}` +`gh secret {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repository}}` - Set a secret for the current repository (user will be prompted for the value): diff --git a/tldr/gh-ssh-key b/tldr/gh-ssh-key index ad58ce70..e21642c9 100644 --- a/tldr/gh-ssh-key +++ b/tldr/gh-ssh-key @@ -8,13 +8,9 @@ source: https://github.com/tldr-pages/tldr.git > Manage GitHub SSH keys. > More information: . -- Display help: - -`gh ssh-key` - - List SSH keys for the currently authenticated user: -`gh ssh-key list` +`gh ssh-key {{[ls|list]}}` - Add an SSH key to the currently authenticated user's account: @@ -23,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Add an SSH key to the currently authenticated user's account with a specific title: `gh ssh-key add {{[-t|--title]}} {{title}} {{path/to/key.pub}}` + +- Display help: + +`gh ssh-key` diff --git a/tldr/gh-workflow b/tldr/gh-workflow index 894bd41b..cbcb2479 100644 --- a/tldr/gh-workflow +++ b/tldr/gh-workflow @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - List workflow files (use `--all` to include disabled workflows): -`gh workflow list` +`gh workflow {{[ls|list]}}` - Run a manual workflow with parameters: diff --git a/tldr/linux/lvmsar b/tldr/linux/lvmsar new file mode 100644 index 00000000..3210d5d1 --- /dev/null +++ b/tldr/linux/lvmsar @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lvmsar + +> LVM system activity reporter. +> Not supported under LVM2; prefer `dmstats`. +> More information: . + +- Run the legacy reporter (LVM1 systems only): + +`lvmsar` + +- Report I/O statistics for a device using device-mapper stats: + +`dmstats report {{/dev/mapper/device}}` + +- List statistics regions for a device: + +`dmstats list {{/dev/mapper/device}}` diff --git a/tldr/npm-exec b/tldr/npm-exec new file mode 100644 index 00000000..b7e444e6 --- /dev/null +++ b/tldr/npm-exec @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm exec + +> Execute binaries from `npm` packages. +> More information: . + +- Execute the command from a local or remote `npm` package: + +`npm {{[x|exec]}} {{command}} {{argument1 argument2 ...}}` + +- In case multiple commands with the same name exist, it is possible to explicitly specify the package: + +`npm {{[x|exec]}} --package {{package}} {{command}}` + +- Run a command if it exists in the current path or in `node_modules/.bin`: + +`npm {{[x|exec]}} --no-install {{command}} {{argument1 argument2 ...}}` + +- Execute a specific command suppressing any output from `npm` itself: + +`npm {{[x|exec]}} --quiet {{command}} {{argument1 argument2 ...}}` + +- Display help: + +`npm {{[x|exec]}} --help` diff --git a/tldr/npx b/tldr/npx index e95ccc20..67fb50e7 100644 --- a/tldr/npx +++ b/tldr/npx @@ -5,25 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # npx -> Execute binaries from `npm` packages. -> More information: . +> This command is an alias of `npm exec`. -- Execute the command from a local or remote `npm` package: +- View documentation for the original command: -`npx {{command}} {{argument1 argument2 ...}}` - -- In case multiple commands with the same name exist, it is possible to explicitly specify the package: - -`npx --package {{package}} {{command}}` - -- Run a command if it exists in the current path or in `node_modules/.bin`: - -`npx --no-install {{command}} {{argument1 argument2 ...}}` - -- Execute a specific command suppressing any output from `npx` itself: - -`npx --quiet {{command}} {{argument1 argument2 ...}}` - -- Display help: - -`npx --help` +`tldr npm exec` diff --git a/tldr/osx/duti b/tldr/osx/duti index a9f8f6e2..c489ba95 100644 --- a/tldr/osx/duti +++ b/tldr/osx/duti @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # duti > Set default applications for document types and URL schemes on macOS. +> See also: `osascript`. > More information: . - Set Safari as the default handler for HTML documents: diff --git a/tldr/osx/fuser b/tldr/osx/fuser new file mode 100644 index 00000000..8fc57f74 --- /dev/null +++ b/tldr/osx/fuser @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, osx] +source: https://github.com/tldr-pages/tldr.git +--- +# fuser + +> Display process IDs currently using files. +> More information: . + +- Show PIDs of processes accessing a file or directory: + +`fuser {{path/to/file_or_directory}}` + +- Show PIDs and usernames of processes accessing a file or directory: + +`fuser -u {{path/to/file_or_directory}}`