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
return { | |
name:list.name, | |
videos:videos.filter(function(video){ | |
return list.id === video.listId; | |
}).concatMap(function(video){ | |
return Array.zip( | |
bookmarks.filter(function(bookmark){ | |
return video.id === bookmark.videoId; | |
}), | |
boxarts.filter(function(boxart){ |
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
extends layout | |
block scripts | |
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js") | |
script(src="javascripts/index.js") | |
block content | |
div(ng-app="nightlife" ng-controller="NightlifeCtrl as nl") | |
button(class="btn" ng-click="findBars()") | |
| Find local bars | |
div(ng-repeat="bar in bars") |
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
passport.use(new LocalStrategy(function (username, password, done) { | |
'use strict'; | |
var findUser = User.findOne({username: username}).exec(); | |
var verifyUserPassword = findUser.then(function(user){ | |
return new Promise(function(resolve, reject) { | |
if (!user) { | |
// Password can't match against a nonexistent user's password | |
return resolve({isMatch:false, user:user}); |
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
$(document).ready(function() { | |
var i = 2; | |
setInterval(function() { | |
var setSearchBgimg = function setSearchBgimg(number) { | |
$(".search-bgimg").css("background", "url('/static/img/search-bgimg' + number + '.jpg')"); | |
} | |
$(".search-bgimg").hide(); | |
setSearchBgimg(i); | |
console.log('/static/img/search-bgimg' + i + '.jpg'); | |
$(".search-bgimg").fadeIn(); |
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 test = require('tape'); | |
var request = require('supertest'); | |
var url = 'localhost:3000'; | |
test('Bad login tests', function (t) { | |
var badLogin = function badLogin(username, password, message){ | |
return request(url).post('/login').send({ | |
username: username, | |
password: password | |
}) |
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
/* globals console: false, require: false, process: false, module: false */ | |
var express = require('express'); | |
var async = require('async'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var session = require('express-session'); | |
var mongoose = require('mongoose'); |
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
/* globals console: false, require: false, process: false, module: false */ | |
var express = require('express'); | |
var async = require('async'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var session = require('express-session'); | |
var mongoose = require('mongoose'); |
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
/* globals module: false, require: false, console: false */ | |
var test = require('tape'); | |
var request = require('supertest-as-promised'); | |
var addFriend = function addFriend(t, agent, username) { | |
'use strict'; | |
// Returns a promise of a post /friend request and handles request errors | |
return agent.post('/friend') | |
.send({ | |
username: username |
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
17.Request.create @ socket.io-1.3.5.js:2 | |
Request @ socket.io-1.3.5.js:2 | |
17.XHR.request @ socket.io-1.3.5.js:2 | |
17.XHR.doPoll @ socket.io-1.3.5.js:2 | |
18.Polling.poll @ socket.io-1.3.5.js:2 | |
18.Polling.doOpen @ socket.io-1.3.5.js:2 | |
14.Transport.open @ socket.io-1.3.5.js:1 | |
13.Socket.open @ socket.io-1.3.5.js:1 | |
Socket @ socket.io-1.3.5.js:1 | |
Socket @ socket.io-1.3.5.js:1 |
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
Error: [$rootScope:inprog] http://errors.angularjs.org/1.3.15/$rootScope/inprog?p0=%24digest | |
at Error (native) | |
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js:6:417 | |
at p (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js:118:370) | |
at n.$get.n.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js:126:224) | |
at HTMLDivElement.updateTitleScroll (http://localhost:3000/js/index.js:74:14) | |
at HTMLDivElement.x.event.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js:5:10006) | |
at HTMLDivElement.x.event.add.y.handle (https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js:5:6789) | |
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js:67:323 | |
at https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js:89:326 |
OlderNewer