Archive for the ‘Uncategorized’ Category
-
Send Javascript client errors to Google Analytics
Not sure how well this will catch errors before onready but as a quick fix seems to work okay.
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-19303815-1']); _gaq.push(['_setDomainName', '.etherpad.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); /* Google Analytics error catching */ window.onerror = function(message, file, lineNumber) { _gaq.push([ '_trackEvent', 'error', file + ':' + lineNumber, message + '' ]); };Don’t forget to replace the UA-part with your own code…
-
Show git branch in shell prompt
nano ~/.bashrc
Paste in:function parse_git_branch_and_add_brackets { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/' } PS1="\h:\W \u\[\033[0;32m\]\$(parse_git_branch_and_add_brackets) \[\033[0m\]\$ "Save. You will probably need to log out and back in to see this.
-
Vizualization of significant data (Calendaring/Distance)

Putting this here because it’s relevant to the work I’m doing on US holiday dates
-
No title

-
Locked in space