This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SPDX-License-Copyright: 2025 Sébastien L. | |
# SPDX-License-Identifier: MIT | |
# | |
# Secure remote rsync backup script from a mounted volume with validation, timestamped logs, and three modes: dryrun, drycheck, and apply. | |
# (!) Please make sure to configure a local PASSWORD_FILE with 0600 mode. | |
# | |
# This script requires a properly configured remote rsync module, | |
# with correct security settings already in place (e.g., password, access control). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script finds macOS Finder aliases in the current directory, | |
# resolves their targets using `resolve-alias`, and for valid folder targets, | |
# offers to replace each alias with a Unix symlink to the original folder. | |
# Ensure resolve-alias is available | |
if ! command -v resolve-alias &> /dev/null; then | |
echo "❌ Error: 'resolve-alias' is not in your PATH." | |
echo "Please visit https://github.com/mattieb/resolve-alias and compile it first." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# ────────────────────────────────────────────────────────────────────────────── | |
# But : Tronquer les noms de fichiers trop longs (>140 caractères) dans un | |
# répertoire donné pour éviter des 'problèmes' sur des partages SMB. | |
# Ceci règle un problème particulier sur des noms très longs et SMB | |
# via l'application de sauvegarde Syncovery 10.17.5. | |
# Mode : Dry-run par défaut. Utiliser --APPLY pour appliquer les renommages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# remove-MAU2.sh — Suppression complète de Microsoft AutoUpdate (MAU) sur macOS | |
# | |
# Ce script supprime MAU et ses composants associés, y compris les fichiers de préférences, caches, | |
# agents, daemons, et entrées dans les containers sandboxés des apps Microsoft Office. | |
# | |
# Auteur : Sébastien L. | |
# Licence : MIT | |
# Date : 2025-03-28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
gdrive_to_whaller.py | |
Transfert récursif de dossiers Google Drive vers Whaller (via API) | |
- Recrée l'arborescence | |
- Gère les fichiers | |
- Supporte un mode dry-run | |
- Log JSON et vérification de l'existence des dossiers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Ce script exporte toutes les issues, milestones, labels et commentaires d’un dépôt Gitea, | |
# puis les réimporte dans un autre dépôt Gitea via l’API, en conservant les métadonnées essentielles. | |
# | |
# ⚠️ Ce script n’est pas idempotent : il n’écrase pas les données existantes | |
# mais crée de nouveaux objets (issues, milestones, labels, commentaires). | |
# 👉 Il est donc à utiliser *une seule* fois par cible, sous peine de doublonnage massif. | |
# Pour un re-run, supprimez le projet ou videz les entités concernées avant de relancer ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script migrates repositories from a source Gitea instance to another Gitea instance. | |
# It clones all personal repositories from the source using HTTPS and pushes them to the | |
# destination using SSH, with an option for a default dry-run mode. | |
# | |
# USAGE: | |
# ./gitea-migr.sh # Runs in dry-run mode (NO actual cloning or pushing) | |
# ./gitea-migr.sh --no-dry-run # Performs the actual migration (cloning and pushing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ----------------------------------------------------------------------------- | |
# Nix System Maintenance Script for macOS | |
# ----------------------------------------------------------------------------- | |
# This script performs routine maintenance for a Nix-based system, ensuring | |
# that packages, flakes, and the Nix store remain up to date and optimized. | |
# | |
# Features: | |
# - Checks if Nix is installed before running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.9 | |
""" | |
Script pour détecter le type MIME et le type détaillé d'un fichier en utilisant libmagic. | |
Installation nécessaire au préalable de la dépendance : | |
pip3 install python-magic | |
Usage : | |
python file_magic.py <chemin_du_fichier> | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script automates the detection and resolution of Python package architecture mismatches on macOS. | |
# | |
# It scans for '.so' files compiled for x86_64 under all installed Python versions in '~/Library/Python', | |
# uninstalls the affected packages, and reinstalls them with ARM64 support. Additionally, | |
# it checks for dependency conflicts using pip check and resolves them by reinstalling problematic packages. | |
# This ensures compatibility with ARM-based systems, streamlining the transition from x86_64 to ARM architectures. | |
# | |
# TODO: clean-up everything and handle brew or port installations ... |
NewerOlder