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 | |
| echo -e "User password:" | |
| read -s user_pw | |
| echo -e "Owner password:" | |
| read -s owner_pw | |
| echo | |
| qpdf --encrypt "$user_pw" "$owner_pw" 256 -- "$1" "$2" | |
| unset user_pw owner_pw |
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 | |
| # Simplified script to archive all old logs into a single archive | |
| LOG_DIR="." | |
| ARCHIVE_NAME="archive.7z" | |
| PATTERN="????-??-??T??-??-?? - *.txt" | |
| # Deadline: more than 30 days ago (example) | |
| #CUTOFF_DATE=$(date --date="30 days ago" +%s) |
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 os | |
| import re | |
| import html | |
| def decode_html_entities(text): | |
| """ | |
| Decodes hexadecimal and decimal HTML entities in text | |
| """ | |
| # Decode standard HTML entities (like &, <, etc.) | |
| text = html.unescape(text) |
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
| @ECHO OFF | |
| SETLOCAL ENABLEDELAYEDEXPANSION | |
| COLOR 02 | |
| TITLE VM Backup... | |
| ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» | |
| ECHO º Information retrieval... º | |
| ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ | |
| ECHO. | |
| REM VM name |
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 | |
| # Find all .flac files recursively | |
| find . -name "*.flac" -type f | while IFS= read -r f; do | |
| # Generates the name of the corresponding MP3 file | |
| mp3_file="${f%.flac}.mp3" | |
| # Check if the MP3 file already exists | |
| if [[ ! -f "$mp3_file" ]]; then | |
| echo "Conversion: $f -> $mp3_file" |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Overall Risk</title> | |
| <style> | |
| body { | |
| background-color: white; | |
| height: 100%; | |
| margin: 10%; | |
| display: flex; |
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
| @ECHO OFF | |
| SETLOCAL EnableDelayedExpansion | |
| REM Usage: GetLocalGroupName.cmd [SID] | |
| REM If there is no parameter, display the list of local groups | |
| REM If there is a parameter, use it as the SID | |
| REM If there is no parameter, display the list of local groups | |
| IF [%1] == [] ( | |
| ECHO Choice from the English name the local group to get on this system: |
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/python3 | |
| import os | |
| import re | |
| def remove_numbers_from_names(directory): | |
| for root, _, files in os.walk(directory): | |
| for filename in files: | |
| # Check if filename is a directory | |
| if os.path.isfile(filename): | |
| # Extract the file name without the extension |
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/python3 | |
| import os | |
| import argparse | |
| from pathlib import Path | |
| def remove_useless_bytes(file_path, file_destination_path, num_bytes_to_remove): | |
| # Check if the file exists | |
| if not file_path.exists(): | |
| print(f"File {file_path} does not exist") | |
| return |
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 | |
| import re | |
| import argparse | |
| import sys | |
| def corriger_texte(texte): | |
| # Espace insécable Unicode | |
| espace_insecable = '\u00A0' | |
| # Correction des espaces avant la ponctuation |
NewerOlder