Skip to content

Instantly share code, notes, and snippets.

View tcoupin's full-sized avatar

Thibault Coupin tcoupin

View GitHub Profile
Mario PressStart : http://eyenx.ch/img/p/20150418_3.gif
Jaffart : https://38.media.tumblr.com/3314424505cbd1b16a85b404bc6e0f63/tumblr_mj7zcy1Q3T1rawb5do1_400.gif
@tcoupin
tcoupin / json.js
Created December 18, 2015 20:06
JSON.parse allow comments
/*
* Auteur : Thibault Coupin
* Description : Surcharge de JSON.parse pour nettoyer les commentaires.
*/
var stripJsonComments = require('strip-json-comments');
(function(){
var proxied = JSON.parse;
JSON.parse = function(str){
@tcoupin
tcoupin / flowtime-table.css
Last active September 12, 2016 16:06
css for table management in flowtime.js
.ft-table {
width: 100%;
text-align: center;
background-color: rgba(0,0,0,0.3);
border-radius: 0.5rem;
font-size: 1.25em;
}
.ft-table td, .ft-table th {
padding: 0.5rem;
}
frontend http-in-ext
bind 0.0.0.0:80
bind 0.0.0.0:443 ssl crt /SSL/yourcert.pem
option forwardfor
reqrep (.*)/seamedia/(.*) \1/seahub/seamedia/\2
acl path_seahub path_beg /seahub
acl path_seafile path_beg /seafhttp
#Force https
@tcoupin
tcoupin / Liste des IDG à tester
Last active March 21, 2017 16:48 — forked from fionnh/Liste des IDG à tester
La fameuse liste des IDG !
Dans le catalogue des IDG :
IDG nationales :
================
(ce qui suit est ce que je n'ai pas gardé)
Data.shom.fr |http://services.data.shom.fr/INSPIRE/wmts/?service=wmts | pas de WMTS pour le moment
Géoportail |
GEOSUD |
ONCFS | des dizaines...
Géorisques ?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
docker run -it -d --name data-scan rok4/data-scan /bin/sh => un container qui tourne et ne fait rien.
-------------------
docker inspect data-scan
Pour overlayfs :
"GraphDriver": {
"Name": "overlay",
"Data": {
"LowerDir": "/var/lib/docker/overlay/320bb51dc1bfdf95dfb223e49e2e9b9b6ef2ff9de4189df5a1a5d559149318b1/root",
"MergedDir": "/var/lib/docker/overlay/7eba59ab23efe275649b003cf5f3721c2bee2bf5583615330c0a0b908f87d5a1/merged",
"UpperDir": "/var/lib/docker/overlay/7eba59ab23efe275649b003cf5f3721c2bee2bf5583615330c0a0b908f87d5a1/upper",
@tcoupin
tcoupin / serveHTTP
Created November 22, 2016 08:49
Script to launch httpd on a path using docker
#!/bin/bash
if [[ "$1" == "-h" || "$1" == "--help" ]]
then
echo "Usage: $(basename $0) [foldertoserve]";
echo " - foldertoserve can be relative or absolute"
echo " - if no foldertoserve, just stop containers"
exit 0
fi
@tcoupin
tcoupin / README.md
Last active May 16, 2017 20:32
Elastic swarm on play-with-docker.com

Nodes

On node1:

docker swarm init --advertise-addr eth0

Copy and paste the command on other node

@tcoupin
tcoupin / hsl2rvb_hexa.sql
Created September 29, 2017 10:47
PL/Pgsql function to convert color in HSL to RGB hex code
CREATE OR REPLACE FUNCTION hsl2rvb_hexa(hue float, sat float, light float)
RETURNS text AS $$
declare
c float := sat*light;
tp float := (hue/60.0);
x float := c*((1-abs((tp::int)%2-1))::float);
m float := light-c;
rp float;
vp float;
bp float;