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 express = require('express'), | |
app = express(); | |
app.get('/', function(req, res) { | |
res.contentType('application/json'); | |
res.send(process.env); | |
}); | |
app.listen(process.env.PORT); |
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 request = require('request'); | |
var express = require('express'); | |
var app = express(); | |
app.get('/goofy', function(req, res) { | |
request('http://images1.wikia.nocookie.net/__cb20120715102950/disney/images/a/a5/Disneygoofy2012.jpeg').pipe(res); | |
}); | |
app.get('/loop', function(req, res) { | |
res.render('mypage'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.12156862765550613</real> | |
<key>Green Component</key> | |
<real>0.12156862765550613</real> |
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.getCollectionNames().forEach(function(name) { | |
print(name + ' - ' + Object.keys(db[name].findOne() || {}).length); | |
}); |
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
module.exports = function() { | |
var cache = {}, | |
expires = 1000 * 60 * 60; // default expiration, 1 hour | |
var isValid = function(key) { | |
if(!cache.hasOwnProperty(key) || cache[key].expires <= Date.now()) { | |
return false; | |
} | |
return 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
About 2017 | |
by Richard Key | |
Revolutions or Jupiter Ascending? | |
Live-tweeting the conf. Stay tuned! | |
Two states: working or crashing. | |
Great apps and really great people. | |
I care about it Star Wars Connect. | |
If so where can I submit a couple? |