From 2e67fbcfac3fb5626637acf13cb8c2964dea2127 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 1 Dec 2024 00:22:32 +0000 Subject: [PATCH] Update cheatsheets --- tldr/incus | 41 ++++++++++++++++++++++++++++++++++++++ tldr/linux/darling | 25 +++++++++++++++++++++++ tldr/linux/emerge | 12 +++++------ tldr/linux/imv | 35 ++++++++++++++++++++++++++++++++ tldr/linux/pacman-f | 12 +++++++++++ tldr/linux/pacman-files | 20 +++++++++---------- tldr/linux/readcd | 13 ++++++++++++ tldr/linux/wf-recorder | 22 ++++++++++++++++++++ tldr/pulumi-gen-completion | 14 +++++++++++++ 9 files changed, 178 insertions(+), 16 deletions(-) create mode 100644 tldr/incus create mode 100644 tldr/linux/darling create mode 100644 tldr/linux/imv create mode 100644 tldr/linux/pacman-f create mode 100644 tldr/linux/readcd create mode 100644 tldr/linux/wf-recorder create mode 100644 tldr/pulumi-gen-completion diff --git a/tldr/incus b/tldr/incus new file mode 100644 index 00000000..cbce577d --- /dev/null +++ b/tldr/incus @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# incus + +> Modern, secure and powerful system container and virtual machine manager. +> More information: . + +- List all containers and virtual machines (both running and stopped): + +`incus list` + +- Create a container from an image, with a custom name: + +`incus create {{image}} {{container_name}}` + +- Start or stop an existing container: + +`incus {{start|stop}} {{container_name}}` + +- Open a shell inside an already running container: + +`incus shell {{container_name}}` + +- Remove a stopped container: + +`incus delete {{container_name}}` + +- Pull an image from an image repository (remote) to local: + +`incus copy {{remote}}:{{image}} local:{{custom_image_name}}` + +- List all available images in the official `images:` remote: + +`incus image list images:` + +- List all images already downloaded to the `local:` remote: + +`incus image list local:` diff --git a/tldr/linux/darling b/tldr/linux/darling new file mode 100644 index 00000000..05a26642 --- /dev/null +++ b/tldr/linux/darling @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# darling + +> Run macOS software on Linux. +> More information: . + +- Run a builtin command: + +`darling shell {{uname}}` + +- Run a specific program in the current path with arguments: + +`darling shell {{./program}} {{program_argument_1 program_argument_2 ...}}` + +- Open a macOS shell: + +`darling shell` + +- Shutdown the service: + +`darling shutdown` diff --git a/tldr/linux/emerge b/tldr/linux/emerge index 5204f8d5..85124ad4 100644 --- a/tldr/linux/emerge +++ b/tldr/linux/emerge @@ -11,27 +11,27 @@ source: https://github.com/tldr-pages/tldr.git - Synchronize all packages: -`emerge --sync` +`sudo emerge --sync` - Update all packages, including dependencies: -`emerge -uDNav @world` +`sudo emerge -uDNav @world` - Resume a failed updated, skipping the failing package: -`emerge --resume --skipfirst` +`sudo emerge --resume --skipfirst` - Install a new package, with confirmation: -`emerge -av {{package}}` +`sudo emerge -av {{package}}` - Remove a package, with confirmation: -`emerge -Cav {{package}}` +`sudo emerge -Cav {{package}}` - Remove orphaned packages (that were installed only as dependencies): -`emerge -avc` +`sudo emerge -avc` - Search the package database for a keyword: diff --git a/tldr/linux/imv b/tldr/linux/imv new file mode 100644 index 00000000..a6520b80 --- /dev/null +++ b/tldr/linux/imv @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# imv + +> CLI image viewer for wayland and X11 aimed at tiling window managers. +> Handles multiple formats including Photoshop (PSD). +> More information: . + +- View multiple images: + +`imv {{path/to/image1.ext path/to/image2.ext ...}}` + +- View in fullscreen mode: + +`imv -f {{path/to/image.ext}}` + +- View images [r]ecursively from a path: + +`imv -r --slideshow {{path/to/path}}` + +- Open multiple images via `stdin`: + +`find . -type f -name "{{*.svg}}" | imv` + +- Make a slideshow from a directory showing each image for 10 seconds: + +`imv -t 10 {{path/to/directory}}` + +- View multiple images from the web: + +`curl -Osw '%{filename_effective} +' '{{http://www.example.com/[1-10].jpg}}' | imv` diff --git a/tldr/linux/pacman-f b/tldr/linux/pacman-f new file mode 100644 index 00000000..f7d4d7d3 --- /dev/null +++ b/tldr/linux/pacman-f @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pacman -F + +> This command is an alias of `pacman --files`. + +- View documentation for the original command: + +`tldr pacman files` diff --git a/tldr/linux/pacman-files b/tldr/linux/pacman-files index a9de725c..cc383802 100644 --- a/tldr/linux/pacman-files +++ b/tldr/linux/pacman-files @@ -11,24 +11,24 @@ source: https://github.com/tldr-pages/tldr.git - Update the package database: -`sudo pacman --files --refresh` +`sudo pacman -Fy` -- Find the package that owns a specific file: +- Find the package that owns a specific [F]ile: -`pacman --files {{filename}}` +`pacman -F {{filename}}` -- Find the package that owns a specific file, using a regular expression: +- Find the package that owns a specific [F]ile, using a regular e[x]pression: -`pacman --files --regex '{{regular_expression}}'` +`pacman -Fx '{{regular_expression}}'` - List only the package names: -`pacman --files --quiet {{filename}}` +`pacman -Fq {{filename}}` -- List the files owned by a specific package: +- [l]ist the [F]iles owned by a specific package: -`pacman --files --list {{package}}` +`pacman -Fl {{package}}` -- Display help: +- Display [h]elp: -`pacman --files --help` +`pacman -Fh` diff --git a/tldr/linux/readcd b/tldr/linux/readcd new file mode 100644 index 00000000..e3dbb517 --- /dev/null +++ b/tldr/linux/readcd @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# readcd + +> Read or write Compact Disc media data. +> More information: . + +- Read a cd and copy it to a file: + +`readcd dev={{/dev/srX}} f={{path/to/file.iso}}` diff --git a/tldr/linux/wf-recorder b/tldr/linux/wf-recorder new file mode 100644 index 00000000..32c776fd --- /dev/null +++ b/tldr/linux/wf-recorder @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# wf-recorder + +> Screencast for Wayland optionally with audio. +> By default you need to end the process with Ctrl-C. +> More information: . + +- Record storing to an MP4 file: + +`wf-recorder --file={{output.mp4}}` + +- Record including audio, both with mic and system sounds: + +`wf-recorder --audio --file={{/path/to/file_with_audio.webm}}` + +- Select and record a portion of the screen using `slurp`, outputting to default `recording.mp4`: + +`wf-recorder -g "$(slurp)"` diff --git a/tldr/pulumi-gen-completion b/tldr/pulumi-gen-completion new file mode 100644 index 00000000..aca26963 --- /dev/null +++ b/tldr/pulumi-gen-completion @@ -0,0 +1,14 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pulumi gen-completion + +> Generate completion scripts for the Pulumi CLI. +> Supported shells are bash, zsh, fish. +> More information: . + +- Generate completion scripts: + +`pulumi gen-completion {{bash|zsh|fish}}`