Skip to content

Instantly share code, notes, and snippets.

@andphe
andphe / gist:3232343
Created August 2, 2012 01:41
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@andphe
andphe / graphite.patch
Created September 11, 2015 01:55
Collectl's graphite export fixes
--- graphite.ph 2015-09-06 12:59:52.062146603 -0500
+++ /usr/share/collectl/graphite.ph 2015-09-08 23:00:11.935957179 -0500
@@ -173,6 +173,7 @@
sendData('ctxint.int', 'intrpts/sec', $intrpt/$intSecs);
sendData('ctxint.proc', 'pcreates/sec', $proc/$intSecs);
sendData('ctxint.runq', 'runqSize', $loadQue);
+ sendData('ctxint.run', 'runSize', $loadRun);
# these are the ONLY fraction, noting they will print to 2 decimal places
sendData('cpuload.avg1', 'loadAvg1', $loadAvg1, 2);