Skip to content

Instantly share code, notes, and snippets.

View rossigee's full-sized avatar

Ross Golder rossigee

View GitHub Profile
@rossigee
rossigee / wg-watch.sh
Created November 18, 2023 08:54
Bash script to manage Wireguard dynamic IP endpoint
#!/usr/bin/env bash
# Settings
WG_IFACE=wg0
WG_PEER=<peer_id>
WG_PORT=12345
HOSTNAME=yourhostname.dynamicip.example.com
# File to store the last IP
last_ip_file="/tmp/last_ip.txt"
@rossigee
rossigee / xpub_checker.py
Created July 10, 2017 07:05
Python to fetch Bitcoin addresses/transactions for given XPUB
#!/usr/bin/python
import pycoin.key
import sys
import requests
import json
import datetime
def getbalance(address):
response = requests.get("https://bitaps.com/api/address/%s" % address)
@rossigee
rossigee / reportDynamicIPChanged.txt
Last active January 10, 2024 13:21
RouterOS raise HTTP event when dynamic IP address changes
:global previousIP 1.2.3.4
:global ipAddressCheckURL "http://ifconfig.me/ip"
# or... :global ipAddressCheckURL "http://icanhazip.com"
:global ipChangedEventURL "https://webhook.site/12345678-9610-4f57-9bfe-a3c5e2551d26"
/system/script/add name=reportDynamicIPChanged source={
:global ipAddressCheckURL
:global ipChangedEventURL
:local result [/tool fetch url=$ipAddressCheckURL mode=http as-value output=user];
:if ($result->"status" = "finished") do={
:local currentIP ($result->"data");