Skip to content

Instantly share code, notes, and snippets.

@aaronk6
aaronk6 / ddns_desec.rsc
Created October 3, 2023 12:23
RouterOS dynamic DNS update script for desec.io (IPv4 and IPv6)
# RouterOS dynamic DNS Update Script for deSEC
# ============================================
# make global to preserve IP and IPv4 address across script executions
:global ipddns
:global ipv6ddns
:local ddnshost "myhost.example.com"
:local token "MY_TOKEN"
:local waninterfacev4 "V4_INTERFACE_NAME" # Interface to retrieve WAN IPv4 address from (i.e. pppoe-out1)
@aaronk6
aaronk6 / rewrite_files.sh
Last active April 19, 2025 20:47
Rewrites files to remove stubborn extended attributes like com.apple.macl. Preserves creation and modification dates.
# This script rewrites a list of files to remove extended attributes like
# com.apple.macl, which can cause Time Machine backups to fail.
# It preserves creation and modification dates using SetFile/GetFileInfo.
#
# Provide the list of files via stdin, e.g.:
# echo "/path/to/file" | ./rewrite_file_clean.sh
# or
# cat filelist.txt | ./rewrite_file_clean.sh
#
# Requires: Xcode Command Line Tools (for SetFile and GetFileInfo)