This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import json | |
def parse_element(element, namespace, indent=""): | |
result = {} | |
if element.attrib: | |
result['attributes'] = element.attrib | |
if element.text and element.text.strip(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove all the packages with residual configuration. | |
# http://stuzhao.blogspot.com/2012/07/removing-all-residual-config-packages.html | |
sudo apt-get remove --purge `dpkg -l | grep '^rc' | awk '{print $2}'` |