This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach($session in $(gci registry::hkcu\Software\SimonTatham\PuTTY\Sessions\).name){ | |
Set-ItemProperty -Path "registry::$session" -Name Font -Value "Terminus" | |
Set-ItemProperty -Path "registry::$session" -Name FontHeight -Value 0x0c # 12 | |
Set-ItemProperty -Path "registry::$session" -Name FontCharSet -Value 0xcc # cyrillic | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# converts all files specified in FileGlob using ffmpeg and nvenc | |
function ConvertWith-Nvenc(parameter(mandatory=$true)[string]$FileGlob){ # FileGlob can contain path and wildcards | |
$OutputDir = "$(Split-Path -Parent "$FileGlob")\out" | |
mkdir "$OutputDir" | |
foreach($vid in (gi "$FileGlob")){ | |
echo "converting $vid..." | |
ffmpeg -i "$($vid.name)" -c:v h264_nvenc -preset slow ` | |
-ac 2 -c:a aac -strict -2 -b:a 128k ` | |
-map_metadata -1 ` | |
"$OutputDir\$($vid.name)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function waitForUserInput([parameter(mandatory=$true)][int]$TimeoutSeconds, [string]$Prompt){ | |
$counter = 0 | |
while($counter++ -lt $TimeoutSeconds){ | |
if(-not [console]::KeyAvailable){ | |
Start-Sleep -Seconds 1 | |
} else { | |
$input = Read-Host -Prompt "$Prompt" | |
break | |
} | |
} |