#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
res.sendfile('./public/index.html'); |
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
upstream project { | |
server 22.22.22.2:3000; | |
server 22.22.22.3:3000; | |
server 22.22.22.5:3000; | |
} | |
server { | |
listen 80; | |
location / { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
# Installing tmux on Amazon-EC2 | |
# If you don't have libevent install use wget to install the libevent and install | |
wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz | |
tar zxf libevent-2.0.18-stable.tar.gz | |
sudo ./configure & sudo make install | |
# If you don't have curses install use yum to install the curses |
function keepTrying(otherArgs, promise) { | |
promise = promise||new Promise(); | |
// try doing the important thing | |
if(success) { | |
promise.resolve(result); | |
} else { | |
setTimeout(function() { | |
keepTrying(otherArgs, promise); |