Skip to content

Instantly share code, notes, and snippets.

@andphe
andphe / graphite.patch
Created Sep 11, 2015
Collectl's graphite export fixes
View graphite.patch
--- 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);
@andphe
andphe / gist:3232343
Created Aug 2, 2012
Export your links from Safari reading list
View gist:3232343
/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'