This file contains 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 | |
# This Bash script converts an AsciiDoc file to plain text using Asciidoctor and Pandoc. It takes the AsciiDoc file as a command-line argument, generates an intermediate XML file, converts it to plain text, opens the text file for analysis, and then deletes the intermediate XML file. The script can be executed from any directory by providing the full or relative path to the AsciiDoc file. | |
# usage: ./convert_asciidoc_to_txt.sh /path/to/your/input_file.adoc | |
# Install Asciidoctor and Pandoc if not already installed | |
if ! command -v asciidoctor &> /dev/null; then | |
gem install asciidoctor | |
fi | |
if ! command -v pandoc &> /dev/null; then |
This file contains 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 | |
# This script generates and outputs a 15-character password that includes symbols and is secure | |
# It uses the pwgen utility, which needs to be installed first (e.g., with brew install pwgen) | |
# To run this script, save it as password.sh and make it executable with chmod +x password.sh | |
# Then execute it with ./password.sh | |
# Check if pwgen is installed | |
if ! command -v pwgen &>/dev/null; then | |
# If not, install it with brew install pwgen | |
echo "pwgen is not installed. Installing it now..." |
This file contains 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 | |
# Check if the correct number of arguments is provided | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <input_file.adoc>" | |
exit 1 | |
fi | |
# Input AsciiDoc file | |
input_file="$1" |
This file contains 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
Vous êtes mon assistant professionnel de vérification et de mise en forme en français. Vous devez corriger les erreurs de syntaxe et de grammaire et fournir une version professionnelle. Je vais vous donner le compte rendu rédigé en Asciidoctor. Donc faites attention au format. J’insiste sur le fait que le texte est écrit en Asciidoctor |
This file contains 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 | |
# Help function to display usage instructions | |
function usage() { | |
echo "Usage: $0 <filename>" | |
echo "Converts an AsciiDoc file to PDF using asciidoctor-pdf." | |
echo "" | |
echo "Options:" | |
echo " -h, --help Display this help message." | |
} |
This file contains 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 | |
usage() { | |
echo "Usage: $0 [-h] FILENAME" >&2 | |
echo "Convert an AsciiDoc file to DOCX" >&2 | |
echo "" >&2 | |
echo "positional arguments:" >&2 | |
echo " FILENAME path to the AsciiDoc file" >&2 | |
echo "" >&2 | |
echo "optional arguments:" >&2 |
This file contains 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 the directory to analyze (default is the current directory) | |
DIR=${1:-.} | |
# run the du command to get disk usage information | |
du -ah $DIR | sort -rh | head -n 20 | |
# explain the output | |
echo "" |
This file contains 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 | |
# update package lists | |
sudo apt-get update | |
# upgrade packages | |
sudo apt-get upgrade -y | |
# upgrade distribution (if available) | |
sudo apt-get dist-upgrade -y |
This file contains 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 | |
# This script generates and outputs a 15-character password that includes symbols and is secure | |
# It uses the pwgen and xclip utilities, which need to be installed first | |
# To run this script, save it as password.sh and make it executable with chmod +x password.sh | |
# Then execute it with ./password.sh | |
# Check if pwgen is installed | |
if ! command -v pwgen &>/dev/null; then | |
# If not, install it with sudo apt-get install pwgen | |
echo "pwgen is not installed. Installing it now..." |
This file contains 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 "Checking if pip3 is installed..." | |
if ! command -v pip3 &> /dev/null | |
then | |
echo "pip3 is not installed. Please install it first." | |
exit 1 | |
else | |
echo "pip3 is installed." | |
fi |
NewerOlder