Update cheatsheets

This commit is contained in:
ivuorinen
2024-12-22 00:19:26 +00:00
parent 212b0d47b3
commit 7c0dbb8ba5
4 changed files with 55 additions and 25 deletions

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# speedtest
> Official command-line interface for testing internet bandwidth using <https://speedtest.net>.
> Note: some platforms link `speedtest` to `speedtest-cli`. If some of the examples in this page don't work, see `speedtest-cli`.
> Note: some platforms link `speedtest` to `speedtest-cli` or other tools like `librespeed`, which can also be installed as `speedtest` on certain Linux distributions.
> These command examples apply only to the official client.
> More information: <https://www.speedtest.net/apps/cli>.
- Run a speed test:

33
tldr/speedtest-rs Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# speedtest-rs
> An unofficial Rust-based tool for testing network speeds using speedtest.net, limited to HTTP Legacy Fallback.
> More information: <https://github.com/nelsonjchen/speedtest-rs>.
- Run a full speed test (download and upload):
`speedtest-rs`
- Display a list of `speedtest.net` servers sorted by distance:
`speedtest-rs --list`
- Run a download test only:
`speedtest-rs --no-upload`
- Run an upload test only:
`speedtest-rs --no-download`
- Generate a shareable link to the test results image:
`speedtest-rs --share`
- Display basic output information only:
`speedtest-rs --simple`

View File

@@ -5,29 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
---
# typeset
> Declare variables and give them attributes.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins>.
> This command is an alias of `declare`.
- Declare a string variable with the specified value:
- View documentation for the original command:
`typeset {{variable}}="{{value}}"`
- Declare an integer variable with the specified value:
`typeset -i {{variable}}="{{value}}"`
- Declare an array variable with the specified value:
`typeset {{variable}}=({{item_a item_b item_c}})`
- Declare an associative array variable with the specified value:
`typeset -A {{variable}}=({{[key_a]=item_a [key_b]=item_b [key_c]=item_c}})`
- Declare a readonly variable with the specified value:
`typeset -r {{variable}}="{{value}}"`
- Declare a global variable within a function with the specified value:
`typeset -g {{variable}}="{{value}}"`
`tldr declare`

17
tldr/until Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# until
> Simple shell loop that repeats until it receives zero as return value.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-until>.
- Execute a command until it succeeds:
`until {{command}}; do :; done`
- Wait for a systemd service to be active:
`until systemctl is-active --quiet {{nginx}}; do {{echo "Waiting..."}}; sleep 1; done; {{echo "Launched!"}}`