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
diagram { | |
signup -> email -> clickConfirm -> activate -> dashboard | |
lane user { | |
signup [label = "Signup for service"]; | |
clickConfirm [label = "Click confirm link"]; | |
} | |
lane application { | |
email [label = "Send activation email"]; |
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" : /Dan/ | |
} |
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
time heroku open | |
Opening http://...herokuapp.com/ | |
real 0m8.357s | |
user 0m3.502s | |
sys 0m0.467s |
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 mongoose = require('mongoose') | |
, Schema = mongoose.Schema | |
, ObjectId = Schema.ObjectId; | |
var QuestSchema = new Schema({ | |
name: String | |
, loc: { | |
lng: Number | |
, lat: Number | |
} |
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
Hank:~ deedubs$ npm info | |
Error: npm doesn't work with node v0.4.7 | |
Required: [email protected] || 0.7 || 0.8 | |
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:60:23 | |
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:80:2) | |
at Module._compile (module.js:404:26) | |
at Object..js (module.js:410:10) | |
at Module.load (module.js:336:31) | |
at Function._load (module.js:297:12) | |
at Array.0 (module.js:423:10) |
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 myplugin = express.createServer() | |
, ready = false; | |
myplugin.get('/:verb/allthe/:nouns', function(req, res) { | |
if(ready) { | |
console.log(myplugin.app); // here too |
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 userSchema = new Schema({ | |
email: String | |
, passwordHash: String | |
}); | |
userSchema.pre('validate', function(next) { | |
if (this.password === this.passwordConfirm) { | |
this.set('passwordHash', hash(this.password); | |
this.set('passwordHash',undefined); |
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
sudo npm -g i hook.io | |
npm http GET https://registry.npmjs.org/hook.io | |
npm http 304 https://registry.npmjs.org/hook.io | |
npm http GET https://registry.npmjs.org/colors | |
npm http GET https://registry.npmjs.org/async | |
npm http GET https://registry.npmjs.org/optimist | |
npm http GET https://registry.npmjs.org/eventemitter2 | |
npm http GET https://registry.npmjs.org/nconf | |
npm http GET https://registry.npmjs.org/pkginfo | |
npm http GET https://registry.npmjs.org/mkdirp |
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
app.post('/user/ban/:userId', function(req, res){ | |
req.user.bannedReason = req.body.bannedReason; | |
req.user.banned = true; | |
console.log(req.user.id) | |
req.user.save(function(err) { | |
if (err) { | |
req.flash('info','User banned:' + req.body.bannedReason); | |
} else { | |
req.flash('info','User cannot be banned'); | |
} |
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
Hi Dan, | |
I sent you a note three months ago about a role at Skype and I did not hear from you. I | |
The javascript/backbone.js team is expanding and I'd you to considering working with Skype. | |
Based on your background, you would perform in the job very well and you will absolutely love the office and people. I am excited to be representing this team and if you meet them, you'll understand why. | |
As an added bonus, there's a chance they won't find you irritating or boring. | |
Send me a note, let's get you to Palo Alto. | |
-T |