This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
colorread(){ | |
case "$1" in | |
red|alert) local COLOR=$(printf "\\e[1;31m");; | |
green|attention) local COLOR=$(printf "\\e[1;32m");; | |
yellow|warn) local COLOR=$(printf "\\e[1;33m");; | |
blue|question) local COLOR=$(printf "\\e[1;34m");; | |
purple|info) local COLOR=$(printf "\\e[1;35m");; | |
cyan|notice) local COLOR=$(printf "\\e[1;36m");; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import calendar | |
if len(sys.argv) != 2: | |
print("Expecting year to be input!") | |
sys.exit(1) | |
year = int(sys.argv[1]) | |
weekNum = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Script to update nsupdate.info IP when it has changed or if a week has passed. | |
# Will send an update on reboot, even if the IP is current. | |
# A nice quick snippet to add to your NAS, I run this on my Synology devices | |
# Slightly modified from https://www.raphael.li/blog/2015/03/custom-ddns-service-provider/ | |
# - Added weekly update even if no IP change detected | |
DOMAIN="your-full-domain-here.nsupdate.info" | |
TOKEN="your-token" |
OlderNewer