Skip to content

Instantly share code, notes, and snippets.

View redat00's full-sized avatar
🦊
It was DNS.

Renaud redat00

🦊
It was DNS.
View GitHub Profile
@redat00
redat00 / base_model_hot_reload.py
Created October 6, 2025 14:16
Hot-reload YAML configuration with Pydantic BaseModel
from pathlib import Path
from time import sleep
from typing import Any
from pydantic import BaseModel
from yaml import safe_load
class ConfigurationModel(BaseModel):
"""Class Configuration.
@redat00
redat00 / pre-commit
Last active October 10, 2022 21:03
Pre-commit hook for ansible-lint
#!/bin/zsh
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
GIT_FOLDER=`git rev-parse --git-dir`
ANSIBLE_FOLDER="${GIT_FOLDER}/../ansible"
TERRAFORM_FOLDER="${GIT_FOLDER}/../terraform"
if ! command -v ansible-lint &> /dev/null