Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / chordpro2pdf.cmd
Created March 15, 2022 16:06
Convert chord pro file to PDF
@ECHO OFF
SETLOCAL
for /f "tokens=1,2,*" %%a in ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Artifex\GPL Ghostscript\9.55.0" /ve') do set "UAC=%%c"
SET GSWIN64C=%UAC%\bin\gswin64c.exe
IF NOT EXIST "%GSWIN64C%" (
ECHO Can't find %GSWIN64C%
ECHO Download Windows 64 bit from https://ghostscript.com/releases/gsdnld.html
@milnak
milnak / code.cmd
Last active August 15, 2024 18:08
VSCode launcher: Better than just using "code" as it supports wildcards #vscode
@ECHO OFF
SETLOCAL
SET CodePath=
REM Visual Studio Code 64-bit user
CALL :GetUninstallPath "HKEY_CURRENT_USER" "{771FD6B0-FA20-440A-A002-3B3BAC16DC50}_is1" "InstallLocation"
IF "%CodePath%" EQU "" (
REM Visual Studio Code 64-bit
CALL :GetUninstallPath "HKEY_LOCAL_MACHINE" "{EA457B21-F73E-494C-ACAB-524FDE069978}_is1" "InstallLocation"
IF "%CodePath%" EQU "" (
@milnak
milnak / windows_ee.md
Last active November 30, 2025 04:21
Windows v1 v2 v3 easter eggs

Windows 1 - 3 Easter Egg Information

Encryption/Obfuscation

Windows 1.x - 2.x

Chained XOR. To decrypt, XOR the nth byte with the key, XOR the key with that decrypted byte and repeat until the EOF mark is hit. Initial key is the integer 77.

@milnak
milnak / Transcribe Default Keyboard Shortcuts.md
Last active November 30, 2025 03:50
Transcribe Default Keyboard Shortcuts

Transcribe Default Keyboard Shortcuts

These are the default keyboard shortcuts for Transcribe, organized by category.

Playback

Space Z ; . ,
Play Play from marker (while held) Play from current (while held) Stop Play/Pause
@milnak
milnak / verify_dns.cmd
Created May 23, 2022 15:37
CMD script to verify that DNS server is up and running. Useful for pihole.
@echo off
setlocal
if "%~1"=="" ( ECHO Specify DNS server to verify, e.g. %~nx0 192.168.1.17 & GOTO :EOF)
set DNSSERVER=%~1
REM To have this script run on user login:
REM
REM taskschd.msc
REM Action, Create Basic Task
REM Name: verify_htpc_pihole
@milnak
milnak / .bashrc
Last active June 13, 2023 20:12
My bash prompt #linux
export PS1='\033[0;37m\342\224\214\342\224\200\e[0;36m$(code=${?##0};echo ${code:+\033[0;37m[\033[0;31m\342\234\227\033[0;37m]\342\224\200})\033[0;37m[\e[0;33m\u\e[0;37m@\e[0;33m\h\e[0;37m]\342\224\200[\e[0;36m\A\e[0;37m]\342\224\200[\033[0;32m\w\033[0;37m]\n\033[0;37m\342\224\224\342\224\200[\033[0;34m\!\033[0;37m]\342\224\200\342\225\274 \033[0m'
@milnak
milnak / download_youtube.cmd
Created August 26, 2022 16:15
YTDlp CMD downloader
@echo off
setlocal
REM Set codepage to UTF-8
chcp 65001 > NUL
echo.
REM Hidden ESC character on next line.
set ESC=
GOTO :MAIN
@milnak
milnak / pdf_burst.cmd
Last active November 30, 2025 03:54
Burst a PDF Document into Single Pages uising qpdf
@ECHO OFF
REM Burst a PDF Document into Single Pages using qpdf - https://github.com/qpdf/qpdf
SETLOCAL
IF "%~1"=="" (
ECHO PDF_filename
ECHO Example: %~nx0 document.pdf
GOTO :EOF
)
@milnak
milnak / md5sum.ps1
Last active November 30, 2025 03:55
md5sum check
$md5sum = Get-Content '.\test.md5' | Select-String -Pattern '^([0-9a-fA-F]+) ([ \*])(.+)' | ForEach-Object { $hash,$binary, $path = $_.Matches[0].Groups[1..3].Value; [PSCustomObject] @{Hash=$hash; Binary=[Bool]($binary -eq '*'); Path=$path } }
$md5sum | ForEach-Object { if ($_.Hash.ToLower() -eq (Get-FileHash $_.Path -Algorithm MD5 -ErrorAction SilentlyContinue -ErrorVariable HashError).Hash) { "$($_.Path): OK" } else { if ($HashError) { "$HashError`n$($_.Path): FAILED open or read" } else { "$($_.Path): FAILED" } } }
@milnak
milnak / scoop-bootstrap-generator.ps1
Last active November 14, 2025 17:12
Scoop Bootstrap Generator: Mirror scoop configuration for a new device from an existing - superset of 'scoop export' #scoop
<#
.SYNOPSIS
Scoop Bootstrap Script Generator
.DESCRIPTION
Create a scoop bootstrap, copying config from an existing installation.
.EXAMPLE
PS C:\> ./scoop-bootstrap-generator.ps1 | Out-File scoop-bootstrap.ps1