Skip to content

Instantly share code, notes, and snippets.

View apeyroux's full-sized avatar

Aλexandre Peyroux apeyroux

View GitHub Profile
import json
import requests
from bs4 import BeautifulSoup
import sys
with open('voc.json') as f:
voc = json.load(f)
for m in voc['fr']['3']['favoris']:
mot = m['favori']['graphie'].capitalize()
@apeyroux
apeyroux / sample_lb_ssl.tf
Created November 5, 2022 17:01
Sample LB with terraform
# SSL & LB PodamNG
# https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/keymanager_container_v1
resource "openstack_keymanager_secret_v1" "certificate_1" {
name = "certificate"
payload = "${file("cert.pem")}"
secret_type = "certificate"
payload_content_type = "text/plain"
}
from email.message import EmailMessage
import configparser
from random import random
import sys
from abc import ABC, abstractmethod
class MdaOptions:
pass
from abc import ABC, abstractmethod
from urllib.parse import urlparse
class InfoSource(object):
def get_vacation(self):
pass
def set_vacation(self):
pass
from datetime import datetime, timedelta
import errno
from os import rename
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.dummy import DummyOperator
#
# Operator qui test si un DAG n'est pas déjà en cours d'exécution avec la meme configuration
nixify . $(nixos-version --revision)
- get_url:
url: https://omnibus-pic.gendarmerie.fr/api/v4/projects/{{ gitlab_aiomda_id }}/repository/archive.tar.gz?sha={{ gitlab_aiomda_sha }}
headers: "PRIVATE-TOKEN:{{ gitlab_aiomda_private_token }}"
validate_certs: no
dest: /tmp/aiomda.tar.gz
@apeyroux
apeyroux / portal-nginx.conf
Created May 12, 2020 07:20
/etc/lemonldap-ng/portal-nginx.conf de liblemonldap-ng-portal-perl_2.0.2+ds-7+deb10u3_all.deb
server {
listen 80;
server_name auth.example.com;
root /usr/share/lemonldap-ng/portal/htdocs/;
# Use "lm_app" format to get username in nginx.log (see nginx-lmlog.conf)
#access_log /var/log/nginx/portal.log lm_app;
# Uncomment this if you are running behind a reverse proxy and want
# LemonLDAP::NG to see the real IP address of the end user
# Adjust the settings to match the IP address of your reverse proxy
Attaching to mce-dev_lemonldap_1
lemonldap_1 | Starting periodic command scheduler: cron.
lemonldap_1 | Starting anac(h)ronistic cron: anacron.
lemonldap_1 | 2020/05/11 19:15:40 [emerg] 35#35: no port in upstream "llng_portal_upstream" in /etc/nginx/sites-enabled/portal-nginx.conf:47
lemonldap_1 | nginx: [emerg] no port in upstream "llng_portal_upstream" in /etc/nginx/sites-enabled/portal-nginx.conf:47
mce-dev_lemonldap_1 exited with code 1