Skip to content

Instantly share code, notes, and snippets.

@garoto
Last active November 11, 2025 15:15
Show Gist options
  • Select an option

  • Save garoto/ec114b62303b552b2801f8fe2465a27f to your computer and use it in GitHub Desktop.

Select an option

Save garoto/ec114b62303b552b2801f8fe2465a27f to your computer and use it in GitHub Desktop.
doskey macros as of 2025
ip2hex=busybox.exe sh -c "bar=$1; printf 'IPv4 %s in Hex: 0x%02X%02X%02X%02X\n' $$bar $${bar//./\ }"
ip2hex_alt=busybox.exe sh -c "IFS=.; bar=$1; printf 'IPv4 %s.%s.%s.%s in Hex: 0x%02X%02X%02X%02X\n' $$bar $$bar"
ip2hex_slow=busybox.exe sh -c "bar=$1; foo=$(command echo -n $1 | command sed 's,\., ,g' ); printf 'IPv4 %s in Hex: 0x%02X%02X%02X%02X\n' $$bar $$foo"
svc?=@rg --color=never -N -B1 -A9 ".Services and Drivers Start numbers:" C:\Users\username\windows_win10_decrap_and_notes.txt
mpv2=cmd /d /c "setlocal & set "MPV_HOME=" & C:\Apps\AV\mpv2\mpv.com $*"
lastboot=powershell.exe -command "(Get-Ciminstance -Class "Win32_operatingsystem" -Namespace "ROOT\CIMV2").lastbootuptime[0]"
ss2=C:\Apps\AV\mpv\mpv.exe --profile=sw-fast --scale=nearest --cache=no --pause --osc=no --video-osd=no --load-scripts=no --fs-screen=1 --fs --stop-screensaver=no av://lavfi:color=size=1280x720:c=black $*
nicbr=busybox echo $1 | C:\BIN\nc.openbsd\netcat.exe -v whois.registro.br 43 | busybox iconv -f CP1252 -t UTF-8
ipc=rg changed %home%/ddns.log | busybox tail
im=C:\Apps\GFX\ImageMagick-7.1.1-Q8\magick.exe $*
stdby=typeperf -si 0 -sc 1 "NUMA Node Memory(_Total)\Free & Zero Page List MBytes"
micro=busybox printf \x1b[?1049h & micro "$*" & busybox printf \x1b[?1049l
vv=chafa.exe --dither=diffusion --exact-size=auto -c full --format=sixel $*
ddg=python.exe C:\BIN\ddgr.py $*
until=$1 $2 $3 $4 $5 & IF %errorlevel% EQU 1 (for /l %a in () do $1 $2 $3 $4 $5) ELSE (echo All Done)
esr=C:\Apps\Diversos\Everything\es.exe -doublequote -r ^^$1$ -txt | busybox xargs $2 $3 $4 $5 $6
git=cmd /d /c "setlocal & set "EDITOR=C:/BIN/nano/nano.exe" & set "PAGER=lessgit -X" & set "PATH=J:\Misc\PortableGit\cmd;%PATH%" & git.exe $*"
nc=C:\BIN\nc.openbsd\netcat.exe $*
dd=dirx -Qv --icons=always -ogd --tree --levels=1 --time --size --size-style=mini --time-style=locale $*
shutdown=IF /I "$1"=="/a" ( shutdown.exe /a ) ELSE IF "$1"=="/?" ( shutdown.exe /? ) ELSE ( choice /c YNQ /n /m "Reboot with these options: 'shutdown $*'? [Y,N]:" & IF !errorlevel! EQU 1 ( shutdown.exe $* ))
edn=where -F "$1" | busybox xargs -t nano
fe=C:\Apps\Diversos\Everything\es.exe -doublequote -n 1 -w -txt $1 | busybox xargs -rt nano
upt=busybox uptime
type=splat2.exe $*
sgrtab=busybox sh -c "c:/bin/sgrtab.sh $*"
ee=cmd /d /c "setlocal & set "summcli=summer.exe -c c:/bin/summer.yaml" & set "ezacli=eza.exe -laF --header --time-style=relative --color=always --group-directories-first --sort=modified --icons=auto --tree -L1" & IF "$*" EQU "" ( !ezacli! ./ & !summcli! 2>nul ./ ) ELSE ( !ezacli! $* & !summcli! 2>nul $* )"
doom4=pushd H:\SteamLibrary\steamapps\common\DOOM && doomx64vk.exe +com_gameMode 1 +com_skipKeyPressOnLoadScreens 1 +com_skipIntroVideo 1 && popd
testexxx=echo "$a $b $c $d $e $f $g $h $i $j $k $l $m $n $o $p $q $r $s $$t $u $v $x $y $w"
scrcpy=busybox sh -c "scrcpy.exe --select-tcpip 2>&1 | while read -r line; do printf '[%s] %s\n' \"$(date '+%d-%b-%Y %H:%M:%S')\" \"$$line\"; done"
s2d=busybox sh -c "secs=$1 ; printf '%02dd:%02dh:%02dm:%02ds\n' $((secs/86400)) $((secs%86400/3600)) $((secs%3600/60)) \ $((secs%60))"
es=C:\Apps\Diversos\Everything\es.exe -doublequote $*
bc=busybox sh -c "echo '$1' | bc -l" $2 $3 $4 $5
zerodel=FOR /F "delims=" %b in ('dir /b /o-s /a:-d-l-s') do @if %~zb==0 @echo Delete "%~ftzb" (Y/N)? & @del /p "%~fb" >nul
7zfm=C:\Apps\Diversos\7-Zip-Zstandard\7zFM.exe $*
mpvi=C:\Apps\AV\mpv\mpv.com --input-test --idle --no-load-auto-profiles --msg-level=statusline=no
ptpimg=busybox printf "%s\n%s\n" %date% $1 >> %USERPROFILE%/uploads.log & curl --disable -s --form file-upload[0]=@"$1" -F "api_key=$apikey" "https://ptpimg.me/upload.php" | jq -r --arg prefix "https://ptpimg.me/" ".[] | $prefix + ({code,ext}|join(\".\"))" | busybox tee -a %USERPROFILE%/uploads.log
0x0=IF NOT EXIST "$1" (echo ERROR: file "$1" not found.) ELSE (FOR %A in ($*) DO @set "TYPE=" & FOR /F "tokens=* usebackq" %B IN (`reg query HKEY_CLASSES_ROOT\%~xA /v "Content Type" ^| busybox tr -s -d "\015\012" "\040" ^| busybox cut -d" " -f5`) DO @set "TYPE=;type=%B" & curl --disable -i -4 --http1.1 --form file=@"%~A"!TYPE! https://0x0.st)
0x0asc=FOR %S in ($1) DO @curl --disable -i -4 --http1.1 --form file=@"%~S";type=text/plain https://0x0.st
5ping=FOR /l %i in (1,1,5) DO @ping -n 1 $1 $b find "Reply" & @sleep 5s
ascii=busybox ascii
cat=busybox.exe cat $*
cdzxzx=IF "$1" EQU "~" (pushd %HOME%) ELSE (IF "$*"=="" (popd) ELSE (pushd "$*"))
cdwqwq=IF "$*" NEQ "" (chdir /d "$*") ELSE (IF "%CD%"=="%HOME%" (chdir /d R:) ELSE (chdir /d %HOME%))
cdrem1=IF "$1" EQU "~" (IF "%CD%"=="%HOME%" (pushd R:) ELSE (pushd %HOME%)) ELSE (IF "$*"=="" (popd) ELSE (pushd "$*"))
cdrem2=IF "$1" EQU "~" (IF "%CD%"=="%HOME%" (pushd R:) ELSE (pushd %HOME%)) ELSE (IF "$*"=="" (popd) ELSE (IF "$1" EQU "-" (chdir -) ELSE (pushd "$*")))
cd=FOR %S in ($1) DO @IF "%~S" EQU "~" (IF "%CD%"=="%HOME%" (pushd R:) ELSE (pushd %HOME%)) ELSE (IF "%~S"=="" (popd) ELSE (IF "%~S" EQU "-" (chdir -) ELSE (pushd "%~S")))
cht=http --print b http://cheat.sh/$*?style=rrt | busybox sed -b -E "s/<h/< h/g;s/>\./ >/g"
cp=copy $*
dec=FOR %A in ($1) DO @openssl.exe enc -v -d -chacha -md whirlpool -pbkdf2 -iter 500000 -salt -pass pass:$passwd -in $1 -out %~dpAdecrypt-%~nxA && echox -n =^>\040 & J:\Misc\PortableGit\usr\bin\file.exe decrypt-%~nxA
dhew=J:\Games\dhewm3\dhewm3.exe +set fs_basepath J:/Games/dhewm3 +set fs_configpath J:/Games/dhewm3 +set fs_savepath J:/Games/dhewm3 +disconnect $*
dict=curl --silent dict://dict.org/d:"$*":english | J:\Misc\PortableGit-2.45.2-64-bit\usr\bin\lessgit.exe -X
digx=FOR /F %S in ('dig $1 A +short ^| rg --color=never -e ^[0-9]+\.') do @dig -x %S +short
dos2unix=echo $1 | findstr /r "\/D \/d -D -d">NUL & IF errorlevel 1 ( busybox.exe dos2unix $1 ) ELSE ( busybox.exe unix2dos $2 )
dotren=IF EXIST "$1." (rename $1 .$1 && dir .$1) ELSE (IF exist ".$1." rename .$1 $1 && dir $1)
edhist=C:\Apps\Diversos\Notepad2\Notepad2.exe "C:\Users\username\AppData\Local\clink\clink_history"
edmac=notepad C:\BIN\doskey.mac
empty=@echo.& fsutil file createnew "$*" 0 >nul 2>&1 & @echo.&& FOR /F "delims=" %S in ('dir /b "$*"') do @echo %~tS, %~zS bytes, "%~sS"
exp=IF "$1"=="" (explorer /e,%CD%) ELSE (explorer /e,$*)
ffmpeg=ffmpeg.exe -hide_banner $*
file=C:\BIN\file-mingw\file.exe $*
fckspc=FOR %I in ("$*") DO @cmd /d /c "setlocal & set "oldname=%~nxI" & set "newname=!oldname: =_!" & busybox echo -en \n %I ==^^>\040!newname!\040(Copied to clipboard)\n & busybox echo -en !newname! ^| clip"
getdes=cmd /d /c "setlocal & set "PYTHONUTF8=1" & @yt-dlp.exe --get-description $1 | fold -w82 -s" $2 $3 $4 $5
getjson=yt-dlp.exe --sub-lang en --dump-json -- "$*" | jq . 2>nul | J:\Misc\PortableGit-2.45.2-64-bit\usr\bin\lessgit.exe +/upload_date -X
hex=C:\Apps\Diversos\HxD\HxD.exe $*
d2h=busybox.exe printf "Hex\t: 0x%X\nDecimal\t: %d\n" $1 $1
h2d=busybox.exe printf "Hex\t: 0x%X\nOctal\t: 0%o\nDecimal\t: %d\n" 0x$1 0x$1 0x$1
hexchat=busybox env "PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;J:\Misc\python-3.8.10-amd64\Scripts;J:\Misc\python-3.8.10-amd64;C:\Apps\MacType;" cmd.exe /d /c start "" C:\Apps\Net\HexChat\hexchat.exe $*
hist=clink_x64.exe history | rg -NF -- "$*" | rg -Nv -- "^\W*\d+\s{2}(hist|hist20)\W"
hist20=IF "$*" EQU "" ( clink_x64.exe history | rg -Nv -- "^\W*\d+\s{2}(hist|hist20)\W" | busybox tail -n20 ) ELSE ( clink_x64.exe history | rg -N -- "$*" | rg -Nv -- "^\W*\d+\s{2}(hist|hist20)\W" | busybox tail -n20 )
imgur=busybox echo -e %date%\nfile:$1 >> %USERPROFILE%/uploads.log & curl -s --http1.1 -H "Authorization: Client-ID $id" -F "image=@$1" https://api.imgur.com/3/image.xml | xml sel -I -t -n -o "ImgLink: " -v "data/link" -n -o "DelLink: https://imgur.com/delete/" -v "data/deletehash" -n | busybox tee -a %USERPROFILE%/uploads.log
ifof=IF /I "$1" EQU "off" (netsh interface set interface name="Realtek" admin=disable & netsh int show int Realtek) ELSE (IF /I "$1" EQU "on" (netsh interface set interface name="Realtek" admin=enable & netsh int show int Realtek) ELSE @echo ERROR: Missing or invalid argument: $1. Valid options are: ^<on^|off^>)
ipp=ipconfig /all && busybox sh -c "foo=$(dig -4 whoami.akamai.net @ns3-193.akamaitech.net. +short +retry=1 +tries=1 +timeout=2); printf ' External Public IPv4. . . . . . . : %s (%s)\n' $foo $(dig -x $foo +short +retry=1 +tries=1 +timeout=1 @177.79.237.231)"
ironwail=@tasklist /nh /fo csv /fi "IMAGENAME eq ironwail*"|rg "ironwail*">nul & @IF !errorlevel! EQU 0 ( echo A copy of  IronWail  is already running. ) ELSE ( @D:\Games\Quake\IronWail\ironwail.exe -basedir %QSDIR% $* )
kkk=echo $*|find /i "%CD:~0,2%">NUL & if !errorlevel! NEQ 0 (echo Not on the same drive, aborting.) ELSE (echo On the same drive, continuing...)
la=dir /a $*
lastmpv=@chcp 65001>NUL & @FOR /F "tokens=2* delims=]" %N in ('tail.exe %USERPROFILE%\AppData\Roaming\mpv\mpvhistory.log -n 1') do @echo ===^> Playing: "%N %O" & @echo. &FOR /F "tokens=3 delims= " %S in ('tail.exe %USERPROFILE%\AppData\Roaming\mpv\mpvhistory.log -n1') do @mpv $* "%S" & @chcp 437>NUL
lftp=J:\msys64\usr\bin\lftp.exe $*
lftp.exe=J:\msys64\usr\bin\lftp.exe $*
ll=cmd /d /c "setlocal & set fs=$1 & set bs=!fs:\=/! & busybox.exe sh -c "~/bbls.sh !bs!""
lm=pushd %appdata%\mpv\logs\ && rg -N --no-unicode --smart-case --block-buffered -tgzip --search-zip -- "$*" | sort -b --stable --ignore-nonprinting -t "/" -k3n -k2M | sort -b --stable --ignore-nonprinting -t "." -k3,3h | uniq -i --skip-fields=2 & pushd .. & rg -N --no-unicode --no-heading --with-filename --smart-case --block-buffered -- "$*" mpvhistory.log & popd & popd
localip=netsh int ipv4 show address|rg --color=never "IP Address"
ls=dir $*
macrotest=@echo Line 1 $T echo Line 2 $T echo Line 3
mandoc=FOR %S in ($1) do IF "%~xS" EQU ".gz" (@gzip -dc "$1" | C:\BIN\UNX\mandoc.exe | J:\Misc\PortableGit-2.45.2-64-bit\usr\bin\lessgit.exe -X) ELSE (C:\BIN\UNX\mandoc.exe "$*" | J:\Misc\PortableGit-2.45.2-64-bit\usr\bin\lessgit.exe -X)
md=IF "$1"=="" (echo mkdir needs a name.) ELSE (mkdir "$1" && echo [OK] Changing dir to "$1"...&& chdir /D "$1")
mpvm=mpv.com --profile=music $*
mv=move $*
noproxy=set "http_proxy=" && set "https_proxy=" & set "all_proxy=" & set http
np=notepad $*
npmset=IF NOT "x%PATH:node=%"=="x%PATH%" (echo.&echo.npm is already ACTIVE in this console.) ELSE (echo.&J:\Misc\node-v14.17.3-win-x64\nodevars.bat)
nth-dump=FOR /F "usebackq" %N in (`nth-dump.windows-amd64.exe -url-format sip002u -nowait -noqr ^| rg --no-config --color=never "ss://" ^| awk "{print $$2}" ^| head -n1 ^| tr -d "\n"`) do @echo --^> Using Server: %N & gost -L=socks://localhost:8080 -F=%N
o2h=busybox.exe printf "Octal number \"%o\" in Hex is: 0x%X\n" 0$1 0$1
own=takeown /f $1 && icacls $1 /reset /t /c /q
perlset=IF NOT "x%PATH:perl=%"=="x%PATH%" (echo.&echo.npm is already ACTIVE in this console.) ELSE (echo.&J:\Misc\node-v14.17.3-win-x64\nodevars.bat)
pskill=pskill.exe -nobanner $*
quake=@tasklist /nh /fo csv /fi "IMAGENAME eq quakespasm*"|rg "quakespasm*">nul & @IF !errorlevel! EQU 0 ( echo A copy of  Quakespasm  is already running. ) ELSE ( @D:\Games\Quake\quakespasm-0.94.2-gl4-test2_win32\quakespasm-gl4.exe -basedir %QSDIR% $* )
realpath=busybox realpath $* | busybox tr "/" \\
recme=ffmpeg -loglevel error -stats -hide_banner -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{EAE7867A-837D-4009-8372-5F52E3F806B5}" -vn -c:a libopus -ac 2 -b:a 160k "E:\CEVCECM_%RANDOM%-%DATE%.ogg"
regq=reg query $* | tail -n+3 | busybox sed "s/program\ files/progfiles/" | tr -s " " | sort -sbf -k1,1 | column.exe --table --table-columns 1,2,3 -d --table-hide - --
retro=FOR /F "tokens=* delims=[1]" %N in ('dir /b /o-d /t:c d:\games\doom\doomretro*^|find /v /n ""^|findstr "\[1\]"') do @pushd D:\Games\Doom\%~N && @echo Launching 'doomretro' Version: %N && set "SDL_AUDIODRIVER=" & start /w doomretro.exe -iwad ..\WADs\DOOM$1.WAD -file ..\WADs\ALL-SC55.wad $2 $3 $4 $5 $6 $7 $8 $9 & @echo exit code: !errorlevel! && cd D:\ && popd
rm=del $*
rr=C:\Apps\Diversos\nVidiaInspector\nvidiaInspector.exe -restartDisplayDriver
scp=J:\Misc\PortableGit\usr\bin\scp.exe -F /c/Users/username/.ssh/msys2_config $*
scp.exe=J:\Misc\PortableGit\usr\bin\scp.exe -F /c/Users/username/.ssh/msys2_config $*
seterr=echo !errorlevel!&&verify >nul&echo !errorlevel!
shmpv=mpv --demuxer=+lavf --demuxer-lavf-buffersize=4194304 $*
ssh=busybox sh -c "~/sshloop.sh $*"
ssh-keygen=J:\Misc\PortableGit\usr\bin\ssh-keygen.exe $*
steamgo=busybox.exe env -u CLINK_INPUTRC -u BAT_CONFIG_PATH -u COLORTERM -u CURL_HOME -u DIRCMD -u DIRX_COLORS -u DXVK_ASYNC -u DXVK_GPLASYNCCACHE -u EDITOR -u EZA_COLORS -u EZA_ICON_SPACING -u H -u HOME -u LESS -u LESSCHARSET -u LFTP_HOME -u LS_COLORS -u OPENSSL_CONF -u PIPX_HOME -u PROMPT -u RIPGREP_CONFIG_PATH -u SSL_CERT_FILE -u TIME_STYLE -u USERPATH -u VBOX_MSI_INSTALL_PATH -u WGETRC -u WSLENV -u WT_PROFILE_ID -u WT_SESSION -u YTDLP_NO_LAZY_EXTRACTORS "PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common" "PATHEXT=.COM;.EXE;.BAT;.CMD;.MSC" cmd.exe /d /c start "" H:\Games\Steam\steam.exe -login "username" "passwd" -silent -console --enable-low-end-device-mode -quicklogin
tcd=tcd.exe -s "C:\Users\username\.config\tcd\settings.json" $*
tm=timemem.exe $*
touch=busybox.exe touch -m $*
trace=cmd /d /c "setlocal enabledelayedexpansion & @set str=$1 & @ftrace -c -i 1 -n 30 -w 1000 !str:*://=!"
transmission-remote=C:\Apps\Net\Transmission\transmission-remote.exe 127.0.0.1:9999 --auth username:passwd $*
transmission-remote.exe=C:\Apps\Net\Transmission\transmission-remote.exe 127.0.0.1:9999 --auth username:passwd $*
twitch-dl=cmd /d /c "setlocal & set "TMPDIR=H:\TMP" & @twitch-dl.exe $*"
twitch-dl.exe=cmd /d /c "setlocal & set "TMPDIR=H:\TMP" & set "PYTHONLEGACYWINDOWSSTDIO=UTF-8" & set "PYTHONIOENCODING=UTF-8" & @twitch-dl.exe $*"
unix2d=busybox.exe unix2dos $*
urldecode=echo "$1" | busybox sed "s,+, ,g;s,%,\\x,g" | busybox xargs printf "\n%b\n"
vmget=J:\Misc\PortableGit\usr\bin\scp.exe -T [email protected]:"$*" ./
vr=C:\Apps\Diversos\Custom_Resolution_Utility\restart64.exe
ytg=yt-dlp.exe --output "E:/videos/youtube-videos/%(title).70s-%(upload_date>%d-%b-%Y)s-%(uploader_id,uploader)s_%(webpage_url_domain)s_%(id).19s.%(ext)s" $*
vredd=yt-dlp.exe --output "E:/videos/random-videos/%(title).70s_%(extractor_key)s-%(id).19s.%(ext)s" --format "(fallback+bestaudio/bestvideo+bestaudio/bestvideo)[protocol!*=m3u8]" --merge-output-format "mp4" $*
w=IF "$1"=="" (echo ERROR: "where.exe" needs a pattern.) ELSE (C:\Windows\System32\where.exe /T /F "*$1*$2")
whob=echo $*| wargs -rt -I "{}" busybox sh -c "sshloop.sh jackbox whob "{}""
whois=J:\msys64\usr\bin\whois.exe $* | awk "BEGIN { del=0 } /TERMS OF USE|Terms of Use|NOTICE|Notice/ { del=1 } del<=0 { print } /time\./ { del -= 1 }" | rg -iv "(REDACTED|PRIVACY)"
whoiscl=chcp 1252>nul & C:\BIN\WhoisCL.exe $* &chcp 437>NUL
wi=cmd /d /c "setlocal & set "pe=.;%path%" & @for %a in ($1) DO @for %b in (%PATHEXT%) DO @for %c in (%~na%b) DO @if NOT "%~$pe:c"=="" echo.%~$pe:c"
wiki=dig +short txt $1.wp.dg.cx | fmt -us -w80 | sed -E 's/"\s"//g;s/(\^"^|\"$)//g;s/\\\226\\\128\\\147/-/g;s/\shttp:/\n\nhttps:/'
ytdf=@echo. & @echo  ==^> youtube-dl title and format fetcher... & set "ytinput=$*" & FOR /F "delims=" %N in ('yt-dlp --force-ipv4 --no-warnings --get-title -- "!ytinput!"') DO @echo  ==^> Title: %N & @echo. & yt-dlp --force-ipv4 --no-warnings --list-formats -- $* & set "ytinput="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment