Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install -y git curl nginx-full
sudo apt-get install -y php5-fpm php5-cli php5-curl php5-intl php5-json
sudo apt-get install -y php5-intl php5-xdebug php5-curl php5-ldap
sudo apt-get install -y mongodb-org php5-mongo
sudo apt-get install -y libav-tools libavcodec-extra
[unix_http_server]
file=/tmp/supervisor.sock ; the path to the socket file
[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
loglevel=info ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
authoritative;
ddns-updates on;
ddns-update-style interim;
ddns-rev-domainname "in-addr.arpa.";
option domain-name-servers 8.8.8.8;
option ntp-servers us.pool.ntp.org;
ignore client-updates;
pvcreate /dev/sdd
# create a volume group named 'docker' (replace /dev/sdd with your block device)
vgcreate docker /dev/sdd
# create a thin pool named 'thinpool'; in this example, the data LV is 95% of the 'docker' volume group size (leaving free space allows for auto expanding of either the data or metadata if space is runs low as a temporary stopgap)
lvcreate --wipesignatures y -n thinpool docker -l 95%VG
lvcreate --wipesignatures y -n thinpoolmeta docker -l 1%VG
# convert the pool to a thin-pool
@udomsak
udomsak / nomad-client-nodes.json
Created February 15, 2017 05:26
nomad client HTTP GET port 4646/v1/nodes
[
{
"ID": "b26dba01-d6d1-a742-b6a9-94140ede2739",
"Datacenter": "dc1",
"Name": "nomad-client",
"NodeClass": "",
"Drain": false,
"Status": "ready",
"StatusDescription": "",
"CreateIndex": 55,
@udomsak
udomsak / nomad-client-agent-self.json
Created February 15, 2017 05:23
nomad clinet /v1/agent/self ( HTTP port 4646 )
{
"config": {
"Addresses": {
"HTTP": "10.0.2.15",
"RPC": "10.0.2.15",
"Serf": "10.0.2.15"
},
"AdvertiseAddrs": {
"HTTP": "10.0.2.15:4646",
"RPC": "10.0.2.15:4647",
@udomsak
udomsak / build-watchman.txt
Last active January 7, 2017 11:06
build facebook watchman
# #Ubuntu Installation ##
apt-get install -y git build-essential automake python-dev make
git clone https://github.com/facebook/watchman.git
cd watchman
git checkout v4.7.0 # the latest stable release
./autogen.sh
./configure
make
make install
apt-get update
apt-get install python-dev make
curl -L http://bit.ly/glances | /bin/bash
@udomsak
udomsak / run-rpm.sh
Last active September 2, 2016 13:28
yum update
yum install -y curl python-devel make python-pip
curl -L http://bit.ly/glances | /bin/bash