Remove package's dependencies (does not remove package):
brew deps [FORMULA] | xargs brew remove --ignore-dependencies
Remove package:
function Polygon(height, width) { //class constructor | |
this.name = 'Polygon'; | |
this.height = height; | |
this.width = width; | |
} | |
Polygon.prototype = { | |
sayName: function () { //class method | |
console.log('Hi, I am a ' + this.name + '.'); | |
} |
let [one, two] = [1, 2]; | |
let {a:three, b:four} = {a: 3, b: 4}; | |
console.log(one, two, three, four); // 1 2 3 4 |
function* range(start, end, step) { | |
while (start < end) { | |
yield start; | |
start += step; | |
} | |
} | |
for (let i of range(0, 10, 2)) { | |
console.log(i); | |
} |
// Generated on 2014-07-08 using generator-angular 0.9.3 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
var modRewrite = require('connect-modrewrite'); |
function prefetch(getKey, getValue, getInitialValue, propName) { | |
const inFlight = new Set(); | |
const cache = new Map(); | |
return ChildComponent => { | |
return class extends React.Component { | |
state = {value: getInitialValue(this.props)}; | |
componentWillReceiveProps(nextProps) { | |
const key = getKey(nextProps); | |
if (cache.has(key)) { | |
// Use cached value |
global | |
chroot /var/lib/haproxy | |
crt-base /etc/pki/tls/certs | |
daemon | |
group haproxy | |
log 127.0.0.1 local0 | |
maxconn 2000 | |
pidfile /var/run/haproxy.pid | |
stats socket /var/lib/haproxy/stats | |
tune.ssl.default-dh-param 2048 |
'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'); |
# 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 |
upstream project { | |
server 22.22.22.2:3000; | |
server 22.22.22.3:3000; | |
server 22.22.22.5:3000; | |
} | |
server { | |
listen 80; | |
location / { |