Skip to content

Instantly share code, notes, and snippets.

@0x4C4A
0x4C4A / cecho
Last active May 20, 2020 13:26 — forked from eahrold/cecho
Color Read / Color Echo in bash
#!/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");;
@0x4C4A
0x4C4A / joplinBulletListGenerator.py
Created February 11, 2021 19:57
Joplin / Markdown yearly bullet list template generator
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
@0x4C4A
0x4C4A / nsupdate_info_script.sh
Last active April 8, 2025 10:30
nsupdate.info update script
#!/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"