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 qProjects = $http.get('db/view/projects/all') | |
.then(function(res){ | |
if ( ! res.data) { | |
$q.reject(new Error('No project data received.')); | |
} | |
return data; | |
}); | |
var qClients = $http.get('db/view/clients/map') | |
.then(function(res) { |
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
# coffeelint: disable=max_line_length | |
describe 'auth', () -> | |
authService = null | |
$cookieStore = null | |
angular.module('cookieStoreMock', []) | |
.factory '$cookieStore', -> {get: -> 'name'} | |
beforeEach -> |
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
express = require 'express' | |
config = require 'config' | |
app = express() | |
app.configure -> | |
app.use '/static/', express.static config.static_root path.join __dirname, '/../client/build' | |
app.use '/static/', (req, res, next) -> | |
# We're requesting a non-existent static resource. | |
res.send 404 |
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
path = require 'path' | |
module.exports = (grunt) -> | |
grunt.initConfig | |
express: | |
options: | |
cmd: 'coffee' | |
delay: 50 | |
dev: |
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
if (Meteor.isClient) { | |
Meteor.startup(function () { | |
var messageThreads = new Mongo.Collection(null); | |
for (var i = 0; i < 1500; ++i) { | |
messageThreads.insert({ | |
_id: new Mongo.ObjectID().toHexString(), | |
"posts": [ |
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
if (Meteor.isClient) { | |
Meteor.startup(function () { | |
var collection = new Mongo.Collection(null); | |
for (var i = 0; i < 1000; ++i) { | |
collection.insert({ | |
_id: new Mongo.ObjectID().toHexString(), | |
"kind": "t3", |
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
meteor-base # Packages every Meteor app needs to have | |
mobile-experience # Packages for a great mobile UX | |
mongo # The database Meteor supports right now | |
blaze-html-templates # Compile .html files into Meteor Blaze views | |
reactive-var # Reactive variable for tracker | |
jquery # Helpful client-side library | |
tracker # Meteor's client-side reactive programming library | |
standard-minifier-css # CSS minifier run for production mode | |
standard-minifier-js # JS minifier run for production mode |
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
const defer = (res, ms) => new Promise(resolve => setTimeout(() => resolve(res), ms)); | |
const makeDough = () => defer({add: () => {}}, 500); | |
const makeSauce = () => defer({determineCheese: () => 'cheddar'}, 250); | |
const grateCheese = () => defer({type: 'cheddar'}, 150); | |
async function makePizza(sauceType = 'red') { | |
const pDough = makeDough(); |
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
FILES=$(git diff --name-only `git merge-base HEAD green`) | |
FORMAT_BIN=${HOME}/.ideaformatter/Contents/bin/format.sh | |
if [[ ! -f ${FORMAT_BIN} ]]; then | |
echo 'Please symlink idea into $HOME/.ideaformatter'; | |
exit 1; | |
fi | |
FILES_ARR=($FILES) | |
ABS_FILES=( "${FILES_ARR[@]/#/`cd .. && pwd`/}" ) |
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
it('renders results', () => { | |
const { configuration } = install(); | |
const Results = configuration.Results!; | |
expect(toJson(shallow(<Results />), { | |
noKey: false, | |
map: (val) => { | |
// Filter out noisy rxjs subscription from the snapshot. | |
if (val.type === 'ResultsListScrollContainer') { | |
val.props.resultState.subscription = {}; | |
} |