Skip to content

Instantly share code, notes, and snippets.

@johnshearar
johnshearar / keybase.md
Created March 27, 2019 21:04
Keybase proof of identity

Keybase proof

I hereby claim:

  • I am johnshearar on github.
  • I am johnshearar (https://keybase.io/johnshearar) on keybase.
  • I have a public key ASAvsgj5bMVip6j5NXFnpDPczG9Vc5g-8Hm0yHgSg0VxJQo

To claim this, I am signing this object:

@johnshearar
johnshearar / v1_oplog.json
Created March 17, 2016 10:37
oplog versions: unset 'user_id'
[
{
"sequence": 6262949082285735937,
"time": "2016-03-17T09:21:06Z",
"id": "d881558c-6dd8-11e5-b5d4-80e650068d94",
"type": "blah",
"operation": "update",
"data": {
"name": "sdfgdfg",
"mugshot_id": "d8818516-6dd8-11e5-b5d4-80e650068d94"
@johnshearar
johnshearar / angularjs_count_watches.js
Last active August 29, 2015 14:13
AngularJS debugging - count the number of watches.
/* Run in the javascript console for an AngularJS app that seems sluggish.
If the count is very high, you should probably look for things like two-way bindings in ngRepeat's.
*/
(function () {
var root = $(document.getElementsByTagName('body'));
var watchers = [];
var f = function (element) {
if (element.data().hasOwnProperty('$scope')) {
angular.forEach(element.data().$scope.$$watchers, function (watcher) {