Skip to content

Instantly share code, notes, and snippets.


Docker Swarm with Macvlan, Consul and Autoscaling


This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.

Bonus: We add an autoscaling API called Orbiter (

I just want to run containers, like now, on my existing infrastructure and networks!

So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a

manufitoussi / sync.html
Last active Mar 17, 2020
Synchronisation between iframe hash and hosting window hash. Usefull with an Ember application with routes hosted in an iframe
View sync.html
<!DOCTYPE html>
<html lang="fr-fr">
<meta charset="utf-8">
<title>Ember App in an iframe</title>
body {
nirenjan / bishop.c
Created Jan 4, 2013
Simulate a drunken bishop walk to produce OpenSSL random art.
View bishop.c
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define XLIM 17
#define YLIM 9
#define ARSZ (XLIM * YLIM)
#define DEBUG 0
ebouchut / LighttpdReverseProxyURLRewriting
Last active Jan 27, 2021
Lighttpd reverse-proxy to that matches an URL _and_ does URL rewriting #web #server #lighttpd
View LighttpdReverseProxyURLRewriting
#server.modules += ( "mod_rewrite")
# Workaround to have a working reverse-proxy that matches an URL does URL rewriting in Ligghtpd.
# Ligtthpd 1.4.28 cannot perform both matching and URL rewriting at the same time.
# Therefore we need to define 2 proxies, one does the matching and bounce the request
# to the other one, in charge of rewriting the URL before proxying the request to the target server.
# More about this here: