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
#!/bin/bash | |
# vm-backup.sh — Automated VM backup with virtnbdbackup + direct-to-NFS output + summary | |
set -euo pipefail | |
# === CONFIG === | |
readonly BACKUP_DIR="/mnt/nfsbackup" | |
DOMAINS=($(virsh list --name --all | grep -v '^$')) | |
readonly VIRTNBDBACKUP_BIN="/usr/bin/virtnbdbackup" |
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
import requests | |
import os | |
# --------- CONFIGURE THIS --------- | |
GITHUB_OWNER = "your-username-or-org" | |
GITHUB_REPO = "your-repo" | |
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN") | |
# ---------------------------------- | |
headers = {} |
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
import re | |
def update_hyprland_config(config_path): | |
with open(config_path, 'r') as file: | |
lines = file.readlines() | |
updated_lines = [] | |
for line in lines: | |
# Convert 'windowrule' to 'windowrulev2' with updated syntax | |
match = re.match(r'^\s*windowrule\s*=\s*([^,]+),\s*(.+)$', line) |
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
#!/bin/bash | |
# Define a list of music file extensions to ignore | |
IGNORE_EXTENSIONS=("mp3" "flac" "wav" "ogg" "m4a" "aac" "opus" "wma") | |
# Create a pattern for grep to filter out music files | |
IGNORE_PATTERN=$(printf "|%s" "${IGNORE_EXTENSIONS[@]}") | |
IGNORE_PATTERN="${IGNORE_PATTERN:1}" # Remove leading | | |
# Get the script name |