Skip to content

Instantly share code, notes, and snippets.

docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
docker run —name nama-domain-id -e "VIRTUAL_HOST=nama.domain.id" -d tlongren/docker-wordpress-nginx-ssh:latest
go get -u golang.org/x/tools/cmd/goimports
go get -u golang.org/x/tools/cmd/gorename
go get -u github.com/sqs/goreturns
go get -u github.com/nsf/gocode
go get -u github.com/alecthomas/gometalinter
go get -u github.com/zmb3/gogetdoc
go get -u github.com/rogpeppe/godef
go get -u golang.org/x/tools/cmd/guru
go get github.com/Unknwon/goconfig
go get github.com/derekparker/delve/cmd/dlv
@fthamura
fthamura / .tmux.conf
Created April 12, 2016 14:24
.tmux.conf
set-option -gq mouse-utf8 on
set-option -gq mouse-resize-pane on
set-option -gq mouse-select-pane on
set-option -gq mouse-select-window on
set-window-option -gq mode-mouse on
set -g default-terminal "screen-256color"
set -g mouse-select-pane on
docker-machine create --driver virtualbox consul1
eval $(docker-machine env consul1)
docker pull progrium/consul
docker run -d --name consul -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 progrium/consul -server -bootstrap -ui-dir /ui
docker-machine ip consul1
192.168.99.100
docker pull centos:7
- List locally, installed images
docker images
- Show all images, including itermmediate
docker images -a
- Run a linux command inside a docker container:
docker run --rm centos:7 echo "hello world"
@fthamura
fthamura / docker-java
Last active October 10, 2015 14:47
Docker Java Steps from Arun Gupta's
Full tutorial: https://htmlpreview.github.io/?https://github.com/javaee-samples/docker-java/blob/master/readme.html
etc/hosts
192.168.99.100 dockerhost
docker run swarm create
mervo@sharkbay:~$ docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://[from swarm create] swarm-master
docker-machine start lab
eval "$(docker-machine env lab)"
@fthamura
fthamura / bosh-sync-blobs
Last active August 29, 2015 14:04
bosh sync blobs
meruvian@baremerv:~/cf/cf-release$ bosh sync blobs
Syncing blobs...
go-buildpack/go-buildpack-offline-b7.zip downloading 256.6M (141%).../var/lib/gems/1.9.1/gems/blobstore_client-1.2652.0/lib/blobstore_client/base.rb:63:in `rescue in get': Failed to fetch object, underlying error: #<HTTPClient::ReceiveTimeoutError: execution expired> /usr/lib/ruby/1.9.1/openssl/buffering.rb:121:in `sysread' (Bosh::Blobstore::BlobstoreError)
/usr/lib/ruby/1.9.1/openssl/buffering.rb:121:in `readpartial'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:349:in `readpartial'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:927:in `block in read_body_length'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:925:in `read_body_length'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:688:in `get_body'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient.rb:1065:in `do_get_block'
/var/lib/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient.rb:869:in `block in d
@fthamura
fthamura / bosh-lite
Created July 28, 2014 12:22
bosh-lite
git clone https://github.com/cloudfoundry/bosh-lite
git clone https://github.com/cloudfoundry/cf-release
# gem install bosh_cli
cd bosh-lite
vagrant up
bosh target 192.168.50.4
bosh login (admin/admin)