This file contains hidden or 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
angular | |
.module('myApp', ['myApp.controllers']) | |
.controller('PostController',require('./controllers/posts')) | |
.config(function($routeProvider, $locationProvider) { | |
$locationProvider.html5Mode(true); | |
$routeProvider | |
.when('/', {templateUrl: 'index', controller: PostController}) | |
.when('/posts/:postId', {templateUrl: 'posts/show', controller: require('./controllers/posts')}) | |
.otherwise({redirectTo:'/'}); |
This file contains hidden or 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 Debug = require('debug') | |
, debug = Debug('router'); | |
require('./controllers'); | |
angular | |
.module('myApp', ['myApp.controllers']) | |
.config(function($routeProvider, $locationProvider) { | |
$locationProvider.html5Mode(true); |
This file contains hidden or 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
{ | |
"name": "flint", | |
"repo": "Igniter/guata", | |
"description": "Life is a journey", | |
"version": "0.0.1", | |
"keywords": [], | |
"dependencies": { | |
"visionmedia/debug": "*", | |
"component/emitter": "*", | |
"deedubs/throttle": "*", |
This file contains hidden or 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
<script type="text/javascript" src = "http://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBai0Pn63gLIaI1AlBpSWuCg6IT2CxpRRw&sensor=true"></script> |
This file contains hidden or 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
db.users.find({email : "[email protected]" }); | |
{ "__neoId" : "173", "__password" : { "salt" : "0XjwgeB4zvYVZe68uScObWskpmdbj7ZVVUCdD0pchEuDQFnQh1Q1QYRUGQ3aFNG24tuwqtITde4+mYgHbDs+h88Y4bfpcl8y2mxq++e3LSffbH/vfZP29GPZd8/1f37Ouh1qB5AODlXKaO2bL6YXi4dN4U7AJVJF0m4FQcBoajA=", "hash" : " ÐÕÓí¬1j\u000b©j\u0017ü|Yðøzt²3À*UjF5ôÁl+\u0014Vpž\u0010\u001aªý°âyN³ö; ©°:N ¾¯ç쥪¨¥ö?g\u001bX«ûY\u0001®.Rÿ\u001f+ÝmF\u0004\rhQrú¬n\u0017źA¢\u001c\u0010XX\u001f0\nv\u0002RÙW§\u0006aï ;+°·ø" } | |
, "_id" : ObjectId("50b62cb856d488de3e000001") | |
, "description" : null | |
, "email" : "[email protected]" | |
, "homeBase" : null | |
, "invitationsCount" : 2 | |
, "joinedAt" : ISODate("2012-11-29T18:53:37.475Z") | |
, "name" : "Carolina Urquhart" |
This file contains hidden or 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
<p>Hi there #{user.name}!<p> | |
<p>This week in the socialsca.pe we welcomed #{newUsers.length} new members.</p> | |
<p>Below you'll see a short list of those we think you might be most interested in.</p> | |
<p>To keep improving these recommendations, try updating your profile and </p> | |
<a href="#{url+ '/invite'}">add more friends and colleagues </a>to the <a href="#{url}">socialsca.pe.</a> | |
if invited && invited.length > 0 | |
#{invited.length} member(s) that you invited have now joined | |
</p> |
This file contains hidden or 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
, Email = require('starscape-email') | |
var options = { | |
template: "weeklyEmail.template", | |
locals: { newUsers: "3", stats : "x"}, //TODO Load stats | |
subject: weeklyEmail.subject, | |
from : weeklyEmail.from, | |
category: weeklyEmail.category | |
}; |
This file contains hidden or 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 sha = crypto.createHash('sha1'); | |
sha.update((new Date()).toString() + invitedUser.email); | |
invitedUser.token = sha.digest('hex'); | |
User.save(invitedUser, function (err, invitedUser) { | |
User.addOrganizations(invitedUser, organizations, function() { | |
callback(err, invitedUser); | |
}); |
This file contains hidden or 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
router.post('/signin', function (req, res) { | |
User | |
.findOne({ email: req.body.email }, function(err, user) { | |
if(user && user.__password.salt) { | |
pass.hash(req.body.password, user.__password.salt, function(err, hash) { | |
if(user.__password.hash == hash) { | |
req.session._userId = user._id; | |
res.json(user); | |
} else { | |
res.send(401); |
This file contains hidden or 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
Map.focus = function (object, zoomLevel) { | |
Map.clearLines(); | |
var location = object && object.location(); | |
if (location) { | |
Map.$map.panTo(location); | |
// Map.$map.setZoom(zoomLevel || 10); | |
} |