Skip to content

Instantly share code, notes, and snippets.

@i2van
i2van / far2l
Created April 8, 2024 05:28
far2l WSL2 bash script
#!/bin/bash
case "$1" in
get)
#/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe Get-Clipboard | sed 's/\r//'
pwsh -Command Get-Clipboard -Raw
;;
set)
/mnt/c/Windows/System32/clip.exe
;;
@i2van
i2van / BlueStacks.bat
Last active February 23, 2024 20:38
Suspend/resume BlueStacks
:: Suspend/resume BlueStacks process.
:: Requires Sysinternals PsTools:
:: https://learn.microsoft.com/en-us/sysinternals/downloads/pstools
@echo off
set processName=HD-Player
set idFile="%~dpn0.txt"
set findStr=find /c /i
set psCommon=-nobanner
@i2van
i2van / dl.bat
Last active June 8, 2023 18:28
Windows batch script for downloading video using yt-dlp
:: Windows batch script for downloading video using yt-dlp.
:: 1. Get yt-dlp here: https://github.com/yt-dlp/yt-dlp/releases
:: 2. Put links (one per line) in %this_script_name%.txt next to script.
@echo off
::set update=stable@2023.03.04
set update=nightly
start "Downloading from YouTube..." cmd /k yt-dlp --update-to %update% ^&^& yt-dlp -R 30 -o "%%(upload_date)s - %%(title)s [%%(duration_string)s].%%(ext)s" -a "%~dpn0.txt" ^&^& title Done