Skip to content

Instantly share code, notes, and snippets.

View tcoupin's full-sized avatar

Thibault Coupin tcoupin

View GitHub Profile
@tcoupin
tcoupin / docker-compose.yml
Created October 30, 2018 20:31
deploy nextcloud behind traefik
version: "2.0"
services:
nextcloud:
build: .
volumes:
- /mnt/pi3/nextcloud/data:/var/www/html/data
- /mnt/pi3/nextcloud/config:/var/www/html/config
- /mnt/pi3/nextcloud/apps:/var/www/html/apps
@tcoupin
tcoupin / docker-compose.yml
Last active October 30, 2018 20:21
Article Traefik
version: "2.0"
services:
lb:
image: arm32v6/traefik:alpine
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
@tcoupin
tcoupin / readme.md
Created October 28, 2018 14:32
Raspberry pi2 et dongle wifi sagem XG-760N

installer le driver

sudo apt-get install firmware-zd1211

réglage du wifi

$ cat /etc/network/interfaces.d/wlan0 

General

Accéder à la requête

Ajouter un paramètre typé à l'action :

public function addAction(Request $request) {}
@tcoupin
tcoupin / docker-compose.yml
Created January 29, 2018 20:58
Influxdb/Telegraf/chronograf stack
version: "3.0"
services:
influxdb:
image: influxdb:1.4
ports:
- "8086:8086"
volumes:
- influx:/var/lib/influxdb
telegraf:
@tcoupin
tcoupin / app.js
Created January 3, 2018 09:01
Node app to print hostname, but slowly
var http = require("http");
var os = require("os");
var timePerRequest = 0
setInterval(function(){
timePerRequest-=100;
if (timePerRequest<0){
timePerRequest=0;
}
@tcoupin
tcoupin / Dockerfile
Last active December 31, 2017 15:09
Build arm image based on official images
FROM debian:stretch AS qemuprovider
RUN apt-get update && apt-get install -y qemu-user-static
# Et maintenant le contenu utile
FROM arm32v7/debian:stretch
COPY --from=qemuprovider /usr/bin/qemu* /usr/bin
RUN ...
@tcoupin
tcoupin / Setup Pgadmin4 docker.md
Last active April 9, 2024 18:01
Setup Pgadmin4 docker

Just run:

curl https://gist.githubusercontent.com/tcoupin/af82bbbf5de516d186c1f2170ae5d0c4/raw/setup.sh | bash

Notes:

  • on close, the container is not close.
  • default email : admin@admin.admin, default password admin
  • a volume named "pgadmin" is create to store config
@tcoupin
tcoupin / gist:075523125d40dee1b3358fea7fd2f62a
Created November 20, 2017 13:47
PlPgsql buffer+voronoi on lines
drop table if exists zone_buffer;
with
lines as (
select pid, the_geom the_geom from itineraires
),--end with lines
voronoi as (
select the_geom
from (
select (st_dump(ST_VoronoiPolygons((select st_union(the_geom) from lines)))).geom the_geom
@tcoupin
tcoupin / user-data
Created October 15, 2017 14:54
Setup wifi with cloud-init on Rpi3
write_files:
- content: |
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
path: /etc/network/interfaces.d/wlan0
- content: |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1