Skip to content

Instantly share code, notes, and snippets.

View acouvreur's full-sized avatar
😽
Keep it simple, stupid!

Alexis Couvreur acouvreur

😽
Keep it simple, stupid!
View GitHub Profile
@acouvreur
acouvreur / sync-unmonitored.sh
Last active October 16, 2023 21:24
Sync deleted files from Radarr/Sonarr
#!/bin/bash
# Find existing files in download/complete that are not in movies or tvshows.
export DOWNLOAD_FOLDER=path/to/downloads
export MOVIES_FOLDER=path/to/movies
export TVSHOWS_FOLDER=path/to/tvshows
findExistingFile() {
file=$(find $MOVIES_FOLDER/ $TVSHOWS_FOLDER/ -samefile "$1")
@acouvreur
acouvreur / docker-compose.yml
Last active December 31, 2023 16:39
Traefik with HTTPS (with redirect and wildcard certificate) and Host rule autoconfiguration (for docker swarm)
version: "3.9"
services:
traefik:
image: traefik:latest
ports:
- 80:80
- 443:443
command:
- --api=true
@acouvreur
acouvreur / traefik_accessLog_clf
Last active April 15, 2024 17:51
Traefik accessLog regex with groups - CLF (Common Log Format) parsing for log collection
## Regex flavors: PCRE
^(?<client>\S+) \S+ (?<userid>\S+) \[(?<datetime>[^\]]+)\] "(?<method>[A-Z]+) (?<request>[^ "]+)? HTTP\/[0-9.]+" (?<status>[0-9]{3}) (?<size>[0-9]+|-) "(?<referrer>\S+)" "(?<user_agent>\S+)" (?<requestsTotal>)\d+ "(?<router>\S+)" "(?<server_URL>\S+)" (?<request_duration>\d+)ms
## Regex flavors: .NET, Java 7, XRegExp, PCRE 7, Perl 5.10, Ruby 1.9
^(?P<client>\S+) \S+ (?P<userid>\S+) \[(?P<datetime>[^\]]+)\] "(?P<method>[A-Z]+) (?P<request>[^ "]+)? HTTP\/[0-9.]+" (?P<status>[0-9]{3}) (?P<size>[0-9]+|-) "(?P<referrer>\S+)" "(?P<user_agent>\S+)" (?P<requestsTotal>)\d+ "(?P<router>\S+)" "(?P<server_URL>\S+)" (?P<request_duration>\d+)ms
@acouvreur
acouvreur / UltimadeUbuntu.md
Created October 12, 2018 22:23
My ultimate ubuntu

MY ULTIMATE UBUNTU

From clean install Ubuntu 18.04LTS

Core softwares

  • Firefox Quantum : Because i love firefox and the multi-sync account is awsome.
  • VSCode : Very cool ide with a lot of extensions, using sync extension.

Core libraries