Instantly share code, notes, and snippets.

View python-struct-unpack.md

What does the 'format' of unpack mean?

Given this input:

record = 'raymond   \x32\x12\x08\x01\x08'

and unpacking using this command

unpack('<10sHHb', record)
View edgerouter-leases.md

post dnsmasq leases

post dnsmasq leases and static mappings to phabricator

we need a script to post out (update api-token, phab domain, and paste PHID accordingly)

vi /config/scripts/post-leases.sh
---
#!/bin/bash