diff --git a/tldr/ffmpeg b/tldr/ffmpeg index c30b7ba2..388fcce5 100644 --- a/tldr/ffmpeg +++ b/tldr/ffmpeg @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Save a video as GIF, scaling the height to 1000px and setting framerate to 15: -`ffmpeg -i {{path/to/video.mp4}} {{[-vf|-filter:v]}} 'scale=-1:{{1000}}' -r {{15}} {{path/to/output.gif}}` +`ffmpeg -i {{path/to/video.mp4}} {{[-vf|-filter:v]}} 'scale=-1:1000' -r 15 {{path/to/output.gif}}` - Combine numbered images (`frame_1.jpg`, `frame_2.jpg`, etc) into a video or GIF: diff --git a/tldr/linux/apptainer b/tldr/linux/apptainer new file mode 100644 index 00000000..a3051b05 --- /dev/null +++ b/tldr/linux/apptainer @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apptainer + +> Manage containers for HPC and scientific computing. +> Some subcommands such as `build`, `pull`, and `push` have their own usage documentation. +> More information: . + +- Download a container from Docker Hub: + +`apptainer pull {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- Download a container from the Container Library: + +`apptainer pull {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Build a container from a definition file: + +`apptainer build {{path/to/image.sif}} {{path/to/definition.def}}` + +- Start an interactive shell inside a container: + +`apptainer shell {{path/to/image.sif}}` + +- Execute a command inside a container: + +`apptainer exec {{path/to/image.sif}} {{command}}` + +- Run the default runscript of a container: + +`apptainer run {{path/to/image.sif}}` + +- Inspect a container's metadata: + +`apptainer inspect {{path/to/image.sif}}` + +- Display help: + +`apptainer {{[-h|--help]}}` diff --git a/tldr/linux/apptainer-build b/tldr/linux/apptainer-build new file mode 100644 index 00000000..05fa59af --- /dev/null +++ b/tldr/linux/apptainer-build @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apptainer build + +> Build Apptainer container images. +> More information: . + +- Build a container from a definition file: + +`apptainer build {{path/to/image.sif}} {{path/to/definition.def}}` + +- Build a container from Docker Hub: + +`apptainer build {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- Build a container from the Container Library: + +`apptainer build {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Build a writable [s]andbox directory instead of an image file: + +`apptainer build {{[-s|--sandbox]}} {{path/to/directory}} docker://{{image}}:{{tag}}` + +- Build a container without using the cache: + +`apptainer build --disable-cache {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- [F]orce overwrite an existing image file: + +`apptainer build {{[-F|--force]}} {{path/to/image.sif}} {{path/to/definition.def}}` + +- Build using [f]akeroot for unprivileged builds: + +`apptainer build {{[-f|--fakeroot]}} {{path/to/image.sif}} {{path/to/definition.def}}` + +- Display help: + +`apptainer build {{[-h|--help]}}` diff --git a/tldr/linux/apptainer-pull b/tldr/linux/apptainer-pull new file mode 100644 index 00000000..919c2416 --- /dev/null +++ b/tldr/linux/apptainer-pull @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apptainer pull + +> Pull container images from remote sources. +> See also: `apptainer-push`. +> More information: . + +- Pull a container from Docker Hub: + +`apptainer pull {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- Pull a container from the Container Library: + +`apptainer pull {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Pull a container from an OCI registry: + +`apptainer pull {{path/to/image.sif}} oras://{{registry/namespace/image}}:{{tag}}` + +- Pull a container for a specific architecture: + +`apptainer pull --arch {{amd64|arm64|ppc64le}} {{path/to/image.sif}} library://{{image}}:{{tag}}` + +- [F]orce overwrite an existing image file: + +`apptainer pull {{[-F|--force]}} {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- Pull a container as a writable sandbox directory: + +`apptainer pull --sandbox {{path/to/directory}} docker://{{image}}:{{tag}}` + +- Pull a container without using the cache: + +`apptainer pull --disable-cache {{path/to/image.sif}} docker://{{image}}:{{tag}}` + +- Display help: + +`apptainer pull {{[-h|--help]}}` diff --git a/tldr/linux/apptainer-push b/tldr/linux/apptainer-push new file mode 100644 index 00000000..9f5a9993 --- /dev/null +++ b/tldr/linux/apptainer-push @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apptainer push + +> Push container images to remote registries. +> See also: `apptainer-pull`. +> More information: . + +- Push a container to the Container Library: + +`apptainer push {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Push a container to an OCI registry: + +`apptainer push {{path/to/image.sif}} oras://{{registry/namespace/image}}:{{tag}}` + +- Push an [U]nsigned container (skip signature verification): + +`apptainer push {{[-U|--allow-unsigned]}} {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Push a container with a [D]escription (library only): + +`apptainer push {{[-D|--description]}} "{{description}}" {{path/to/image.sif}} library://{{user/collection/container}}:{{tag}}` + +- Display help: + +`apptainer push {{[-h|--help]}}` diff --git a/tldr/trdsql b/tldr/trdsql index a39bc87e..9ff6d7f6 100644 --- a/tldr/trdsql +++ b/tldr/trdsql @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Manipulate complex SQL query with data from multiple CSV files with first line is header (`-ih`): -`trdsql -icsv -ih "SELECT {{column1,column2}} FROM {{path/to/file*.csv}} WHERE column2 != '' ORDER BY column1 GROUP BY column1"` +`trdsql -icsv -ih "SELECT {{column1,column2}} FROM {{path/to/file*.csv}} WHERE column2 != '' ORDER BY {{column1}} GROUP BY {{column1}}"` - Merge content of 2 CSV files to one CSV file: