Skip to content

Instantly share code, notes, and snippets.

View mattymess's full-sized avatar

Matt Messinger mattymess

View GitHub Profile
@mattymess
mattymess / gist:61251df59986a8a6f8bc
Created October 7, 2014 21:54
Determine number of angular watchers
(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);
});
}
angular.forEach(element.children(), function(childElement) {
YtVideo.all.each do |video|
video.marketplace_status = 0
video.user_id = video.yt_channel.user.id
video.publish_at = video.yt_published_at
video.save
end
@mattymess
mattymess / dog.java
Created November 14, 2018 19:05
Dog
class Kennel {
public static void main(String[] args) {
int numOfDogs = 3;
String kennelName = "The Kennel";
double costPerNight = 10.00;
// <type of class> <variableName> = <variableValue>
Dog someDog = new Dog("Riley");
Dog dog2 = new Dog("Cali");