I hereby claim:
- I am bjwschaap on github.
- I am bjwschaap (https://keybase.io/bjwschaap) on keybase.
- I have a public key whose fingerprint is DF78 DCE0 729D 610D 5453 F6FE AA51 B7C2 0EF9 CAED
To claim this, I am signing this object:
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "net/http" | |
| "os/signal" | |
| "sync" | |
| "syscall" | |
| "time" |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "math/rand" | |
| "sync" | |
| "time" | |
| log "github.com/sirupsen/logrus" |
| server { | |
| listen 80; | |
| server_name 192.168.33.11; | |
| root /usr/share/nginx/html; | |
| index index.php index.html index.htm; |
| <?php | |
| header('Vary: Accept-Language'); | |
| $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
| switch ($lang) { | |
| case "en": | |
| header('Content-Language: en-US'); | |
| echo "Hello World!"; | |
| break; | |
| case "nl": | |
| header('Content-Language: nl-NL'); |
I hereby claim:
To claim this, I am signing this object:
First we create 3 ubuntu 14.04 hosts with docker 1.11.1 on them.
docker run -d -p 8500:8500 -h consul --name consul progrium/consul -server –bootstrap
DOCKER_OPTS="-H tcp://0.0.0.0:2375
-H unix:///var/run/docker.sock
--cluster-store=consul://$MASTER_IP:8500/network \
| ## Digest, as per documentation, no joy.. | |
| /# curl -v --digest -u dbxbsc http://localhost:9990/management/ -d '{"operation":"connection-info" }' -HContent-Type:application/json | |
| Enter host password for user 'dbxbsc': | |
| * About to connect() to localhost port 9990 (#0) | |
| * Trying 127.0.0.1... connected | |
| * Connected to localhost (127.0.0.1) port 9990 (#0) | |
| * Server auth using Digest with user 'dbxbsc' | |
| > POST /management/ HTTP/1.1 | |
| > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 | |
| > Host: localhost:9990 |