Skip to content

Instantly share code, notes, and snippets.

View kolobus's full-sized avatar
👀
Working hard

Mihail «Kolo» Fedorov kolobus

👀
Working hard
View GitHub Profile
@kolobus
kolobus / ip-cached.sh
Created June 26, 2022 00:33
Fetch new IP and cache it to shared memory
#!/bin/bash
if [ ! -f "/dev/shm/node-ip" ]; then
curl -s4 checkip.amazonaws.com > /dev/shm/node-ip
echo "*********** IP renewed *************"
fi
nn_ipaddress=$(cat /dev/shm/node-ip)
echo $nn_ipaddress
@kolobus
kolobus / cf-ddns.rsc
Last active March 5, 2024 15:15 — forked from tophrr/cf-ddns.rsc
Mikrotik RouterOS Cloudflare Dynamic DNS Script
# Cloudflare Dynamic DNS update script
# Required policy: read, write, test, policy
# Add this script to scheduler
# Install DigiCert root CA or disable check-certificate
# Configuration ---------------------------------------------------------------------
:local TOKEN "__TOKEN__"
:local ZONEIDv6 "__ZONEID__"
:local RECORDIDv6 "__RECORDID__"