Skip to content

Instantly share code, notes, and snippets.

View mikhailbot's full-sized avatar
🐺

Mikhail mikhailbot

🐺
View GitHub Profile
@mikhailbot
mikhailbot / ip-change-notification.sh
Created May 3, 2022 23:49
Simple quick script to run to alert me if the IP address of a DNS record has changed
#!/bin/bash
# This script requires 3 environment variables defined:
# IP_CHANGE_DOMAIN the domain to check for an IP address change
# PUSHOVER_TOKEN the application token for PushOver
# PUSHOVER_USER the user key to send notification to
echo $(date) "Checking IP of $IP_CHANGE_DOMAIN from DNS..."
DOMAIN_IP=$(dig +short ${IP_CHANGE_DOMAIN})
echo $(date) $DOMAIN_IP
@mikhailbot
mikhailbot / falsehoods.md
Created July 11, 2024 17:51 — forked from almereyda/falsehoods.md
Falsehoods programmers believe about addresses

Falsehoods programmers believe about addresses

This is an anchor-linked version of the excellent, amazing original opus magnum by Michael Tandy.

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT