This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am mg on github. | |
* I am mg (https://keybase.io/mg) on keybase. | |
* I have a public key whose fingerprint is 0466 113F C1EA EAE6 0FC2 FFB2 0D69 E072 E71D BA75 | |
To claim this, I am signing this object: |
This file contains 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
angular.module('').factory('', function() { | |
var service = { | |
}; | |
return service; | |
}); |
This file contains 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
mod.directive('', function() { | |
return { | |
restrict: 'AE', | |
priority: , | |
template: '', | |
templateUrl: '.html', | |
replace: , | |
transclude: , | |
scope: , | |
controller: function($scope, $element, $attrs, $transclude, INJECTABLES) { }, |
This file contains 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
describe('Testing directive', function () { | |
var element, scope, serviceMock; | |
beforeEach(function() { | |
angular.module('ngMyPackageMocks', []) | |
.service('Service', function() { | |
serviceMock= this; | |
}); | |
angular.module('Test', ['ngMyPackage', 'ngMyPackageMocks']) | |
}); |
This file contains 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
define(function(require, exports, module) { | |
'use strict'; | |
var View = require('famous/core/View'); | |
var Surface = require('famous/core/Surface'); | |
function TheView() { | |
View.apply(this, arguments); | |
var surface = new Surface({ |
This file contains 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 Output(A::Float64, L::Float64, K::Float64, b::Float64) | |
return A * K^b * L^(1-b) | |
end | |
function Invest(O::Float64, s::Float64) | |
return s * O | |
end | |
function Machines(M::Float64, I::Float64, d::Float64) | |
return M + I - d*M |
This file contains 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
// http://toddmotto.com/opinionated-angular-js-styleguide-for-teams/ | |
(function() { | |
/** | |
* Describe controller | |
* | |
* @param $scope | |
* @param p1 | |
* @constructor | |
*/ |
This file contains 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 prop(obj, name, get, set) { | |
var base= name.substr(0,1).toUpperCase() + name.substr(1); | |
if(!get) { | |
get= function() { | |
return this['_' + name]; | |
}; | |
} | |
if(!set) { | |
set= function(v) { |
This file contains 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
# go sloc | |
find . -name "*.go" | grep -v test.go | xargs wc -l | sort -n |
This file contains 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
/* | |
Drag & Drop | |
*/ | |
var parent= document.getElementById('parent'); | |
var widget= document.getElementById('widget'); | |
var mouseDowns= Observable.fromEvent(widget, 'mousedown'); | |
var parentMouseMoves= Observable.fromEvent(parent, 'mousemove'); | |
var parentMouseUp= Observable.fromEvent(parent, 'mosueup'); |
OlderNewer