From 367b1e4cb213ae7a88ab410e013d065af4b1c96c Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 15 Mar 2025 00:18:14 +0000 Subject: [PATCH] Update cheatsheets --- tldr/bacon | 33 +++++++++++++++++++++++++++++++++ tldr/http | 8 ++++---- tldr/linux/ip-neighbour | 2 +- tldr/lsar | 8 ++++---- tldr/ntfyme | 2 +- tldr/pg_dumpall | 4 ++-- tldr/tldr | 22 +++++++++++----------- 7 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 tldr/bacon diff --git a/tldr/bacon b/tldr/bacon new file mode 100644 index 00000000..753d5d60 --- /dev/null +++ b/tldr/bacon @@ -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: . + +- 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` diff --git a/tldr/http b/tldr/http index 347a43af..6d48a088 100644 --- a/tldr/http +++ b/tldr/http @@ -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 ``): -`http --form {{POST}} {{https://example.com/upload}} {{cv@path/to/file}}` +`http {{[-f|--form]}} {{POST}} {{https://example.com/upload}} {{cv@path/to/file}}` diff --git a/tldr/linux/ip-neighbour b/tldr/linux/ip-neighbour index f1c1d6ef..10ecc6ef 100644 --- a/tldr/linux/ip-neighbour +++ b/tldr/linux/ip-neighbour @@ -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`: diff --git a/tldr/lsar b/tldr/lsar index b7e7e0a3..ccf2de34 100644 --- a/tldr/lsar +++ b/tldr/lsar @@ -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}}` diff --git a/tldr/ntfyme b/tldr/ntfyme index fe159676..2968e11b 100644 --- a/tldr/ntfyme +++ b/tldr/ntfyme @@ -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: diff --git a/tldr/pg_dumpall b/tldr/pg_dumpall index 37b1d7db..84b895ba 100644 --- a/tldr/pg_dumpall +++ b/tldr/pg_dumpall @@ -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}}` diff --git a/tldr/tldr b/tldr/tldr index b7eb6800..2660565f 100644 --- a/tldr/tldr +++ b/tldr/tldr @@ -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`