Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-15 00:18:14 +00:00
parent 605e1cdfd8
commit 367b1e4cb2
7 changed files with 56 additions and 23 deletions

33
tldr/bacon Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bacon
> A background code checker for Rust.
> More information: <https://github.com/Canop/bacon>.
- Run `cargo check` whenever a change is detected in the current directory:
`bacon`
- Run `cargo test` whenever a change is detected in the given directory:
`bacon test {{path/to/directory}}`
- Run `cargo check` against all targets whenever a change is detected in the current directory:
`bacon check-all`
- Run a specific job whenever a change is detected in the current directory:
`bacon {{run|test|clippy|doc|...}}`
- List all currently available jobs:
`bacon --list-jobs`
- Initialize a `bacon.toml` configuration file in the current directory:
`bacon --init`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Print specific parts of the content (`H`: request headers, `B`: request body, `h`: response headers, `b`: response body, `m`: response metadata):
`http --print {{H|B|h|b|m|Hh|Hhb|...}} {{https://example.com}}`
`http {{[-p|--print]}} {{H|B|h|b|m|Hh|Hhb|...}} {{https://example.com}}`
- Specify the HTTP method when sending a request and use a proxy to intercept the request:
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Authenticate to a server using different authentication methods:
`http --auth {{username:password|token}} --auth-type {{basic|digest|bearer}} {{GET|POST|...}} {{https://example.com/auth}}`
`http {{[-a|--auth]}} {{username:password|token}} {{[-A|--auth-type]}} {{basic|digest|bearer}} {{GET|POST|...}} {{https://example.com/auth}}`
- Construct a request but do not send it (similar to a dry-run):
@@ -34,8 +34,8 @@ source: https://github.com/tldr-pages/tldr.git
- Use named sessions for persistent custom headers, auth credentials and cookies:
`http --session {{session_name|path/to/session.json}} {{--auth username:password https://example.com/auth API-KEY:xxx}}`
`http --session {{session_name|path/to/session.json}} {{[-a|--auth]}} {{username}}:{{password}} {{https://example.com/auth}} {{API-KEY:xxx}}`
- Upload a file to a form (the example below assumes that the form field is `<input type="file" name="cv" />`):
`http --form {{POST}} {{https://example.com/upload}} {{cv@path/to/file}}`
`http {{[-f|--form]}} {{POST}} {{https://example.com/upload}} {{cv@path/to/file}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Add or delete an ARP entry for the neighbour IP address to `eth0`:
`sudo ip {{[n|neighbour]}} {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable`
`sudo ip {{[n|neighbour]}} {{add|delete}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable`
- Change or replace an ARP entry for the neighbour IP address to `eth0`:

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- List a password protected archive file's contents:
`lsar {{path/to/archive}} --password {{password}}`
`lsar {{path/to/archive}} {{[-p|--password]}} {{password}}`
- Print al[L] available information about each file in the archive (it's very long):
@@ -23,12 +23,12 @@ source: https://github.com/tldr-pages/tldr.git
- Test the integrity of the files in the archive (if possible):
`lsar --test {{path/to/archive}}`
`lsar {{[-t|--test]}} {{path/to/archive}}`
- List the archive file's contents in JSON format:
`lsar --json {{path/to/archive}}`
`lsar {{[-j|--json]}} {{path/to/archive}}`
- Display help:
`lsar --help`
`lsar {{-h|--help}}`

View File

@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
- Track and terminate the process after prolonged suspension:
`ntfyme exec {{-t|--track-process}} {{[-c|--cmd]}} {{command}}`
`ntfyme exec {{[-t|--track-process]}} {{[-c|--cmd]}} {{command}}`
- Setup the tool configurations interactively:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Same as above, customize host and port:
`pg_dumpall -h {{host}} -p {{port}} > {{output_file.sql}}`
`pg_dumpall {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} > {{output_file.sql}}`
- Dump only database data into an SQL-script file:
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Dump only schema (data definitions) into an SQL-script file:
`pg_dumpall -s > {{output_file.sql}}`
`pg_dumpall {{[-s|--schema-only]}} > {{output_file.sql}}`

View File

@@ -17,26 +17,26 @@ source: https://github.com/tldr-pages/tldr.git
`tldr {{command}} {{subcommand}}`
- Print the tldr page for a command in the given [L]anguage (if available, otherwise fall back to English):
- Print the tldr page for a command in the given language (if available, otherwise fall back to English):
`tldr --language {{language_code}} {{command}}`
`tldr {{[-L|--language]}} {{language_code}} {{command}}`
- Print the tldr page for a command from a specific [p]latform:
- Print the tldr page for a command from a specific platform:
`tldr --platform {{android|common|freebsd|linux|osx|netbsd|openbsd|sunos|windows}} {{command}}`
`tldr {{[-p|--platform]}} {{android|common|freebsd|linux|osx|netbsd|openbsd|sunos|windows}} {{command}}`
- [u]pdate the local cache of tldr pages:
- Update the local cache of tldr pages:
`tldr --update`
`tldr {{[-u|--update]}}`
- [l]ist all pages for the current platform and `common`:
- List all pages for the current platform and `common`:
`tldr --list`
`tldr {{[-l|--list]}}`
- [l]ist all available subcommand pages for a command:
- List all available subcommand pages for a command:
`tldr --list | grep {{command}} | column`
`tldr {{[-l|--list]}} | grep {{command}} | column`
- Print the tldr page for a random command:
`tldr --list | shuf -n1 | xargs tldr`
`tldr {{[-l|--list]}} | shuf {{[-n|--head-count]}} 1 | xargs tldr`