25 April, 2020

removing snaps from ubuntu 20.04 LTS

# list the snaps installed by default % snap list # remove these 1 by 1 % sudo snap remove <snap-name-from-above> # remove any snap directories % sudo rm -rf /snap /var/snap # purge snapd from the system % sudo apt purge snapd

19 April, 2020

TIL: about the python code module

well this module is hugely useful. invoke the REPL where you need it while you’re debugging something gnarly. for some reason, i’ve never quite grokked the use of pdb. i stumbled on this gem via this article.

30 December, 2019

TIL: y is not Y is not year, like you'd think

unicode date format patterns are a little more nuanced than the “standard” strftime() supported formats. note the difference between the following: man strftime (linux) %y The year as a decimal number without a century (range 00 to 99). (Calculated from tm_year) %Y The year as a decimal number including the century. (Calculated from tm_year) man strftime (osx) %Y is replaced by the year with century as a decimal number. ... read more

27 December, 2019

NNT on personal finance

i’m curious as to how long this link will last. that said, pretty solid advice and reasonable take on things. far less abrasive than his twitter feed would have you think.

25 December, 2019

hardcoded DNS will bite you in the ass in the most subtle and annoying ways

tl;dr - make a list of all of the annoying places where you need to hardcode DNS entries. you’ll thank yourself later. i retired a DNS server this past week. couple that with the expiration of a couple of guest wifi passes and i discovered that there’s a hidden DNS setting on the APs that can make captive portal DNS resolution miserable if the DNS server is offline. on ubiquit APs the preferred DNS server in the AP is what’s used for the resolution of DNS for the hotspots. ... read more

16 December, 2019

flatten json to paths

the following will take the output from a json object and flatten it into a key-value path. this is particularly handy when you’re looking to parse out the supported paths in a given device. note: you need to remove the \s from this output and put the entire jq string on the same line. jq '[leaf_paths as $path \ | {"key": $path | join("/"), "value": getpath($path)}] \ | from_entries' foo.json alias to make life happy. ... read more

03 November, 2019

single host ansible playbook

for those times when you just want to run the playbook against a single host in the group … --limit hostname make sure that the host can be found in the inventory.

20 May, 2019

foo-lab sample topology

topology the following scripts will create the VMs and the necessary OVS plumbing to generate the topology associated with the above diagram. these should be run in the following order: start-vms.sh start-topology.sh follow the gist links to get the raw source. NB the start-topo.sh script will create a number of interfaces. the most notable of which is the mgmgt0 interface which it will assign an IP address to. you’ll want to make sure that it’s not going to conflict with anything you need to access. ... read more

20 May, 2019

foo-lab topology building

overview to build a virtualized network topology from the most base elements it’s as simple as starting a virtual machine with the necessary number of virtualized interfaces and interconnecting these virtual interfaces to other virtual machines or physical interfaces. while there are tools1 which will nicely automate the creation of topologies and handle the lifecycle of VMs. all of these are effectively placing a nice wrapper around the following process. ... read more

Creative Commons License