From 11ed40e427fe46c5a95225dbed7348aa7e47d93b Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 5 Jun 2024 00:14:05 +0000 Subject: [PATCH] Update cheatsheets --- tldr/devenv | 33 +++++++++++++++++++++++++++++++++ tldr/linux/pw-metadata | 38 ++++++++++++++++++++++++++++++++++++++ tldr/mpv | 2 +- tldr/typeinc | 26 ++++++++++++++++++++++++++ tldr/yt-dlp | 12 ++++-------- 5 files changed, 102 insertions(+), 9 deletions(-) create mode 100644 tldr/devenv create mode 100644 tldr/linux/pw-metadata create mode 100644 tldr/typeinc diff --git a/tldr/devenv b/tldr/devenv new file mode 100644 index 00000000..eb0905a2 --- /dev/null +++ b/tldr/devenv @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# devenv + +> Fast, Declarative, Reproducible and Composable Developer Environments using Nix. +> More information: . + +- Initialise the environment: + +`devenv init` + +- Enter the Development Environment with relaxed hermeticity (state of being airtight): + +`devenv shell --impure` + +- Get detailed information about the current environment: + +`devenv info --verbose` + +- Start processes with `devenv`: + +`devenv up --config /{{file}}/{{path}}/` + +- Clean the environment variables and re-enter the shell in offline mode: + +`devenv --clean --offline` + +- Delete the previous shell generations: + +`devenv gc` diff --git a/tldr/linux/pw-metadata b/tldr/linux/pw-metadata new file mode 100644 index 00000000..e91e5a5b --- /dev/null +++ b/tldr/linux/pw-metadata @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pw-metadata + +> Monitor, set, and delete metadata on PipeWire objects. +> See also: `pipewire`, `pw-mon`, `pw-cli`. +> More information: . + +- Show metadata in `default` name: + +`pw-metadata` + +- Show metadata with ID 0 in `settings`: + +`pw-metadata {{-n|--name}} {{settings}} {{0}}` + +- List all available metadata objects: + +`pw-metadata {{-l|--list}}` + +- Keep running and log the changes to the metadata: + +`pw-metadata {{-m|--monitor}}` + +- Delete all metadata: + +`pw-metadata {{-d|--delete}}` + +- Set `log.level` to 1 in `settings`: + +`pw-metadata --name {{settings}} {{0}} {{log.level}} {{1}}` + +- Display help: + +`pw-metadata --help` diff --git a/tldr/mpv b/tldr/mpv index 4ac2b362..ffe5156f 100644 --- a/tldr/mpv +++ b/tldr/mpv @@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git - Play a file at a specified speed (1 by default): -`mpv --speed {{0.01..100}} {{path/to/file}}` +`mpv --speed={{0.01..100}} {{path/to/file}}` - Play a file using a profile defined in the `mpv.conf` file: diff --git a/tldr/typeinc b/tldr/typeinc new file mode 100644 index 00000000..f9b6ceb0 --- /dev/null +++ b/tldr/typeinc @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# typeinc + +> An `ncurses` based terminal typing speed test program, written in python. +> Try out different difficulty levels and improve your typing speed. +> More information: . + +- Enter the typing test: + +`typeinc` + +- Display the top 10 [r]anklist for input difficulty level: + +`typeinc --ranklist {{difficulty_level}}` + +- Get random English [w]ords present in our wordlist: + +`typeinc --words {{word_count}}` + +- Calculate hypothetical Typeinc [s]core: + +`typeinc --score` diff --git a/tldr/yt-dlp b/tldr/yt-dlp index 9cdcc51d..a691c3fe 100644 --- a/tldr/yt-dlp +++ b/tldr/yt-dlp @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git `yt-dlp --list-formats "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"` -- Download a video with a defined format, in this case the best mp4 video available (default is "bv\*+ba/b"): +- Download a video or playlist using the best MP4 video available (default is "bv\*+ba/b"): `yt-dlp --format "{{bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]}}" "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"` @@ -30,14 +30,10 @@ source: https://github.com/tldr-pages/tldr.git `yt-dlp --extract-audio --audio-format {{mp3}} --audio-quality {{0}} "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"` -- Download all playlists of YouTube channel/user keeping each playlist in separate directory: +- Download all playlists of a YouTube channel/user keeping each playlist in a separate directory: `yt-dlp -o "{{%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s}}" "{{https://www.youtube.com/user/TheLinuxFoundation/playlists}}"` -- Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home: +- Download a Udemy course keeping each chapter in a separate directory: -`yt-dlp -u {{user}} -p {{password}} -P "{{~/MyVideos}}" -o "{{%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s}}" "{{https://www.udemy.com/java-tutorial}}"` - -- Download entire series season keeping each series and each season in separate directory under C:/MyVideos: - -`yt-dlp -P "{{C:/MyVideos}}" -o "{{%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s}}" "{{https://videomore.ru/kino_v_detalayah/5_sezon/367617}}"` +`yt-dlp -u {{user}} -p {{password}} -P "{{path/to/directory}}" -o "{{%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s}}" "{{https://www.udemy.com/java-tutorial}}"`