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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
exports.searchContactPost = function(req, res) { | |
if (req.body.searchContacts === '') { res.send('Oops you searching for nothing, well here is nothing!'); }; | |
async.waterfall([ | |
function(callback) { | |
var contact = req.body.searchContacts.toLowerCase() | |
User.find({$or:[ | |
{firstName: contact }, | |
{lastName : contact }, |
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
/* | |
TIME BASED ANIMATION: | |
--------------------- | |
To keep things moving at a constant time-based rate instead of varying | |
frame-based, multiply your movement by APP.deltaTime | |
BAD: 100 pixels per frame (BOO... movement is tied to framerate) | |
var velocity = 100; | |
BETTER: 100 pixels per second (Horray! Framerate independence!) |