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
package daos | |
import scala.concurrent.ExecutionContext | |
import scala.concurrent.Future | |
import play.api.Play.current | |
import play.modules.reactivemongo._ | |
import reactivemongo.api._ | |
import reactivemongo.api.indexes._ | |
import reactivemongo.bson._ | |
import reactivemongo.bson.handlers.BSONReader |
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
package core.dao | |
import scala.concurrent.Future | |
import play.api.Logger | |
import reactivemongo.core.commands.LastError | |
import reactivemongo.core.errors.DatabaseException | |
import core.db.MongoHelper |
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
/** | |
* Todo: have no idea if this is the best way to organize this, please pm for | |
* suggestions | |
*/ | |
var xchange = require('../xchange.js') | |
,assert = require("assert") | |
,chai = require('chai') | |
,sinon = require('sinon') | |
,expect = chai.expect; |
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 request = require("request"); | |
var apis = {bitfinex: "https://api.bitfinex.com/v1/pubticker/btcusd", | |
bitstamp: "https://www.bitstamp.net/api/ticker/"}; | |
async.map([ "bitfinex", "bitstamp"], | |
function(item, callback) { | |
request(apis[item], function(err,resp, body) { | |
return callback(err, body); | |
}); |
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 () { | |
//Used for jsx to js transformations during mocha tests | |
require('./test/configs/jsxcompiler.js'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var nodemon = require('gulp-nodemon'); | |
var less = require('gulp-less'); | |
var rimraf = require('rimraf'); |
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 a (obj) { | |
return new Promise(function (res, rej) { | |
res(obj); | |
}); | |
}; | |
function chainingClosure(start){ | |
console.log('starting regular bluebird promise example...'); | |
var p = a(start) |
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 Promise = require('bluebird'), | |
superagent = Promise.promisifyAll(require('superagent')); | |
superagent.Request.prototype.cancellable = function () { | |
return this.endAsync().cancellable(); | |
}; | |
superagent.Request.prototype.then = function (done) { | |
return this.endAsync().then(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
var Promise = require('bluebird'); | |
var superagent = Promise.promisifyAll(require('superagent')); | |
function a(obj) { | |
return superagent | |
.get('http://google.com') | |
.endAsync(); | |
}; | |
function chainingClosure(start) { |
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 () { | |
var gulp = require('gulp'); | |
var mocha = require('gulp-mocha'); | |
var istanbul = require('gulp-istanbul'); | |
//moved these to functions instead of gulp | |
function test(cb) { | |
gulp.src(['test/**/*.js']) | |
.pipe(istanbul({includeUntested: true})) // Covering files |
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
<template name="map"> | |
<div class="map-container" style="width: 100%; max-width: 100%; height: 500px;"> | |
{{> googleMap name="mymap" options=mapOptions}} | |
</div> | |
</template> | |
<!--Want to put Center Map component in separate template--> | |
<template name="CenterMapComponent"> | |
<div id="controlDiv"> |
OlderNewer