Skip to content

Instantly share code, notes, and snippets.

Christophe Labouisse ggtools

Block or report user

Report or block ggtools

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ggtools /
Last active Jun 5, 2019
Implementation of PostgreSQL values construct
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql.expression import FromClause
class values(FromClause):
named_with_column = True
def __init__(self, columns, *args, **kw):
self._column_args = columns
self.list = args
self.alias_name = = kw.pop('alias_name', None)
ggtools /
Created Feb 13, 2017
Update services secrets
#!/usr/bin/env bash
for service in $(docker service ls -f "label=le_auto" -q)
echo "Checking service $service"
docker service inspect --format '{{json .Spec.TaskTemplate.ContainerSpec.Secrets}}' $service \
| sed -r 's/("File":\{)/\n/g' \
| sed -n -r '/Name/ s/"[^"]+":"([^"]+)"[^"]+/\1 /g;s/"Mode":([[:digit:]]+)[^[:alnum:]]*/\1 / p' \
| ( while read target uid gid mode secret_id secret
ggtools /
Created Feb 13, 2017
Docker Secrets & Letsencrypt automation
#!/usr/bin/env bash
SECRETS=$(docker secret ls | tail -n +2 | awk '{print $2}')
find $LE_ARC_DIR -name 'fullchain*.pem' -o -name 'privkey*.pem' | sed "s,$LE_ARC_DIR/,," | while read file
base_file=$(basename $file .pem | sed -r 's/[0-9]+$//')
version=$(basename $file .pem | sed -r 's/^.*?([0-9]+)$/\1/')
View Dockerfile
/run/secrets/site.crt FROM nginx
COPY site.conf /etc/nginx/conf.d/
ggtools / convoy.service
Created Feb 3, 2017
Systemd unit for convoy
View convoy.service
Description=Convoy Daemon
ExecStart=/usr/local/bin/convoy daemon --drivers vfs --driver-opts vfs.path=/path/to/convoy/volume/storage
sed -i 's,"url":","url":"http://mirror.mirror.on.the.wall/plugins/,g' /var/jenkins_home/updates/default.json
ggtools / docker-pfw.conf
Last active Dec 14, 2016
Shell hack to protect Docker published services from being accessible through a public interfaces
View docker-pfw.conf
ExecStartPost=-/usr/local/bin/ start
ExecStopPost=-/usr/local/bin/ stop
ggtools / logstash.conf
Last active Oct 12, 2017
Logstash configuration for Docker + Spring Boot applications
View logstash.conf
input {
gelf {
type => docker
port => 12201
filter {
multiline {
pattern => "^%{TIMESTAMP_ISO8601}"

Keybase proof

I hereby claim:

  • I am ggtools on github.
  • I am clabouisse ( on keybase.
  • I have a public key whose fingerprint is AF03 78CE 6C5A F3C4 6C51 E7CE FB49 83B4 1AD2 5EC7

To claim this, I am signing this object:

ggtools /
Created Nov 17, 2014
Script to retrieve some information/metrics for a Docker container.
#!/usr/bin/env python
__author__ = 'Christophe Labouisse'
import argparse
import re
import os
from docker import Client
from docker.utils import kwargs_from_env
You can’t perform that action at this time.