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.use(express.logger('dev')); | |
| app.use(express.static(__dirname + "/dist")); | |
| app.listen(process.env.PORT || 5000); |
This file has been truncated, but you can view the full file.
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
| webpackJsonp([2], { | |
| 0: function(e, t, n) { | |
| "use strict"; | |
| var i = n(1)["default"]; | |
| n(657); | |
| var s = n(5929) | |
| , r = i(s) | |
| , a = n(34) | |
| , o = i(a) | |
| , l = n(25) |
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
| server { | |
| listen 80; | |
| server_name _; | |
| access_log /var/log/nginx/access.log; | |
| # send requests matching ~ with .php extension to /usr/share/nginx/www | |
| # handle with fastcgi | |
| location ~ \.php$ { | |
| root /usr/share/nginx/www; | |
| fastcgi_pass 127.0.0.1:9000; |
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
| alias cgrep="grep --color=always" | |
| todo () { | |
| echo "$1 $2" | |
| local cmd="ghi" | |
| local end="-- skorlir/todo" | |
| if [ "$1" = "--help" ] || [ "$1" = "help" ]; then | |
| echo $(sed 's/ {2,}//g' << EOC |
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
| // Array.sort(byVolume) | |
| function byVolume (a, b) { | |
| va = a[0] + a[1] + a[2] | |
| vb = b[0] + b[1] + b[2] | |
| if (va > vb) | |
| return -1 | |
| else if (vb > va) | |
| return 1 | |
| return 0 | |
| } |
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
| // Array.sort(byVolume) | |
| function byVolume (a, b) { | |
| va = a[0] + a[1] + a[2] | |
| vb = b[0] + b[1] + b[2] | |
| if (va > vb) | |
| return -1 | |
| else if (vb > va) | |
| return 1 | |
| return 0 | |
| } |
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 T = [ | |
| [ 1, 2, 3 ], | |
| [ 2, 2, 2 ], | |
| [ 3, 2, 1 ] | |
| ] | |
| var symbols = [ 1, 2, 3 ] | |
| function translateToProduct (k, i, ps) { |
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('/signup', function (req, res, next) { | |
| passport.authenticate('whatever', function () { | |
| console.log('passport custom callback!'); | |
| console.log(arguments); | |
| res.send(); | |
| })(req, res, next) | |
| }); |
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
| /** USAGE(jordan, 8/19/15): | |
| * | |
| * // NOTE: StackLogger combines each stacked message with newlines. | |
| * | |
| * var _error = ErrorStackLogger('My Error Generating Class has an Error:'); | |
| * // or, equivalently: | |
| * var _error = StackLogger('error', 'My Error Generating Class has an Error:'); | |
| * | |
| * _error('Bad input.') // => 'My Error Generating Class has an Error:' | |
| * // ' Bad input.' |
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 router = express.Router() | |
| , Response = require('../models/response.js'); | |
| // NOTE(jordan): LET'S BUILD TEH SUPERROUTE | |
| router.get('/:program/:pfilter?/:endpoint/:efilter?/:action?', function(req, res) { | |
| // NOTE(jordan): so many optional parameters!!! | |
| var program = req.params.program | |
| , pfilter = req.params.pfilter | |
| , endpoint = req.params.endpoint |
NewerOlder