From 750a1b15d0b066ea7dfcb126486cd25e58252349 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 11 Jul 2024 00:15:37 +0000 Subject: [PATCH] Update cheatsheets --- tldr/bats | 18 ++++++++++----- tldr/linux/efibootmgr | 18 +++++++-------- tldr/linux/steamos-add-to-steam | 13 +++++++++++ tldr/linux/steamos-dump-info | 13 +++++++++++ tldr/linux/steamos-readonly | 17 ++++++++++++++ tldr/linux/steamos-session-select | 25 +++++++++++++++++++++ tldr/linux/steamos-update | 17 ++++++++++++++ tldr/pixi | 37 +++++++++++++++++++++++++++++++ tldr/pixi-config | 33 +++++++++++++++++++++++++++ tldr/pixi-global | 29 ++++++++++++++++++++++++ tldr/pixi-project | 29 ++++++++++++++++++++++++ tldr/pixi-task | 25 +++++++++++++++++++++ tldr/terraform-output | 25 +++++++++++++++++++++ 13 files changed, 285 insertions(+), 14 deletions(-) create mode 100644 tldr/linux/steamos-add-to-steam create mode 100644 tldr/linux/steamos-dump-info create mode 100644 tldr/linux/steamos-readonly create mode 100644 tldr/linux/steamos-session-select create mode 100644 tldr/linux/steamos-update create mode 100644 tldr/pixi create mode 100644 tldr/pixi-config create mode 100644 tldr/pixi-global create mode 100644 tldr/pixi-project create mode 100644 tldr/pixi-task create mode 100644 tldr/terraform-output diff --git a/tldr/bats b/tldr/bats index 22a6bdda..c2bb9e60 100644 --- a/tldr/bats +++ b/tldr/bats @@ -8,18 +8,26 @@ source: https://github.com/tldr-pages/tldr.git > Bash Automated Testing System: a TAP () compliant testing framework for Bash. > More information: . -- Run a BATS test script and output results in the TAP (Test Anything Protocol) format: +- Run a BATS test script and output results in the [t]AP (Test Anything Protocol) format: `bats --tap {{path/to/test.bats}}` -- Count test cases of a test script without running any tests: +- [c]ount test cases of a test script without running any tests: `bats --count {{path/to/test.bats}}` -- Run BATS test cases contained in a directory and its subdirectories (files with a `.bats` extension): +- Run BATS test cases [r]ecursively (files with a `.bats` extension): `bats --recursive {{path/to/directory}}` -- Output results in a specific format: +- Output results in a specific [F]ormat: -`bats --formatter {{pretty|tap|junit}} {{path/to/test.bats}}` +`bats --formatter {{pretty|tap|tap13|junit}} {{path/to/test.bats}}` + +- Add [T]iming information to tests: + +`bats --timing {{path/to/test.bats}}` + +- Run specific number of [j]obs in parallel (requires GNU `parallel` to be installed): + +`bats --jobs {{number}} {{path/to/test.bats}}` diff --git a/tldr/linux/efibootmgr b/tldr/linux/efibootmgr index 9691fdd2..2a51f1fe 100644 --- a/tldr/linux/efibootmgr +++ b/tldr/linux/efibootmgr @@ -8,22 +8,22 @@ source: https://github.com/tldr-pages/tldr.git > Manipulate the UEFI Boot Manager. > More information: . -- List the current settings then bootnums with their name: +- List all boot options with their numbers: -`efibootmgr` - -- List the filepaths: - -`efibootmgr -v` +`efibootmgr {{-u|--unicode}}` - Add UEFI Shell v2 as a boot option: -`sudo efibootmgr -c -d {{/dev/sda1}} -l {{FI ools\Shell.efi}} -L "{{UEFI Shell}}"` +`sudo efibootmgr -c -d {{/dev/sda}} -p {{1}} -l "{{\path o\shell.efi}}" -L "{{UEFI Shell}}"` + +- Add Linux as a boot option: + +`sudo efibootmgr --create --disk {{/dev/sda}} --part {{1}} --loader "{{ mlinuz}}" --unicode "{{kernel_cmdline}}" --label "{{Linux}}"` - Change the current boot order: -`sudo efibootmgr -o {{0002,0008,0001,0005}}` +`sudo efibootmgr {{-o|--bootorder}} {{0002,0008,0001,0005}}` - Delete a boot option: -`sudo efibootmgr -b {{0008}} --delete-bootnum` +`sudo efibootmgr {{-b|--bootnum}} {{0008}} {{-B|--delete-bootnum}}` diff --git a/tldr/linux/steamos-add-to-steam b/tldr/linux/steamos-add-to-steam new file mode 100644 index 00000000..675739c7 --- /dev/null +++ b/tldr/linux/steamos-add-to-steam @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-add-to-steam + +> Add a program to Steam library. +> More information: . + +- Add a program to Steam library: + +`steamos-add-to-steam {{path/to/file}}` diff --git a/tldr/linux/steamos-dump-info b/tldr/linux/steamos-dump-info new file mode 100644 index 00000000..013700ce --- /dev/null +++ b/tldr/linux/steamos-dump-info @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-dump-info + +> View SteamOS system information. +> More information: . + +- View SteamOS system information: + +`sudo steamos-dump-info` diff --git a/tldr/linux/steamos-readonly b/tldr/linux/steamos-readonly new file mode 100644 index 00000000..a5937619 --- /dev/null +++ b/tldr/linux/steamos-readonly @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-readonly + +> Set the readonly status of the filesystem. +> More information: . + +- Set the filesystem to be mutable: + +`sudo steamos-readonly disable` + +- Set the filesystem to be read only: + +`sudo steamos-readonly enable` diff --git a/tldr/linux/steamos-session-select b/tldr/linux/steamos-session-select new file mode 100644 index 00000000..d4a6533e --- /dev/null +++ b/tldr/linux/steamos-session-select @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-session-select + +> Manipulate which session is currently in use. +> More information: . + +- Change to desktop mode: + +`steamos-session-select plasma` + +- Change to gamemode: + +`steamos-session-select gamescope` + +- Change to Wayland desktop mode: + +`steamos-session-select plasma-wayland-persistent` + +- Change to X11 desktop mode: + +`steamos-session-select plasma-x11-persistent` diff --git a/tldr/linux/steamos-update b/tldr/linux/steamos-update new file mode 100644 index 00000000..0404ab68 --- /dev/null +++ b/tldr/linux/steamos-update @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# steamos-update + +> Update SteamOS. +> More information: . + +- Update the operating system: + +`steamos-update` + +- Check if there is an update available: + +`steamos-update check` diff --git a/tldr/pixi b/tldr/pixi new file mode 100644 index 00000000..f1642e59 --- /dev/null +++ b/tldr/pixi @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pixi + +> Developer Workflow and Environment Management for projects. +> More information: . + +- Initialize a new project: + +`pixi init {{path/to/project}}` + +- Add project dependencies: + +`pixi add {{dependency1 dependency2 ...}}` + +- Start a pixi shell in the project environment: + +`pixi shell` + +- Run a task in the project environment: + +`pixi run {{task}}` + +- Manage tasks in the project environment: + +`pixi task {{command}}` + +- Print the help message: + +`pixi {{command}} --help` + +- Clean environment and task cache: + +`pixi clean` diff --git a/tldr/pixi-config b/tldr/pixi-config new file mode 100644 index 00000000..aac7ed15 --- /dev/null +++ b/tldr/pixi-config @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pixi config + +> Manage the configuration file. +> More information: . + +- Edit the configuration file: + +`pixi config edit` + +- List all configurations: + +`pixi config list` + +- Prepend a value to a list configuration key: + +`pixi config prepend {{key}} {{value}}` + +- Append a value to a list configuration key: + +`pixi config append {{key}} {{value}}` + +- Set a configuration key to a value: + +`pixi config set {{key}} {{value}}` + +- Unset a configuration key: + +`pixi config unset {{key}}` diff --git a/tldr/pixi-global b/tldr/pixi-global new file mode 100644 index 00000000..8c3b398e --- /dev/null +++ b/tldr/pixi-global @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pixi global + +> Manage global packages. +> More information: . + +- Install a package globally and add to path: + +`pixi global install {{package1 package2 ...}}` + +- Uninstall a package globally: + +`pixi global remove {{package1 package2 ...}}` + +- List all globally installed packages: + +`pixi global list` + +- Update a globally installed package: + +`pixi global upgrade {{package}}` + +- Update all globally installed packages: + +`pixi global upgrade-all` diff --git a/tldr/pixi-project b/tldr/pixi-project new file mode 100644 index 00000000..73227fcb --- /dev/null +++ b/tldr/pixi-project @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pixi project + +> Modify the project configuration file. +> More information: . + +- Manage project channels: + +`pixi project channel {{command}}` + +- Manage project description: + +`pixi project description {{command}}` + +- Manage project platform: + +`pixi project platform {{command}}` + +- Manage project version: + +`pixi project version {{command}}` + +- Manage project environment: + +`pixi project environment {{command}}` diff --git a/tldr/pixi-task b/tldr/pixi-task new file mode 100644 index 00000000..c52b4726 --- /dev/null +++ b/tldr/pixi-task @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pixi task + +> Manage tasks in the project environment. +> More information: . + +- Create a new task: + +`pixi task add {{task_name}} {{task_command}}` + +- List all tasks in the project: + +`pixi task list` + +- Remove a task: + +`pixi task remove {{task_name}}` + +- Create an alias for a task: + +`pixi task alias {{alias_name}} {{task1 task2 ...}}` diff --git a/tldr/terraform-output b/tldr/terraform-output new file mode 100644 index 00000000..dc4f716a --- /dev/null +++ b/tldr/terraform-output @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# terraform output + +> Export structured data about your Terraform resources. +> More information: . + +- With no additional arguments, `output` will display all outputs for the root module: + +`terraform output` + +- Output only a value with specific name: + +`terraform output {{name}}` + +- Convert the output value to a raw string (useful for shell scripts): + +`terraform output -raw` + +- Format the outputs as a JSON object, with a key per output (useful with jq): + +`terraform output -json`