Skip to content

Instantly share code, notes, and snippets.


Jean-Laurent de Morlhon jeanlaurent

View GitHub Profile

If you plan to attend this workshop in a conference, as network availibility is often flaky, please check you have the following :

  • A laptop + cord
  • Install docker 1.11
    • Install with Toolbox for windows or for Mac
    • If you haven't done it already, register for the Docker for desktop beta at, and give us your hub account name during the session we can probably do something for you.
  • Test your docker installation works fine
    • docker run hello-world and check you see the welcome message
    • docker run -p 8080:80 nginx and open your browser to your machine on port 8080 and check you see nginx default page.
  • Warm up your local docker machine with the following images :
    • docker pull dockerdemos/lab-web
name = Jean-Laurent de Morlhon
email =
co = checkout
st = status
br = branch
ci = commit
pr = pull --rebase
cia = commit --amend --no-edit
jeanlaurent / .slate
Last active Oct 16, 2017
Slate config file
View .slate
#half left - full - half right
bind 1:alt,cmd move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
bind 2:alt,cmd move screenOriginX;screenOriginY screenSizeX;screenSizeY
bind 3:alt,cmd move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
#1/3 left - center - right
bind 4:alt,cmd move screenOriginX;screenOriginY screenSizeX/3;screenSizeY
bind 5:alt,cmd move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY
jeanlaurent / gist:e65e70a89da3ead4c595
Created Dec 2, 2015
VBoxManage.exe list hostonlyifs
View gist:e65e70a89da3ead4c595
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: cd53cf39-13e8-40d0-b24d-55b04cf31c82
DHCP: Disabled
IPV6Address: fe80:0000:0000:0000:2182:a89c:b9de:eabd
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
FULL_BASH_VERSION=`bash --version | head -1 | cut -d' ' -f4 | cut -d'.' -f1-3`
BASH_VERSION=`bash --version | head -1 | cut -d' ' -f4 | cut -d'.' -f1`
echo "Current bash version is $FULL_BASH_VERSION"
if [[ $BASH_VERSION -ge 4 ]]; then
echo "Your BASH version is ok"
echo "Your BASH version is too low"
jeanlaurent /
Created Nov 19, 2015
This check the current dns setting on mac against the current dns settings in the docker machine default
diff <(scutil --dns | grep 'nameserver\[[0-9]*\]' | cut -d' ' -f5 | sort | uniq) <(docker-machine ssh default cat /etc/resolv.conf | cut -d' ' -f2)
# Docker
isMachineUp=$(docker-machine status default)
if [ $isMachineUp == "Stopped" ]; then
printf "CTRL-C now, to prevent starting default docker machine\n"
read -t 3 -p ""
docker-machine start default
eval $(docker-machine env default)
echo "Active docker machine is $(docker-machine active)"

Keybase proof

I hereby claim:

  • I am jeanlaurent on github.
  • I am jeanlaurent ( on keybase.
  • I have a public key whose fingerprint is 266E 1750 9C20 0805 AF53 77E9 8985 5228 9C87 6AB0

To claim this, I am signing this object:

b2dstatus=$(boot2docker status)
b2dip="$(boot2docker ip 2>/dev/null)"
if [ "$?" -ne 0 ]; then
message="on $b2dip"
echo boot2docker is $b2dstatus $message
View concurrency.go
package main
import (
// Walk walks the tree t sending all values
// from the tree to the channel ch.