From 467397e151d0a34f37c4a96d2b67501fa7080451 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 17 Sep 2024 00:14:05 +0000 Subject: [PATCH] Update cheatsheets --- tldr/az-serial-console | 18 ++++++++++++++++ tldr/az-vm | 4 ++-- tldr/linux/chat | 38 ++++++++++++++++++++++++++++++++++ tldr/mysql_secure_installation | 21 +++++++++++++++++++ tldr/unzip | 2 +- 5 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 tldr/az-serial-console create mode 100644 tldr/linux/chat create mode 100644 tldr/mysql_secure_installation diff --git a/tldr/az-serial-console b/tldr/az-serial-console new file mode 100644 index 00000000..c5f06944 --- /dev/null +++ b/tldr/az-serial-console @@ -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: . + +- Connect to a serial console: + +`az serial-console connect --resource-group {{Resource_Group_Name}} --name {{Virtual_Machine_Name}}` + +- Terminate the connection: + +`-]` diff --git a/tldr/az-vm b/tldr/az-vm index e6fcbaa8..adfe80cd 100644 --- a/tldr/az-vm +++ b/tldr/az-vm @@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git > Part of `azure-cli` (also known as `az`). > More information: . -- 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: diff --git a/tldr/linux/chat b/tldr/linux/chat new file mode 100644 index 00000000..e3f97282 --- /dev/null +++ b/tldr/linux/chat @@ -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: . + +- 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}}'` diff --git a/tldr/mysql_secure_installation b/tldr/mysql_secure_installation new file mode 100644 index 00000000..adb42073 --- /dev/null +++ b/tldr/mysql_secure_installation @@ -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: . + +- 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` diff --git a/tldr/unzip b/tldr/unzip index a150ba4f..74eca4d7 100644 --- a/tldr/unzip +++ b/tldr/unzip @@ -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 ...}}`