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
// HOPED-FOR BEHAVIOR: both /cats.txt AND /cats/cats.txt say: Cats Static | |
// ACTUAL BEHAVIOR: /cats.txt says Cats Static, but /cats/cats.txt says: Main Wildcard | |
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
// Adding the static middleware at the beginning means it wins out over any routes present | |
// (but only interferes if the file exists) |
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
// HOPED-FOR BEHAVIOR: /cats says: Cats Home | |
// ACTUAL BEHAVIOR: /cats says: Main Wildcard | |
var express = require('express'); | |
var app = express(); | |
app.get('/', function(req, res) { | |
res.send('Main Home'); | |
}) |
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
app/console dukelist:migrate-legacy-database --env=prod |
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/www/dukelist/app/console dukelist:cleanup --env=prod |
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
(cd /var/www/dukelist && ./app/console dukelist:cleanup --env=staging) | |
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
(cd /var/www/dukelist && ./app/console dukelist:cleanup --env=prod --send-emails) |
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
./symfony doctrine:build --all --db --env=prod | |
./symfony project:sync-content frontend prod from staging@staging | |
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
alias gitc='git add -A . && git commit && git pull && git push' |
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 res = // Any input stream | |
var out = fs.createWriteStream(localPath); | |
res.pipe(out); | |
var dead = false; | |
function die(err) { | |
if (!dead) { | |
dead = true; | |
res.end(); | |
out.end(); | |
return callback(err); |
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
function Thing() { | |
var self = this; | |
// Thing is now an event emitter/receiver | |
require('events').EventEmitter.call(self); | |
} | |
var thing = new Thing(); | |
thing.emit('foo'); |