Skip to content

Instantly share code, notes, and snippets.

View redfellow's full-sized avatar

redfellow redfellow

View GitHub Profile
@redfellow
redfellow / transmission.bat
Last active November 19, 2024 15:51
Windows 10: Bind and start transmission-daemon on specific NIC
@echo off
set IP=""
for /f "tokens=2 delims==" %%F in ('wmic nic where "NetConnectionStatus=2 and AdapterTypeId=0" get NetConnectionID /format:list') do set interfaceName=%%F
if "%interfaceName%"=="PIA VPN" (
for /f "tokens=1-6 delims=:. " %%a in ('netsh int ip show address "PIA VPN" ^|find "IP Address"') do set IP=%%c.%%d.%%e.%%f
if defined IP (
echo VPN IP check OK: %IP% -- Starting transmission
"C:\Program Files\Transmission\transmission-daemon.exe" --foreground --config-dir J:\apps\transmission --bind-address-ipv4 %IP%
@redfellow
redfellow / plex-donaus.js
Created May 11, 2018 20:22
Download the original audio/video from a Plex server you have access to
javascript:(function()%7Bif (typeof plxDwnld %3D%3D 'undefined') %7Bvar jsCode %3D document.createElement('script')%3BjsCode.setAttribute('src'%2C 'https%3A%2F%2Fpiplong.run%2Fplxdwnld%2Fbookmarklet.js%3Fts%3D' %2B Math.floor(Date.now()%2F1000))%3Bdocument.body.appendChild(jsCode)%3B%7D else %7BplxDwnld.init()%3B%7D%7D)()
/* FOR RAMBOX, edit service and paste under "Advanced / Custom code" */
function applycss(css){
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.appendChild(document.createTextNode(css));
head.appendChild(s);
}
applycss(`