Skip to content

Instantly share code, notes, and snippets.

View 5andr0's full-sized avatar

Sandro Trianni 5andr0

View GitHub Profile
@5andr0
5andr0 / GetPw.py
Last active November 17, 2021 18:35 — forked from t0phr/GetPw.py
Scan script for nzbget.
#!/usr/bin/python3.8
##############################################################################
### NZBGET SCAN SCRIPT ###
#
# Scans filename of incoming NZBs for embedded passwords.
#
##############################################################################
### OPTIONS ###
# The RegEx to match the password in the filename.
#regex=(.*)\{\{(.*)\}\}.nzb
@5andr0
5andr0 / snippets.js
Created August 7, 2018 13:10
Javascript Snippets
/* rgbArrayToHex */
function rgbToHex(rgb) {
return "#" + (1 << 24 | rgb[0] << 16 | rgb[1] << 8 | rgb[2]).toString(16).slice(1);
}
/* request variables to object
https://stackoverflow.com/a/21152762/86145
*/
var qd = {};
if (location.search) location.search.substr(1).split("&").forEach(function(item) {var s = item.split("="), k = s[0], v = s[1] && decodeURIComponent(s[1]); (qd[k] = qd[k] || []).push(v)})