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
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
<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"> |
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 mySubmitFunc = function(error, state){ | |
if (!error) { | |
if (state === "signIn") { | |
console.log('signed in...'); | |
// Successfully logged in | |
// ... | |
} | |
if (state === "signUp") { | |
console.log('signed up...'); | |
// Successfully registered |
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
alert('hello'); | |
//var logger = "http://localhost:3000/"; | |
// | |
//function createCORSRequest(method, url) { | |
// /* function to create a Cross Origin Resource Sharing Request to another domain. | |
// * Does not send the request. | |
// * @param http method of the request. | |
// * @param url the address we wish to send the request to. | |
// * @param return the open request to the url, unsent. | |
// */ |
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); |
OlderNewer