Skip to content

Instantly share code, notes, and snippets.


Jo Boiteau jobwat

View GitHub Profile
jobwat / commands
Created Mar 10, 2017
Docker nodes load balancer with nginx upstream
View commands
# Run 3 nodes
for i in 1 2 3; do
mkdir $nod
echo "$nod" >> $nod/index.html
docker run -d --name $nod -p 888${i}:80 -v `pwd`/${nod}:/usr/share/nginx/html:ro nginx
# Run a router proxy node
docker run --rm --name router -p 8888:80 -v `pwd`/default.conf:/etc/nginx/conf.d/default.conf nginx
jobwat / Dockerfile
Created Mar 9, 2017
Docker node crontab
View Dockerfile
FROM node:6
RUN apt-get update && apt-get -y install cron
RUN mkdir /app
ADD test.js /app
# Add crontab file in the cron directory
ADD crontab /etc/cron.d/hello-cron
jobwat / Dockerfile-app
Created Jan 24, 2017
Codeship demo case: write CI environment variables to file in image
View Dockerfile-app
FROM busybox
jobwat /
Last active Feb 24, 2017
Send a file to snappass with curl via command line
cat my-file | curl -s --data "password=$(cat - | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg')&ttl=1+day" | grep 'password-link.*readonly' | sed -E 's/.*"(http[^"]*)".*/\1/'
jobwat / tmux.pres.remark.html
Created Oct 26, 2016
Quick Presentation tmux - remark
View tmux.pres.remark.html
<!DOCTYPE html>
<meta charset="utf-8">
@import url(;
@import url(,700,400italic);
@import url(,700,400italic);

Keybase proof

I hereby claim:

  • I am jobwat on github.
  • I am jobwat ( on keybase.
  • I have a public key whose fingerprint is 13BB 4AB0 583F 7337 5F24 CF95 EE58 D592 4AF7 781A

To claim this, I am signing this object:

jobwat /
Last active Dec 3, 2019
update .ssh/config with CloudFormation stack IPs
script_name=`basename $0`
echo "[${script_name}] Error: $@. Exiting."
exit 1
jobwat / 0_reuse_code.js
Created Jan 11, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
jobwat / consul.lua
Last active Jul 21, 2018 — forked from gmr/consul.lua
Dynamic Nginx upstream nodes using Consul
View consul.lua
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
jobwat / payload.json
Last active Aug 29, 2015
Curl message into a channel
View payload.json
\"text\": \"RELEASE has been released at URL \",
\"channel\": \"#CHANNEL\",
\"username\": \"USERNAME\",
\"icon_emoji\": \"EMOJI\"