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(["jquery"], function ($) { | |
"use strict"; | |
function load(name, config) { | |
var deferred = $.Deferred(); | |
require([name], function (Module) { | |
var instance = new Module(); | |
instance.configure(config); | |
deferred.resolve(instance.export()); |
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
"use sctrict"; | |
angular. | |
module("App", ["module1", "module2", "module3"]). | |
config(["providerName1Provider", "providerName2Provider", function (providerName1Provider, providerName2Provider) { | |
// Configuration and initialization code here | |
// Routes | |
// Initialization of i18n anf i10n | |
}]). | |
run(["providerName1", "providerName2", function (providerName1, providerName2) { |
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
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
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
{ | |
"directory" : "app/bower_components", | |
"json" : "bower.json", | |
"storage": { | |
"packages": ".bower-cache", | |
"registry": ".bower-registry" | |
}, | |
"tmp": ".bower-tmp" | |
} |
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
var _ = require('lodash'); | |
function Trie() { | |
this.root = {}; | |
} | |
Trie.prototype.add = function (string, root) { | |
var hasTouched = false; | |
root = root || this.root; | |
if (string) { |
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
var _ = require('lodash'); | |
var connections = {}; | |
var sessions = {}; | |
var users = {}; | |
function registerConnection(id, socket) { | |
connections[id] = { | |
id: id, | |
socket: socket, |
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
\curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.bash_profile | |
rvm install ruby-2.1.3 --binary | |
rvm use 2.1.3 | |
gem install compass | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.18.0/install.sh | bash | |
source ~/.nvm/nvm.sh | |
npm install -g generator-angular | |
yo angular | |
npm install |
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
[ -s $HOME/.nvm/nvm.sh ] && . $HOME/.nvm/nvm.sh # This loads NVM |
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
'use strict'; | |
var should = require('should'), | |
modules = require('../index.js'), | |
models = modules.models, | |
fixtures = modules.fixtures, | |
MyModel = models.myModel; | |
describe('Cleanup Database', function() { | |
before(function(done) { |
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
'use strict'; | |
angular.constant('Environment', { | |
ROOT_URL: 'https://api.harmonic.com/v1' | |
}); | |
angular.factory('Services', ['Environment', 'lodash', '$resource', function (Environment, lodash, $resource) { | |
return $resource(Environment.ROOT_URL, { | |
get: { |