This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getWatchers(root) { | |
| root = angular.element(root || document.documentElement); | |
| var watcherCount = 0; | |
| function getElemWatchers(element) { | |
| var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
| var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
| var watchers = scopeWatchers.concat(isolateWatchers); | |
| angular.forEach(element.children(), function (childElement) { | |
| watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Forked from: https://medium.com/@kentcdodds/angularjs-one-time-bindings-and-recompiling-templates-9857b2cead01 | |
| /* global angular */ | |
| var directives = angular.module('directives'); | |
| directives.directive('recompileOn', ['$parse', function($parse) { | |
| 'use strict'; | |
| return { | |
| transclude: true, | |
| link: function link(scope, $el, attrs, ctrls, transclude) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var setup = require('../.'), | |
| should = require('should'), | |
| path = require('path'), | |
| Sequelize = require('sequelize'), | |
| db = require('../../lib/db'), | |
| config = require('../../lib/config'), | |
| logger = require('../../lib/logger'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _ = require "lodash" | |
| DEFAULT_OPTIONS = | |
| filter: /_/ | |
| silent: false | |
| camelize = (obj, options) -> | |
| options = _.merge {}, DEFAULT_OPTIONS, options | |
| methodNames = _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # Originally From: https://www.raspberrypi.org/forums/viewtopic.php?t=118230 | |
| import RPi.GPIO as GPIO | |
| import time, sys | |
| import datetime | |
| FLOW_SENSOR = 17 | |
| GPIO.setmode(GPIO.BCM) |
OlderNewer