Writing
Removing certain text in multiple filenames in OS X
I had a large number of ebooks that looked like the following: Walter%20Isaacson%20-%20Einstein_His%20Life%20And%20Universe.mobi And because I’m lazy, I looked for an automated way to clean all of them up. This is how: 1. Back up all your files in another directory2. Launch terminal3. Go to the directory you’d like to perform the changes4. Type: for…
Check memory usage of processes in sorted order in Linux
From the terminal, type: ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r | more
Restarting a frozen Dock in OS X Lion
Open Applications > Utilities > Terminal > type killall Dock. Voila!
soapUI: How to set an element value from a Groovy script
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);holder = groovyUtils.getXmlHolder("teststep_name#Request" );holder.setNodeValue( "//element", "value");holder.updateProperty();
Pretty-print XML or jSon via the Terminal in OS X
Simply copy the jSon or XML into your clipboard and then run one of the following: pbpaste | python -m json.tool > formatted.json For XML: pbpaste | xmllint –format – > formatted.xml
Accepted boolean XML inputs
Adding for archival purposes: http://xformsinstitute.com/essentials/browse/re45.php true, 1, false, 0 are valid.