Update cheatsheets

This commit is contained in:
ivuorinen
2024-07-11 00:15:37 +00:00
parent 090c38f352
commit 750a1b15d0
13 changed files with 285 additions and 14 deletions

View File

@@ -8,18 +8,26 @@ source: https://github.com/tldr-pages/tldr.git
> Bash Automated Testing System: a TAP (<https://testanything.org/>) compliant testing framework for Bash.
> More information: <https://bats-core.readthedocs.io/en/stable/usage.html>.
- 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}}`

View File

@@ -8,22 +8,22 @@ source: https://github.com/tldr-pages/tldr.git
> Manipulate the UEFI Boot Manager.
> More information: <https://manned.org/efibootmgr>.
- 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}}`

View File

@@ -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: <https://gitlab.com/users/evlaV/projects>.
- Add a program to Steam library:
`steamos-add-to-steam {{path/to/file}}`

View File

@@ -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: <https://gitlab.com/users/evlaV/projects>.
- View SteamOS system information:
`sudo steamos-dump-info`

View File

@@ -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: <https://gitlab.com/users/evlaV/projects>.
- Set the filesystem to be mutable:
`sudo steamos-readonly disable`
- Set the filesystem to be read only:
`sudo steamos-readonly enable`

View File

@@ -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: <https://gitlab.com/users/evlaV/projects>.
- 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`

17
tldr/linux/steamos-update Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# steamos-update
> Update SteamOS.
> More information: <https://gitlab.com/users/evlaV/projects>.
- Update the operating system:
`steamos-update`
- Check if there is an update available:
`steamos-update check`

37
tldr/pixi Normal file
View File

@@ -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: <https://pixi.sh>.
- 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`

33
tldr/pixi-config Normal file
View File

@@ -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: <https://pixi.sh/latest/reference/cli/#config>.
- 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}}`

29
tldr/pixi-global Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pixi global
> Manage global packages.
> More information: <https://pixi.sh/latest/reference/cli/#global>.
- 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`

29
tldr/pixi-project Normal file
View File

@@ -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: <https://pixi.sh/latest/reference/cli/#project>.
- 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}}`

25
tldr/pixi-task Normal file
View File

@@ -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: <https://pixi.sh/latest/reference/cli/#task>.
- 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 ...}}`

25
tldr/terraform-output Normal file
View File

@@ -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: <https://developer.hashicorp.com/terraform/cli/commands/output>.
- 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`