mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
@@ -24,14 +24,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`alacritty --working-directory {{path/to/directory}}`
|
||||
|
||||
- [e]xecute a command in a new Alacritty window (also works with `alacritty msg create-window`):
|
||||
- Execute a command in a new Alacritty window (also works with `alacritty msg create-window`):
|
||||
|
||||
`alacritty {{[-e|--command]}} {{command}}`
|
||||
|
||||
- Use an alternative configuration file (defaults to `$XDG_CONFIG_HOME/alacritty/alacritty.toml`):
|
||||
|
||||
`alacritty --config-file {{path/to/config.toml}}`
|
||||
|
||||
- Run with live configuration reload enabled (can also be enabled by default in `alacritty.toml`):
|
||||
|
||||
`alacritty --live-config-reload --config-file {{path/to/config.toml}}`
|
||||
|
||||
@@ -22,13 +22,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Generate a build recipe, with build type set to `Release` with CMake variable:
|
||||
|
||||
`cmake {{path/to/project_directory}} -D {{CMAKE_BUILD_TYPE=Release}}`
|
||||
`cmake {{path/to/project_directory}} -D CMAKE_BUILD_TYPE=Release`
|
||||
|
||||
- Generate a build recipe using `generator_name` as the underlying build system:
|
||||
|
||||
`cmake -G {{generator_name}} {{path/to/project_directory}}`
|
||||
|
||||
- Install the build artifacts using the custom prefix for paths:
|
||||
- Install the build artifacts using a custom prefix for paths:
|
||||
|
||||
`cmake --install {{path/to/build_directory}} --strip --prefix {{path/to/directory}}`
|
||||
|
||||
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cmake --build {{path/to/build_directory}} {{[-t|--target]}} {{target_name}}`
|
||||
|
||||
- Display help, obtain a list of generators:
|
||||
- Display help:
|
||||
|
||||
`cmake {{[-h|--help]}}`
|
||||
|
||||
8
tldr/fzf
8
tldr/fzf
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Fuzzy finder.
|
||||
> Similar to `sk`.
|
||||
> More information: <https://github.com/junegunn/fzf>.
|
||||
> More information: <https://github.com/junegunn/fzf#usage>.
|
||||
|
||||
- Start `fzf` on all files in the specified directory:
|
||||
|
||||
@@ -25,10 +25,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`fzf {{[-q|--query]}} "{{query}}"`
|
||||
|
||||
- Start `fzf` on entries that start with core and end with either go, rb, or py:
|
||||
- Start `fzf` on entries that start with `core` and end with either `go`, `rb`, or `py`:
|
||||
|
||||
`fzf {{[-q|--query]}} "^core go$ | rb$ | py$"`
|
||||
|
||||
- Start `fzf` on entries that not match pyc and match exactly travis:
|
||||
- Start `fzf` on entries that not match `pyc` and match exactly `travis`:
|
||||
|
||||
`fzf {{[-q|--query]}} "!pyc 'travis"`
|
||||
`fzf {{[-q|--query]}} "\!pyc 'travis'"`
|
||||
|
||||
10
tldr/gem
10
tldr/gem
@@ -6,11 +6,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# gem
|
||||
|
||||
> A package manager for the Ruby programming language.
|
||||
> More information: <https://guides.rubygems.org>.
|
||||
> More information: <https://guides.rubygems.org/command-reference/>.
|
||||
|
||||
- Search for remote gem(s) and show all available versions:
|
||||
|
||||
`gem search {{regex}} --all`
|
||||
`gem search {{regex}} {{[-a|--all]}}`
|
||||
|
||||
- Install the latest version of a gem:
|
||||
|
||||
@@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Install a specific version of a gem:
|
||||
|
||||
`gem install {{gem_name}} --version {{1.0.0}}`
|
||||
`gem install {{gem_name}} {{[-v|--version]}} {{1.0.0}}`
|
||||
|
||||
- Install the latest matching (SemVer) version of a gem:
|
||||
|
||||
`gem install {{gem_name}} --version '~> {{1.0}}'`
|
||||
`gem install {{gem_name}} {{[-v|--version]}} '~> {{1.0}}'`
|
||||
|
||||
- Update a gem:
|
||||
|
||||
@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Uninstall a specific version of a gem:
|
||||
|
||||
`gem uninstall {{gem_name}} --version {{1.0.0}}`
|
||||
`gem uninstall {{gem_name}} {{[-v|--version]}} {{1.0.0}}`
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clone a local repository:
|
||||
|
||||
`git clone {{[-l|--local]}} {{path/to/local/repository}}`
|
||||
`git clone {{[-l|--local]}} {{path/to/local_repository}}`
|
||||
|
||||
- Clone quietly:
|
||||
|
||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time):
|
||||
|
||||
`git clone --depth {{10}} {{remote_repository_location}}`
|
||||
`git clone --depth 10 {{remote_repository_location}}`
|
||||
|
||||
- Clone an existing repository only fetching a specific branch:
|
||||
|
||||
|
||||
2
tldr/jq
2
tldr/jq
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a specific expression only using the `jq` binary (print a colored and formatted JSON output):
|
||||
|
||||
`jq '.' /{{path/to/file.json}}`
|
||||
`jq '.' {{path/to/file.json}}`
|
||||
|
||||
- Execute a specific script:
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# keepassxc-cli
|
||||
|
||||
> Interface for KeepassXC.
|
||||
> Interface for KeePassXC.
|
||||
> More information: <https://manned.org/keepassxc-cli>.
|
||||
|
||||
- Search entries:
|
||||
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List the contents of a folder:
|
||||
|
||||
`keepassxc-cli ls {{path/to/database_file}} /{{path/to/directory}}`
|
||||
`keepassxc-cli ls {{path/to/database_file}} {{path/to/directory}}`
|
||||
|
||||
- Add an entry with an auto-generated password:
|
||||
|
||||
`keepassxc-cli add --generate {{path/to/database_file}} {{entry_name}}`
|
||||
`keepassxc-cli add {{[-g|--generate]}} {{path/to/database_file}} {{entry_name}}`
|
||||
|
||||
- Delete an entry:
|
||||
|
||||
@@ -30,12 +30,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Copy a TOTP code to the clipboard:
|
||||
|
||||
`keepassxc-cli clip --totp {{path/to/database_file}} {{entry_name}}`
|
||||
`keepassxc-cli clip {{[-t|--totp]}} {{path/to/database_file}} {{entry_name}}`
|
||||
|
||||
- Generate a passphrase with 7 words:
|
||||
|
||||
`keepassxc-cli diceware --words {{7}}`
|
||||
`keepassxc-cli diceware {{[-W|--words]}} 7`
|
||||
|
||||
- Generate a password with 16 printable ASCII characters:
|
||||
|
||||
`keepassxc-cli generate --lower --upper --numeric --special --length {{16}}`
|
||||
`keepassxc-cli generate {{[-lUns|--lower --upper --numeric --special]}} {{[-L|--length]}} 16`
|
||||
|
||||
22
tldr/linux/bore
Normal file
22
tldr/linux/bore
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bore
|
||||
|
||||
> Start a local proxy to a remote server using Bore.
|
||||
> Some subcommands such as `local` have their own usage documentation.
|
||||
> More information: <https://github.com/ekzhang/bore#detailed-usage>.
|
||||
|
||||
- Expose a local port to a remote Bore server:
|
||||
|
||||
`bore local {{[-t|--to]}} {{remote_server_address}} {{local_port}}`
|
||||
|
||||
- Start a Bore server:
|
||||
|
||||
`bore server`
|
||||
|
||||
- Display help:
|
||||
|
||||
`bore {{[-h|--help]}}`
|
||||
29
tldr/linux/bore-local
Normal file
29
tldr/linux/bore-local
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bore local
|
||||
|
||||
> Start a local proxy to a remote server using Bore.
|
||||
> More information: <https://github.com/ekzhang/bore#detailed-usage>.
|
||||
|
||||
- Expose a local port to a remote Bore server:
|
||||
|
||||
`bore local {{[-t|--to]}} {{remote_server_address}} {{local_port}}`
|
||||
|
||||
- Expose a specific local host instead of `localhost`:
|
||||
|
||||
`bore local {{[-l|--local-host]}} {{host}} {{[-t|--to]}} {{remote_server_address}} {{local_port}}`
|
||||
|
||||
- Specify a remote server port explicitly:
|
||||
|
||||
`bore local {{[-t|--to]}} {{remote_server_address}} {{[-p|--port]}} {{remote_port}} {{local_port}}`
|
||||
|
||||
- Use a secret for authentication:
|
||||
|
||||
`bore local {{[-t|--to]}} {{remote_server_address}} {{[-s|--secret]}} {{your_secret}} {{local_port}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`bore local {{[-h|--help]}}`
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zathura
|
||||
|
||||
> A vim-like modal document viewer, with an integrated command-line.
|
||||
> A Vim-like modal document viewer, with an integrated command-line.
|
||||
> Make sure a backend is installed (poppler, PostScript, or DjVu).
|
||||
> More information: <https://pwmt.org/projects/zathura/>.
|
||||
|
||||
|
||||
10
tldr/ruby
10
tldr/ruby
@@ -11,15 +11,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a Ruby script:
|
||||
|
||||
`ruby {{script.rb}}`
|
||||
`ruby {{path/to/script.rb}}`
|
||||
|
||||
- Execute a single Ruby command in the command-line:
|
||||
|
||||
`ruby -e {{command}}`
|
||||
`ruby -e "{{command}}"`
|
||||
|
||||
- Check for syntax errors on a given Ruby script:
|
||||
|
||||
`ruby -c {{script.rb}}`
|
||||
`ruby -c {{path/to/script.rb}}`
|
||||
|
||||
- Start the built-in HTTP server on port 8080 in the current directory:
|
||||
|
||||
@@ -29,6 +29,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ruby -I {{path/to/library_folder}} -r {{library_require_name}} {{path/to/bin_folder/bin_name}}`
|
||||
|
||||
- Display Ruby version:
|
||||
- Display version:
|
||||
|
||||
`ruby -v`
|
||||
`ruby {{[-v|--version]}}`
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run a Python script:
|
||||
|
||||
`uv run {{script.py}}`
|
||||
`uv run {{path/to/script.py}}`
|
||||
|
||||
- Run a Python module:
|
||||
|
||||
@@ -18,15 +18,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run a command with additional packages installed temporarily:
|
||||
|
||||
`uv run --with {{package}} {{command}}`
|
||||
`uv run {{[-w|--with]}} {{package}} {{command}}`
|
||||
|
||||
- Run a script with packages from a requirements file:
|
||||
|
||||
`uv run --with-requirements {{requirements.txt}} {{script.py}}`
|
||||
`uv run --with-requirements {{path/to/requirements.txt}} {{path/to/script.py}}`
|
||||
|
||||
- Run in an isolated environment (no project dependencies):
|
||||
|
||||
`uv run --isolated {{script.py}}`
|
||||
`uv run --isolated {{path/to/script.py}}`
|
||||
|
||||
- Run without syncing the environment first:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user