Skip to content

Instantly share code, notes, and snippets.

My youtube-dl scripts

  • video-dl - download videos via yt-dlp using aria2c with multiple connections.
  • playlist-dl - download playlist into folder using video-dl.

Works in WSL2.

Installation:

curl https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
sudo mv yt-dlp /usr/bin
@ivanstepanovftw
ivanstepanovftw / test_compression.sh
Created November 13, 2022 16:05
Test compression algorithms
#!/usr/bin/env bash
# FIXME: Untested!
function compress() {
input="$1"
output="$(basename "$input")"
command -v lz4 && lz4 -1 "$input" "$output.1.lz4"
command -v lz4 && lz4 -9 "$input" "$output.9.lz4"
command -v gzip && gzip -1 -k -c "$input" > "$output.1.gzip"
command -v gzip && gzip -9 -k -c "$input" > "$output.9.gzip"
@ivanstepanovftw
ivanstepanovftw / # Gtk3 Theme Change Event Example.md
Last active November 13, 2022 16:20
Gtk3 on theme change event example for GNOME DE C++
@ivanstepanovftw
ivanstepanovftw / # My Manjaro GNOME post-install setup.md
Last active March 21, 2023 10:23
My opinioned Manjaro GNOME post-setup routine

My Manjaro GNOME post-install setup

@ivanstepanovftw
ivanstepanovftw / # Custom Toric Contact Lenses Calculation.md
Last active February 13, 2025 00:09
Calculate lens BC (base curve) and diameter based on K readings (keratometry readings).

Custom Toric Contact Lenses Calculation

Calculate lens base curve and diameter based on keratometry readings.

BC and dia calculation algorithm is based on Soft Special Edition – Base Curve.

@ivanstepanovftw
ivanstepanovftw / # Bash Error & Backtrace Function Function.md
Last active August 29, 2023 22:40
Bash Error & Backtrace Function

Bash Error & Backtrace Function

./error.sh

variable="$(echo INJECTED | base64)"
variable='$(echo '"$variable"' | base64 --decode)'
error
error "$variable     foo"
error '  foo"bar  ' $'\n''\nbaz)'
@ivanstepanovftw
ivanstepanovftw / # No Sound From Java Application Fix.md
Last active November 13, 2022 16:26
No Sound From Java Application Fix

No Sound From Java Application Fix

If you cannot hear any sound from JavaFX or any java application, try to run this.

Keywords:

javax.sound.sampled.Clip javafx.scene.media.Media javafx.scene.media.MediaPlayer java sound is not playing javafx no sound javax

VMWare tools not working after reboot

If VMWare tools not working after reboot:

sudo systemctl restart vmtoolsd

To solve issue: System Settins | Startup and Shutdows | Desktop Session -> Start with an empty session

@ivanstepanovftw
ivanstepanovftw / crlf2lf
Created September 22, 2019 20:24
CRLF to LF
#!/usr/bin/env bash
perl -pi -e 's/\r\n/\n/g; $rv=1 if $&; END{ exit $1rv }' $1