Skip to content

Instantly share code, notes, and snippets.

View p-sherratt's full-sized avatar

Paul Sherratt p-sherratt

View GitHub Profile
@p-sherratt
p-sherratt / global_address_report.py
Created August 4, 2022 09:14
Produce a "CIDR report" from Netbox
#!/usr/bin/env python3
# quick hacky script to produce a "CIDR report" of your global address space from Netbox
# this is released to the public domain, free of copyright and licensing.
# by Paul Sherratt
import urllib3
urllib3.disable_warnings()
@p-sherratt
p-sherratt / makefile-help.md
Last active November 21, 2022 06:27
Makefile pretty help target

Another variant for the pile at: https://gist.github.com/prwhite/8168133

help:
	@sed \
		-e '/^[a-zA-Z0-9_\-]*:.*##/!d' \
		-e 's/:.*##\s*/:/' \
		-e 's/^\(.\+\):\(.*\)/$(shell tput setaf 6)\1$(shell tput sgr0):\2/' \
		$(MAKEFILE_LIST) | column -c2 -t -s :