Skip to content

Instantly share code, notes, and snippets.

View guivazcabral's full-sized avatar
🎯
Focusing

Gui guivazcabral

🎯
Focusing
View GitHub Profile
@guivazcabral
guivazcabral / config.yml
Last active March 18, 2020 16:51
Flexget config
// REMEMBER TO FILL IN YOUR TRANSMISSION USERNAME/PASSWORD
tasks:
clean-transmission:
from_transmission:
host: localhost
port: 9091
username:
password:
disable: [seen, seen_info_hash]
@guivazcabral
guivazcabral / gist:e6e6a7c1e1fc4097fc1474168b12f52e
Last active March 21, 2021 20:45
NGINX Maintenance Mode: easy to set and render a template
## THIS IS A WORKAROUND TO SET A GLOBAL VARIABLE
## THIS IS WHAT YOU SHOULD CHANGE TO TURN ON MAINTENANCE MODE
map $host $maintenance {
default false;
}
## THEN ON THE SERVER BLOCK
## IF MAINTENANCE MODE IS TURNED ON
## WE RETURN A ERROR CODE
@guivazcabral
guivazcabral / roundInStepsOfFive.js
Created September 1, 2016 00:46
roundInStepsOfFive
function roundInStepsOfFive(number) {
return Math.round(number / 5 ) * 5;
}
alert(roundInStepsOfFive(54));