Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Track which Meraki WAP you are connected to in real-time
while `true`;do
date +"%H:%M:%S - `curl --connect-timeout 5 -kL http://ap.meraki.com/index.json 2>/dev/null | jq -r .config.node_name`"
sleep 1
done
@bk2zsto
bk2zsto / vlan_unparser
Created October 19, 2020 12:36
expand IOS-style vlan strings
def vlan_unparser(vlan_list_string):
"""
Input: string in IOS-compressed VLAN syntax
Output: list with ranges expanded
"""
vlan_min = 1
vlan_max = 4094
@bk2zsto
bk2zsto / combined.json
Created April 29, 2023 21:11
supporting files for validate module not loading references
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"cidr": {
"$comment": "CIDR, IPv4-only",
"type": "string",
"pattern": "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}/[0-9]{1,2}"
}
},
"type": "object",