Skip to content

Instantly share code, notes, and snippets.

View nuclearghost's full-sized avatar
🚀
Lost in Space

Mark Meyer nuclearghost

🚀
Lost in Space
  • TravelJoy
  • Chicago, IL
View GitHub Profile
@nuclearghost
nuclearghost / depth.css
Created May 28, 2014 13:08
CSS Trick for seeing node Depth
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
@nuclearghost
nuclearghost / StretchToMargin.css
Created January 23, 2014 20:08
CSS to stretch to margin
.stretch-to-margin {
display:block;
position:absolute;
height:auto;
top:0;
bottom:0;
left:0;
right:0;
}
@nuclearghost
nuclearghost / numWatches.js
Last active December 30, 2015 00:39
This gist contains an IIFE for finding the number of watches currently found on a page when using Angular.js. It's taken from Words Like Jareds answer on Stack Overflow http://stackoverflow.com/questions/18499909/how-to-count-total-number-of-watches-on-a-page
(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) {
watchers.push(watcher);
});
}