Update cheatsheets

This commit is contained in:
ivuorinen
2024-09-17 00:14:05 +00:00
parent c5566dcc1c
commit 467397e151
5 changed files with 80 additions and 3 deletions

18
tldr/az-serial-console Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# az serial-console
> Connect to the serial console of a Virtual Machine.
> Part of `azure-cli` (also known as `az`).
> More information: <https://learn.microsoft.com/cli/azure/serial-console>.
- Connect to a serial console:
`az serial-console connect --resource-group {{Resource_Group_Name}} --name {{Virtual_Machine_Name}}`
- Terminate the connection:
`<Ctrl>-]`

View File

@@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git
> Part of `azure-cli` (also known as `az`).
> More information: <https://learn.microsoft.com/cli/azure/vm>.
- List details of available Virtual Machines:
- Display a table of available Virtual Machines:
`az vm list`
`az vm list --output table`
- Create a virtual machine using the default Ubuntu image and generate SSH keys:

38
tldr/linux/chat Normal file
View File

@@ -0,0 +1,38 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# chat
> Automate conversations with a modem or serial device.
> Commonly used to establish PPP (Point-to-Point Protocol) connections.
> More information: <https://manned.org/chat.8>.
- Execute a chat script directly from the command line:
`chat '{{expect_send_pairs}}'`
- Execute a chat script from a file:
`chat -f '{{path/to/chat_script}}'`
- Set a custom timeout (in seconds) for expecting a response:
`chat -t {{timeout_in_seconds}} '{{expect_send_pairs}}'`
- Enable verbose output to log the conversation to `syslog`:
`chat -v '{{expect_send_pairs}}'`
- Use a report file to log specific strings received during the conversation:
`chat -r {{path/to/report_file}} '{{expect_send_pairs}}'`
- Dial a phone number using a variable, substituting `\T` in the script:
`chat -T '{{phone_number}}' '{{"ATDT\T CONNECT"}}'`
- Include an abort condition if a specific string is received:
`chat 'ABORT "{{error_string}}" {{expect_send_pairs}}'`

View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# mysql_secure_installation
> Set up MySQL to have better security.
> More information: <https://dev.mysql.com/doc/refman/en/mysql-secure-installation.html>.
- Start an interactive setup:
`mysql_secure_installation`
- Use specific host and port:
`mysql_secure_installation --host={{host}} --port={{port}}`
- Display help:
`mysql_secure_installation --help`

View File

@@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
- Extract a specific file from an archive:
`unzip -j {{path/to/archive.zip}} {{path/to/file_in_archive1 path/to/file_in_archive2 ...}}`
`unzip -j {{path/to/archive.zip}} {{path/to/file1_in_archive path/to/file2_in_archive ...}}`