Skip to content

Instantly share code, notes, and snippets.

@vpack
vpack / swarm.md
Last active October 30, 2015 20:48
DockerSwarm

SWARM:

docker run swarm create
# Copy the token and save it - af36e582ba1ab24de52c707d54b02547

docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 local-swarm-master

docker-machine create -d virtualbox --swarm --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 swarm-agent-00 
docker-machine create -d virtualbox --swarm --swarm-discovery token://af36e582ba1ab24de52c707d54b02547 swarm-agent-01
@vpack
vpack / 01GenerateCert.md
Last active October 24, 2015 17:03
Consul HTTPS API Troubleshooting
$ cd consul/ssl
$ openssl req -x509 -newkey rsa:2048 -days 3650 -nodes -out ca.cert
Generating a 2048 bit RSA private key
............+++
......................................................................+++
writing new private key to 'privkey.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
@vpack
vpack / 1.md
Last active October 21, 2015 13:33
Microservices with AWS Lambda and API Gateway
@vpack
vpack / ElasticSearch.md
Last active October 19, 2015 13:02
Log Processing : Kafka / Log.io / ELK

Installation

$ sudo yum -y install java
$ sudo yum -y install https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.3.noarch.rpm
Creating elasticsearch group... OK
Creating elasticsearch user... OK
  Installing : elasticsearch-1.7.3-1.noarch                                                                                              1/1
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
Deregister from ELB for rolling upgrade
https://github.com/clareliguori/simple-calculator-website/blob/master/scripts/common_functions.sh
@vpack
vpack / Virtualenv
Last active October 4, 2015 12:46
Virtualenv
===VirutalEnv===
mkvirtualenv testenv2
mkvirtualenv testenv
workon
workon testenv2
cdvirtualenv
cdsitepackages
@vpack
vpack / tmux.md
Last active March 16, 2017 15:23
tmux

Same as Screen but better

screen split commands

<ctrl> a - enter command mode
S - split uppercase
Q - close - uppercase
| - vertical split
tab - tab to other windows
@vpack
vpack / mplayer.md
Last active August 29, 2015 14:26
mplayer options

mplayer options


mplayer --novideo some.mpg
mplayer -loop 0 some.mp3 // Repeat
@vpack
vpack / docker-machine.md
Last active August 29, 2015 14:26
Docker-machine

Download docker-machine

curl -L https://github.com/docker/machine/releases/download/v0.4.1/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
https://github.com/docker/machine/releases/download/v0.3.1/docker-machine_darwin-amd64
chmod +x /usr/local/bin/docker-machine
docker-machine -v

Commands