Skip to content

Instantly share code, notes, and snippets.

View diyfr's full-sized avatar

Stéphane diyfr

  • Nantes, FR
View GitHub Profile
@diyfr
diyfr / BOOT_STATUS.sh
Last active August 22, 2019 07:53
Supervision Light via bash crontab.
#!/bin/bash
# Author: diyfr
CONFIG_FILE=/home/user/supervision/supervision.cfg
# check container : sample check_container proxy_1
# Return container status, IP
# OK - running
# WARNING - restarting
# CRITICAL - stopped
# UNKNOWN - does not exist
@diyfr
diyfr / readme.md
Last active September 26, 2019 06:31
Dump JVM Docker

Lister les process java du container, Souvent le 1

docker exec -ti container-name jps

On créé le dump remplacer 1 par le pid récupéré à l'étape précédente

docker exec -ti container-name jmap -dump:live,format=b,file=/tmp/dump.bin 1
@diyfr
diyfr / readme.md
Last active September 19, 2019 14:15
Return Docker stats to Json file (and expose it in static nginx server)

Start bash

./stats.sh &
@diyfr
diyfr / record.html
Last active November 22, 2019 07:06
Record hotword with html5
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'>
<style>
@keyframes spin {
from {
transform: rotate(0deg);
@diyfr
diyfr / app.bat
Last active December 11, 2019 09:03
Chrome Kiosk
@echo off
taskkill /F /IM explorer.exe
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --chrome --kiosk http://localhost/home --incognito --disable-pinch --no-user-gesture-required --overscroll-history-navigation=0
exit
@diyfr
diyfr / readme.md
Last active December 11, 2019 09:20
Nginx and springboot as service
@diyfr
diyfr / docker-compose.yml
Last active December 12, 2024 08:29
Basic secured configuration for Traefik V2.X
version: '3.5'
services:
proxy:
image: traefik:v2.1
# The official v2.0 Traefik docker image
container_name: proxy
networks:
- traefik
ports:
@diyfr
diyfr / action.d_docker-action.conf
Last active May 29, 2024 07:18
Fail2ban && Traefik
[Definition]
actionstart = iptables -N f2b-traefik-auth
iptables -A f2b-traefik-auth -j RETURN
iptables -I FORWARD -p tcp -m multiport --dports 443 -j f2b-traefik-auth
@diyfr
diyfr / readme.MD
Last active June 19, 2020 10:59
Trier passage à niveaux SNCF
@diyfr
diyfr / psql.bat
Created June 10, 2020 06:58
Initialiation DB Postgresql sous Windows
@ECHO ON
REM The script sets environment variables helpful for PostgreSQL
@SET PATH=E:\pgsql\bin";%PATH%
@SET PGDATA=E:\psql\data
@SET PGDATABASE=postgres
@SET PGUSER=postgres
@SET PGPORT=5439
@SET PGLOCALEDIR=E:\pgsql\share\locale
REM -- LA LIGNE SUIVANTE EST A COMMENTER APR7S AVOIR ETE LANCEE UNE PREMIERE FOIS
"E:\pgsql\bin\initdb" -U postgres -A trust --encoding UTF8 --locale fr_FR