Skip to content

Instantly share code, notes, and snippets.

View mqu's full-sized avatar
🏠
Working from home

Marc Quinton mqu

🏠
Working from home
  • DGAC / DTI
  • Toulouse / France
View GitHub Profile
@mqu
mqu / docker-compose.yml
Created August 21, 2020 08:34
cryptcheck/docker-compose.yml
# links:
# - https://hub.docker.com/u/aeris22
# - https://cryptcheck.fr/
# - https://github.com/aeris/cryptcheck
x-aliases:
cryptcheck: &cryptcheck
image: aeris22/cryptcheck-rails
logging:
driver: "json-file"
options:
@mqu
mqu / README.md
Last active June 19, 2020 08:11 — forked from ukautz/README.md
Dump LDAP search result as JSON

What can you do with ldapsearch outputs? Not much. With JSON, though ..

# from LDAP search tool ...
ldapsearch -h 127.0.0.1 -p 10389 \
	-D "cn=me,ou=Acme,dc=local" -w 'mypa$$w00t" \
	-b "ou=machines,ou=Acme,dc=local" \
	-s sub "(objectclass=machine)"
@mqu
mqu / Guide de paramétrage des box ADSL
Created April 18, 2020 06:10
ADSL / French Internet service providers / FAI France.
voici les parametres ADSL concernant SFR :
- VPI = 5
- VCI = 35
- authentification PPPOE
- Login : xxx@neufpnp (xxx est l'adresse MAC, votre n° de téléphone ou n'importe quoi)
- Mot de passe : neufpnp
- date de valdiité : 04/2020.
@mqu
mqu / docker-compose.yml
Last active January 20, 2020 05:17
nextcloud + onlyoffice / docker-compose.yml
# Marc Quinton - nextcloud + onlyoffice / docker-compose.yml
# date : august 2019
# tags : docker, docker-compose, onlyonffice, nextcloud.
version: '3'
services:
db:
image: postgres:alpine
restart: unless-stopped
@mqu
mqu / azerty-qwerty.rb
Created July 10, 2019 20:28
convert azerty to querty string for BIOS password input
#!/usr/bin/ruby
# Marc Quinton
# convert string from azerty to qwerty keyboard for entering BIOS password
v1 ='azqwAZQW&é"\'(è_çà)$Mù,?;:!§1234567890'
v2 ='qwazQWAZ123456890\-[:\'mM,./?!@#$%\^&*()'
_in=ARGF.read
@mqu
mqu / README.md
Last active October 25, 2021 10:19
telegraf / disk usage / gitlab

Report disk usage for gitlab (omnibus installation) into influx database.

  • it will report report registry and git size in Mo.
  • data will be available at "telegraf/size/[registry,git]

provided files :

  • /etc/sudo.d/telegraf : need to run sudo du external command
  • /etc/telegraf/telegraf.d/inputs.exec-disk-usage.conf : main script managed by telegraf ; need to restart telegraf
  • /etc/telegraf/telegraf.d/scripts/exec-disk-usage is the script computing disk usage and reporting to telegraf computed size in influx format.
@mqu
mqu / esp8266-udp-multicast-hello-world.ino
Created February 16, 2019 11:20
ESP8266 / Arduino UDP Multicast example
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <ESP8266WebServer.h>
// simple POC : send hello world string over UDP-multicast address every 2 seconds.
// a very simple way to connect IOT to local network without need of any server.
// author : Marc Quinton / feb 2019
// keywords : esp8266, arduino, multicast, IOT, example, POC
WiFiUDP udp;
@mqu
mqu / cert-lifetime.rb
Created January 28, 2019 14:53
get OpenSSL certificate lifetime in days.
#!/usr/bin/ruby
# took many ideas from https://spin.atomicobject.com/2016/02/03/ssl-certificate-expiration/
require 'openssl'
require 'socket'
class OpenSSLCert
def initialize hostname
@mqu
mqu / readme.md
Created November 29, 2018 21:00
mermaid-test

Flux de l'information

graph TD

Freebox---|API-V4|script
script---|input-plugin-exec|telegraf
telegraf---influxDB
influxDB---Chronograf
influxDB---Grafana
@mqu
mqu / logrotate.bash
Created October 23, 2018 08:02
rotating log file with bash script
#!/bin/bash
# rotate log files with bash script.
function _logrotate {
file=$1
MAXLOG=10
# return if $file does not exists
[ ! -f $file ] && return 0