From b58e8d319d33cd95dc1873b9b50af33108bfa009 Mon Sep 17 00:00:00 2001 From: GJS Date: Sun, 22 Sep 2024 12:15:44 +0200 Subject: [PATCH] Initial commit: Start over with a clean slate - Removed the 'main' branch and its commit history. --- .bash_script/gpg_keygen_script.sh | 162 ++ .bash_script/install_latest_dart_sass.sh | 73 + .bash_script/install_latest_go.sh | 75 + .bash_script/install_latest_hugo.sh | 81 + .bash_script/install_latest_jetbrains_mono.sh | 111 + .bash_script/ssh_keygen_script.sh | 235 ++ .bash_script/user_accounts_info.sh | 75 + .github/CODEOWNERS | 2 + .github/ISSUE_TEMPLATE/bug_report.md | 36 + .github/ISSUE_TEMPLATE/security_report.md | 31 + .github/dependabot.yml | 17 + .github/linters/.ansible-lint.yml | 17 + .github/linters/.arm-ttk.psd1 | 30 + .github/linters/.cfnlintrc.yml | 3 + .github/linters/.checkov.yml | 7 + .github/linters/.chktexrc | 802 +++++++ .github/linters/.clang-format | 1 + .github/linters/.clj-kondo/config.edn | 7 + .github/linters/.coffee-lint.json | 135 ++ .github/linters/.ecrc | 20 + .github/linters/.eslintrc.yml | 51 + .github/linters/.flake8 | 3 + .github/linters/.gherkin-lintrc | 52 + .github/linters/.gitleaks.toml | 6 + .github/linters/.golangci.yml | 43 + .github/linters/.groovylintrc.json | 65 + .github/linters/.hadolint.yml | 4 + .github/linters/.htmlhintrc | 25 + .github/linters/.isort.cfg | 2 + .github/linters/.jscpd.json | 11 + .github/linters/.lintr | 1 + .github/linters/.luacheckrc | 1 + .github/linters/.markdown-lint.yml | 15 + .github/linters/.mypy.ini | 4 + .github/linters/.openapirc.yml | 2 + .github/linters/.perlcriticrc | 2 + .../linters/.powershell-psscriptanalyzer.psd1 | 18 + .github/linters/.protolintrc.yml | 4 + .github/linters/.python-black | 0 .github/linters/.python-lint | 4 + .github/linters/.ruby-lint.yml | 4 + .github/linters/.ruff.toml | 6 + .github/linters/.scalafmt.conf | 7 + .github/linters/.shellcheckrc | 5 + .github/linters/.snakefmt.toml | 0 .github/linters/.sql-config.json | 3 + .github/linters/.sqlfluff | 18 + .github/linters/.stylelintrc.json | 3 + .github/linters/.textlintrc | 514 +++++ .github/linters/.tflint.hcl | 28 + .github/linters/.yaml-lint.yml | 52 + .github/linters/actionlint.yml | 5 + .github/linters/php.ini | 1947 +++++++++++++++++ .github/linters/phpcs.xml | 6 + .github/linters/phpstan.neon | 2 + .github/linters/psalm.xml | 4 + .github/linters/terrascan.toml | 12 + .github/pull_request_template.md | 49 + .github/review-process_template.md | 56 + .github/super-linter.env | 111 + .../workflows/automerge_dependabot_prs.yml | 28 + .github/workflows/super-linter.yml | 51 + .gitignore | 7 + .nano/Dockerfile.nanorc | 26 + .nano/bash.nanorc | 30 + .nano/css.nanorc | 8 + .nano/dotenv.nanorc | 22 + .nano/html.nanorc | 3 + .nano/java.nanorc | 14 + .nano/js.nanorc | 40 + .nano/makefile.nanorc | 12 + .nano/man.nanorc | 7 + .nano/markdown.nanorc | 54 + .nano/postgresql.nanorc | 5 + .nano/rsync.nanorc | 7 + .nano/sh.nanorc | 13 + .nano/toml.nanorc | 16 + .nano/urls.nanorc | 6 + .nano/xml.nanorc | 9 + .nano/yaml.nanorc | 36 + CODE_OF_CONDUCT.md | 131 ++ CODE_STYLE_AND_STANDARDS_GUIDES.md | 73 + CONTRIBUTING.md | 79 + LICENSE.md | 55 + README.md | 182 ++ SECURITY.md | 60 + dotfiles/.bash_aliases | 315 +++ dotfiles/.bash_exports | 42 + dotfiles/.bash_snippets | 316 +++ dotfiles/.bashrc | 167 ++ dotfiles/.gitconfig | 65 + dotfiles/.nanorc | 342 +++ dotfiles/.selected_editor | 2 + dotfiles/.tmux.conf | 116 + dotfiles/.vimrc | 161 ++ dotfiles/.zshrc | 311 +++ dotfiles_installer.sh | 161 ++ 97 files changed, 8037 insertions(+) create mode 100755 .bash_script/gpg_keygen_script.sh create mode 100755 .bash_script/install_latest_dart_sass.sh create mode 100755 .bash_script/install_latest_go.sh create mode 100755 .bash_script/install_latest_hugo.sh create mode 100755 .bash_script/install_latest_jetbrains_mono.sh create mode 100755 .bash_script/ssh_keygen_script.sh create mode 100755 .bash_script/user_accounts_info.sh create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/security_report.md create mode 100644 .github/dependabot.yml create mode 100644 .github/linters/.ansible-lint.yml create mode 100644 .github/linters/.arm-ttk.psd1 create mode 100644 .github/linters/.cfnlintrc.yml create mode 100644 .github/linters/.checkov.yml create mode 100644 .github/linters/.chktexrc create mode 100644 .github/linters/.clang-format create mode 100644 .github/linters/.clj-kondo/config.edn create mode 100644 .github/linters/.coffee-lint.json create mode 100644 .github/linters/.ecrc create mode 100644 .github/linters/.eslintrc.yml create mode 100644 .github/linters/.flake8 create mode 100644 .github/linters/.gherkin-lintrc create mode 100644 .github/linters/.gitleaks.toml create mode 100644 .github/linters/.golangci.yml create mode 100644 .github/linters/.groovylintrc.json create mode 100644 .github/linters/.hadolint.yml create mode 100644 .github/linters/.htmlhintrc create mode 100644 .github/linters/.isort.cfg create mode 100644 .github/linters/.jscpd.json create mode 100644 .github/linters/.lintr create mode 100644 .github/linters/.luacheckrc create mode 100644 .github/linters/.markdown-lint.yml create mode 100644 .github/linters/.mypy.ini create mode 100644 .github/linters/.openapirc.yml create mode 100644 .github/linters/.perlcriticrc create mode 100644 .github/linters/.powershell-psscriptanalyzer.psd1 create mode 100644 .github/linters/.protolintrc.yml create mode 100644 .github/linters/.python-black create mode 100644 .github/linters/.python-lint create mode 100644 .github/linters/.ruby-lint.yml create mode 100644 .github/linters/.ruff.toml create mode 100644 .github/linters/.scalafmt.conf create mode 100644 .github/linters/.shellcheckrc create mode 100644 .github/linters/.snakefmt.toml create mode 100644 .github/linters/.sql-config.json create mode 100644 .github/linters/.sqlfluff create mode 100644 .github/linters/.stylelintrc.json create mode 100644 .github/linters/.textlintrc create mode 100644 .github/linters/.tflint.hcl create mode 100644 .github/linters/.yaml-lint.yml create mode 100644 .github/linters/actionlint.yml create mode 100644 .github/linters/php.ini create mode 100644 .github/linters/phpcs.xml create mode 100644 .github/linters/phpstan.neon create mode 100644 .github/linters/psalm.xml create mode 100644 .github/linters/terrascan.toml create mode 100644 .github/pull_request_template.md create mode 100644 .github/review-process_template.md create mode 100644 .github/super-linter.env create mode 100644 .github/workflows/automerge_dependabot_prs.yml create mode 100644 .github/workflows/super-linter.yml create mode 100644 .gitignore create mode 100644 .nano/Dockerfile.nanorc create mode 100644 .nano/bash.nanorc create mode 100644 .nano/css.nanorc create mode 100644 .nano/dotenv.nanorc create mode 100644 .nano/html.nanorc create mode 100644 .nano/java.nanorc create mode 100644 .nano/js.nanorc create mode 100644 .nano/makefile.nanorc create mode 100644 .nano/man.nanorc create mode 100644 .nano/markdown.nanorc create mode 100644 .nano/postgresql.nanorc create mode 100644 .nano/rsync.nanorc create mode 100644 .nano/sh.nanorc create mode 100644 .nano/toml.nanorc create mode 100644 .nano/urls.nanorc create mode 100644 .nano/xml.nanorc create mode 100644 .nano/yaml.nanorc create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CODE_STYLE_AND_STANDARDS_GUIDES.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 dotfiles/.bash_aliases create mode 100644 dotfiles/.bash_exports create mode 100644 dotfiles/.bash_snippets create mode 100644 dotfiles/.bashrc create mode 100644 dotfiles/.gitconfig create mode 100644 dotfiles/.nanorc create mode 100644 dotfiles/.selected_editor create mode 100644 dotfiles/.tmux.conf create mode 100644 dotfiles/.vimrc create mode 100644 dotfiles/.zshrc create mode 100755 dotfiles_installer.sh diff --git a/.bash_script/gpg_keygen_script.sh b/.bash_script/gpg_keygen_script.sh new file mode 100755 index 0000000..0a8ed35 --- /dev/null +++ b/.bash_script/gpg_keygen_script.sh @@ -0,0 +1,162 @@ +#!/bin/bash + +# Script Name: gpg_keygen_script.sh +# Author: GJS (homelab-aplha) +# Date: 2024-05-18T12:08:56+02:00 +# Version: 1.0 + +# Description: This script generates a GPG key pair for secure communication. +# It checks for required software, generates the key pair, and logs the actions. +# The script also provides options for verbose output and specifying the GPG directory. + +# Usage: ./gpg_keygen_script.sh [-v] [-d /path/to/gpg_directory] + +# Options: +# -v, --verbose Enable verbose mode +# -d, --directory Specify the path to the GPG directory (default is \$HOME/.gnupg) + +# Examples: +# Generate key pair: +# $ ./gpg_keygen_script.sh +# Verbose mode: +# $ ./gpg_keygen_script.sh -v +# Specify GPG directory: +# $ ./gpg_keygen_script.sh -d /path/to/gpg_directory + +# Notes: +# - Requires GPG to be installed. If not installed, the script will exit with an error message. +# - Checks for existing GPG key pair and prevents generation if it already exists. +# - Logs all actions and errors to a specified log file. + +# Functions: + +# Function to print text in cyan color +print_cyan() { + echo -e "\e[36m$1\e[0m" +} + +# Function to print section headers +print_section_header() { + echo "" + echo "" + echo -e "$(print_cyan "=== $1 ===")" +} + +# Function for displaying verbose information +display_verbose_info() { + if [ "$verbose" == "true" ]; then + print_section_header "GPG Key:" + gpg --list-keys --keyid-format LONG + fi +} + +# Function for logging actions and errors to a single log file +log_message() { + local timestamp + timestamp=$(date +"%Y-%m-%d %H:%M:%S") + local message="$1" + + echo "${timestamp} - ${message}" | tee -a "$log_file" >&2 +} + +# Function for displaying usage instructions +display_usage() { + echo "Usage: $0 [-v] [-d /path/to/gpg_directory]" + echo "Options:" + echo " -v, --verbose Enable verbose mode" + echo " -d, --directory Specify the path to the GPG directory (default is \$HOME/.gnupg)" + exit 1 +} + +# Function for checking required software and informing the user if not present +check_required_software() { + if ! command -v "gpg" >/dev/null 2>&1; then + log_message "Error: GPG is not installed. Please install GPG before running this script." + exit 1 + else + log_message "GPG is installed." + fi +} + +# Function for generating the GPG key pair +generate_key_pair() { + log_message "Generating new GPG key pair..." + print_section_header "Generating new GPG key pair" + log_message "Executing command: gpg --full-generate-key" + gpg --full-generate-key +} + +# Function for checking the existence of the key file +check_key_file_existence() { + if [ -f "$gpg_dir/pubring.kbx" ]; then + log_message "The GPG key pair already exists." + log_message "=== end of the log ===" + echo "$(print_cyan "Error:") The GPG key pair already exists." + exit 1 + fi +} + +# Function for processing command line options +parse_command_line_options() { + while [[ $# -gt 0 ]]; do + case "$1" in + -v | --verbose) + verbose=true + shift + ;; + -d | --directory) + shift + gpg_dir="$1" + shift + ;; + *) + display_usage + ;; + esac + done +} + +# Trap signals (interrupts) +trap trap_handler SIGINT SIGTERM + +# Main Program: + +# Default values +gpg_dir="$HOME/.gnupg" +log_file="$gpg_dir/gpg_keygen_script.log" + +# Start logging +echo "" >>"$log_file" # Add an empty line after the marker for separation +log_message "=== beginning of the log ===" +log_message "Script execution started" + +# Check if required software is installed +check_required_software + +# Initialize options +verbose=false + +# Parse command line options +parse_command_line_options "$@" + +# Check if the GPG directory and log file exist, create them if they don't +if [ ! -d "$gpg_dir" ]; then + mkdir -p "$gpg_dir" && log_message "Created directory: $gpg_dir" +fi + +if [ ! -f "$log_file" ]; then + touch "$log_file" && log_message "Created log file: $log_file" +fi + +# Check if the GPG key pair already exists +check_key_file_existence + +# Generate GPG key pair +generate_key_pair + +# Display verbose information +display_verbose_info + +# Logging completion +log_message "Script execution completed." +log_message "=== end of the log ===" diff --git a/.bash_script/install_latest_dart_sass.sh b/.bash_script/install_latest_dart_sass.sh new file mode 100755 index 0000000..89920b6 --- /dev/null +++ b/.bash_script/install_latest_dart_sass.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# Script Name: install_latest_dart_sass.sh +# Author: GJS (homelab-alpha) +# Date: 2024-05-18T12:09:00+02:00 +# Version: 1.0 + +# Description: This script fetches the latest version of Dart Sass from the +# official GitHub repository, downloads it, installs it to /usr/local/dart-sass, +# and cleans up the downloaded files. + +# Usage: ./install_latest_dart_sass.sh + +# Fetch the latest version of Dart Sass from the GitHub API +LATEST_VERSION=$(curl -s https://api.github.com/repos/sass/dart-sass/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + +# Check if we successfully fetched the latest version +if [ -z "$LATEST_VERSION" ]; then + echo "Failed to fetch the latest version of Dart Sass." + exit 1 +fi + +# Construct the download URL using the latest version +DOWNLOAD_URL="https://github.com/sass/dart-sass/releases/download/${LATEST_VERSION}/dart-sass-${LATEST_VERSION}-linux-x64.tar.gz" + +# Define the download directory +DOWNLOAD_DIR="$HOME/Downloads" + +# Use wget to download the latest version of Dart Sass to the specified directory +if ! wget "$DOWNLOAD_URL" -O "$DOWNLOAD_DIR/dart-sass-${LATEST_VERSION}-linux-x64.tar.gz"; then + echo "Failed to download Dart Sass version ${LATEST_VERSION}." + exit 1 +fi + +echo "Successfully downloaded Dart Sass version ${LATEST_VERSION} to $DOWNLOAD_DIR." + +# Extract the downloaded tar.gz file in the download directory +tar -xzf "$DOWNLOAD_DIR/dart-sass-${LATEST_VERSION}-linux-x64.tar.gz" -C "$DOWNLOAD_DIR" + +# Create the target directory if it doesn't exist +sudo mkdir -p /usr/local/dart-sass + +# Remove any previous Dart Sass installation if it exists +sudo rm -rf /usr/local/dart-sass/* + +# Move the extracted files to /usr/local/dart-sass +if ! sudo mv "$DOWNLOAD_DIR/dart-sass"/* /usr/local/dart-sass/; then + echo "Failed to move Dart Sass files to /usr/local/dart-sass." + exit 1 +fi + +echo "Successfully installed Dart Sass version ${LATEST_VERSION} to /usr/local/dart-sass." + +# Clean up by removing the downloaded tar.gz file and the extracted directory +rm -r "$DOWNLOAD_DIR/dart-sass-${LATEST_VERSION}-linux-x64.tar.gz" +rm -rf "$DOWNLOAD_DIR/dart-sass" +echo "Cleanup complete." +echo "" + +# Check if Sass is available and provide instructions if not +if ! command -v sass &>/dev/null; then + echo "Sass command not found. You may need to add Dart Sass to your PATH." + echo "To do this, add the following line to your ~/.bashrc or ~/.bash_profile:" + echo "" + echo "export PATH=\$PATH:/usr/local/dart-sass" + echo "" + echo "Then, run: source ~/.bashrc" + echo "and/or" + echo "Then, run: source ~/.bash_profile" + exit 1 +else + echo "Sass version: $(sass --version)" +fi diff --git a/.bash_script/install_latest_go.sh b/.bash_script/install_latest_go.sh new file mode 100755 index 0000000..e96b625 --- /dev/null +++ b/.bash_script/install_latest_go.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +# Script Name: install_latest_go.sh +# Author: GJS (homelab-alpha) +# Date: 2024-05-18T12:09:02+02:00 +# Version: 1.0 + +# Description: This script fetches the latest version of Go from the official Go +# download page, downloads it, installs it to /usr/local/go, and cleans up the +# downloaded files. + +# Usage: ./install_latest_go.sh + +# Fetch the latest version of Go from the official download page +LATEST_VERSION_OUTPUT=$(curl -s https://go.dev/VERSION?m=text) + +# Extract the version number from the output +LATEST_VERSION="$(echo $LATEST_VERSION_OUTPUT | awk '{print $1}' | sed 's/go//')" + +# Check if we successfully fetched the latest version +if [ -z "$LATEST_VERSION" ]; then + echo "Failed to fetch the latest version of Go." + exit 1 +fi + +# Construct the download URL using the latest version +DOWNLOAD_URL="https://go.dev/dl/go${LATEST_VERSION}.linux-amd64.tar.gz" + +# Define the download directory +DOWNLOAD_DIR="$HOME/Downloads" + +# Use wget to download the latest version of Go to the specified directory +if ! wget "$DOWNLOAD_URL" -O "$DOWNLOAD_DIR/go${LATEST_VERSION}.linux-amd64.tar.gz"; then + echo "Failed to download Go version ${LATEST_VERSION}." + exit 1 +fi + +echo "Successfully downloaded Go version ${LATEST_VERSION} to $DOWNLOAD_DIR." + +# Extract the downloaded tar.gz file in the download directory +tar -xzf "$DOWNLOAD_DIR/go${LATEST_VERSION}.linux-amd64.tar.gz" -C "$DOWNLOAD_DIR" + +# Create the target directory if it doesn't exist +sudo mkdir -p /usr/local/go + +# Remove any previous Go installation if it exists +sudo rm -rf /usr/local/go + +# Move the extracted files to /usr/local/go +if ! sudo mv "$DOWNLOAD_DIR/go" /usr/local/; then + echo "Failed to move Go files to /usr/local/go." + exit 1 +fi + +echo "Successfully installed Go version ${LATEST_VERSION} to /usr/local/go." + +# Clean up by removing the downloaded tar.gz file +rm "$DOWNLOAD_DIR/go${LATEST_VERSION}.linux-amd64.tar.gz" +echo "Cleanup complete." +echo "" + +# Check if Go is available and provide instructions if not +if ! command -v go &>/dev/null; then + echo "Go command not found. You may need to add Go to your PATH." + echo "To do this, add the following line to your ~/.bashrc or ~/.bash_profile:" + echo "" + echo "export PATH=\$PATH:/usr/local/go/bin" + echo "" + echo "Then, run: source ~/.bashrc" + echo "and/or" + echo "Then, run: source ~/.bash_profile" + exit 1 +else + echo "Go version: $(go version)" +fi diff --git a/.bash_script/install_latest_hugo.sh b/.bash_script/install_latest_hugo.sh new file mode 100755 index 0000000..d6aa17e --- /dev/null +++ b/.bash_script/install_latest_hugo.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# Script Name: install_latest_hugo.sh +# Author: GJS (homelab-alpha) +# Date: 2024-05-18T12:09:08+02:00 +# Version: 1.0 + +# Description: This script fetches the latest version of Hugo from the official +# GitHub repository, downloads it, installs it to /usr/local/hugo-extended, and +# cleans up the downloaded files. + +# Usage: ./install_latest_hugo.sh + +# Fetch the latest version of Hugo from the GitHub API +LATEST_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') + +# Check if we successfully fetched the latest version +if [ -z "$LATEST_VERSION" ]; then + echo "Failed to fetch the latest version of Hugo." + exit 1 +fi + +# Construct the download URL using the latest version +DOWNLOAD_URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_VERSION}/hugo_extended_${LATEST_VERSION}_linux-amd64.tar.gz" + +# Define the download directory +DOWNLOAD_DIR="$HOME/Downloads" + +# Use wget to download the latest version of Hugo to the specified directory +wget "$DOWNLOAD_URL" -O "$DOWNLOAD_DIR"/hugo_extended_"${LATEST_VERSION}"_linux-amd64.tar.gz + +# Check if wget successfully downloaded the file +if ! wget -q --spider "$DOWNLOAD_URL"; then + echo "Failed to download Hugo version ${LATEST_VERSION}." + exit 1 +fi + +echo "Successfully downloaded Hugo version ${LATEST_VERSION} to $DOWNLOAD_DIR." + +# Extract the downloaded tar.gz file in the download directory +tar -xzf "$DOWNLOAD_DIR"/hugo_extended_"${LATEST_VERSION}"_linux-amd64.tar.gz -C "$DOWNLOAD_DIR" + +# Create the target directory if it doesn't exist +sudo mkdir -p /usr/local/hugo-extended + +# Remove any previous Hugo installation if it exists +sudo rm -rf /usr/local/hugo-extended/* + +# Move the Hugo binary and additional files to /usr/local/hugo-extended +sudo mv "$DOWNLOAD_DIR"/hugo /usr/local/hugo-extended/ +sudo mv "$DOWNLOAD_DIR"/LICENSE /usr/local/hugo-extended/ +sudo mv "$DOWNLOAD_DIR"/README.md /usr/local/hugo-extended/ + +# Check if the Hugo binary was successfully moved +if [ ! -f "/usr/local/hugo-extended/hugo" ]; then + echo "Failed to move Hugo binary to /usr/local/hugo-extended." + exit 1 +fi + +echo "Successfully installed Hugo version ${LATEST_VERSION} to /usr/local/hugo-extended." + +# Clean up by removing the downloaded tar.gz file +rm "$DOWNLOAD_DIR"/hugo_extended_"${LATEST_VERSION}"_linux-amd64.tar.gz + +echo "Cleanup complete." +echo "" + +# Check if Hugo is available and provide instructions if not +if ! command -v hugo &>/dev/null; then + echo "Hugo command not found. You may need to add Go to your PATH." + echo "To do this, add the following line to your ~/.bashrc or ~/.bash_profile:" + echo "" + echo "export PATH=\$PATH:/usr/local/hugo-extended" + echo "" + echo "Then, run: source ~/.bashrc" + echo "Or" + echo "Then, run: source ~/.bash_profile" + exit 1 +else + echo "Hugo version: $(hugo version)" +fi diff --git a/.bash_script/install_latest_jetbrains_mono.sh b/.bash_script/install_latest_jetbrains_mono.sh new file mode 100755 index 0000000..4e2bd2a --- /dev/null +++ b/.bash_script/install_latest_jetbrains_mono.sh @@ -0,0 +1,111 @@ +#!/bin/bash + +# Filename: install_latest_jetbrains_mono.sh +# Author: GJS (homelab-alpha) +# Date: 2024-07-05T09:20:06+02:00 +# Version: 1.0 + +# Description: This script fetches the latest version of JetBrains Mono from the +# official GitHub repository, downloads it, installs it to the system-wide fonts +# directory, and cleans up the downloaded files. + +# Usage: sudo ./install_latest_jetbrains_mono.sh + +# Function to check if a command exists and provide installation instructions +check_command() { + command -v "$1" >/dev/null 2>&1 || { + echo "$1 is not installed." + echo "Please install it using your package manager:" + echo " - On Debian/Ubuntu: sudo apt-get install $1" + echo " - On Fedora based systems: sudo dnf install $1" + echo " - On Red Hat based systems: sudo yum install $1" + echo " - For other systems, visit $1's official website for installation instructions." + exit 1 + } +} + +# List of required commands +commands=("curl" "fc-cache" "unzip" "wget") + +# Check for each required command and exit if any are missing +for cmd in "${commands[@]}"; do + check_command "$cmd" +done + +# Fetch the latest version of JetBrains Mono from the GitHub API +LATEST_VERSION=$(curl -s https://api.github.com/repos/JetBrains/JetBrainsMono/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') + +# Check if we successfully fetched the latest version +if [ -z "$LATEST_VERSION" ]; then + echo "Failed to fetch the latest version of JetBrains Mono." + exit 1 +fi + +# Construct the download URL using the latest version +DOWNLOAD_URL="https://github.com/JetBrains/JetBrainsMono/releases/download/v${LATEST_VERSION}/JetBrainsMono-${LATEST_VERSION}.zip" + +# Define the download directory +DOWNLOAD_DIR="$HOME/Downloads" + +# Check if the download directory exists, if not, create it +if [ ! -d "$DOWNLOAD_DIR" ]; then + mkdir -p "$DOWNLOAD_DIR" + echo "Created directory: $DOWNLOAD_DIR" +fi + +# Use wget to download the latest version of JetBrains Mono to the specified directory +wget -v "$DOWNLOAD_URL" -O "$DOWNLOAD_DIR"/JetBrainsMono-"${LATEST_VERSION}".zip + +# Check if wget successfully downloaded the file +if [ ! -f "$DOWNLOAD_DIR"/JetBrainsMono-"${LATEST_VERSION}".zip ]; then + echo "Failed to download JetBrains Mono version ${LATEST_VERSION}." + exit 1 +fi + +echo "Successfully downloaded JetBrains Mono version ${LATEST_VERSION} to $DOWNLOAD_DIR." +echo "" + +# Extract the downloaded zip file in the download directory +unzip "$DOWNLOAD_DIR"/JetBrainsMono-"${LATEST_VERSION}".zip -d "$DOWNLOAD_DIR/JetBrainsMono-${LATEST_VERSION}" + +# Define the JetBrains Mono directory +JETBRAINS_MONO_DIR="/usr/share/fonts/jetbrains-mono" + +# Check if the jetbrains-mono directory exists, if not, create it +if [ ! -d "$JETBRAINS_MONO_DIR" ]; then + sudo mkdir -p "$JETBRAINS_MONO_DIR" + echo "Created directory: $JETBRAINS_MONO_DIR" +fi + +# Remove any previous installation if it exists +sudo rm -rf $JETBRAINS_MONO_DIR/* + +# Move the font files to the system-wide fonts directory +sudo mv "$DOWNLOAD_DIR/JetBrainsMono-${LATEST_VERSION}/fonts/"* $JETBRAINS_MONO_DIR + +# Check if the font files were successfully moved +if [ ! -f "$JETBRAINS_MONO_DIR/ttf/JetBrainsMono-Regular.ttf" ]; then + echo "Failed to move JetBrains Mono fonts to $JETBRAINS_MONO_DIR." + exit 1 +fi + +echo "Successfully installed JetBrains Mono version ${LATEST_VERSION} to $JETBRAINS_MONO_DIR." +echo "" + +# Update the font cache +sudo fc-cache -f -v + +# Clean up by removing the downloaded zip file and extracted directory +rm "$DOWNLOAD_DIR"/JetBrainsMono-"${LATEST_VERSION}".zip +rm -r "$DOWNLOAD_DIR/JetBrainsMono-${LATEST_VERSION}" + +echo "Cleanup complete." +echo "" + +# Verify the installation by listing the installed fonts +if ! fc-list | grep -q "JetBrains Mono"; then + echo "JetBrains Mono font not found. Installation may have failed." + exit 1 +else + echo "JetBrains Mono font successfully installed." +fi diff --git a/.bash_script/ssh_keygen_script.sh b/.bash_script/ssh_keygen_script.sh new file mode 100755 index 0000000..6eaada7 --- /dev/null +++ b/.bash_script/ssh_keygen_script.sh @@ -0,0 +1,235 @@ +#!/bin/bash + +# Script Name: ssh_keygen_script.sh +# Author: GJS (homelab-alpha) +# Date: 2024-05-18T12:09:30+02:00 +# Version: 1.0 + +# Description: This script automates the generation and conversion of SSH key +# pairs for secure communication. It supports both ed25519 and RSA key types, +# allowing users to specify the desired key type, filename for the key pair, and +# SSH directory. The script logs all actions and errors to a designated log file +# for traceability. + +# Usage: ./ssh_keygen_script.sh [-v] [-d /path/to/ssh_directory] +# Options: +# -v, --verbose Enable verbose mode to display detailed information during execution. +# -d, --directory Specify the path to the SSH directory. The default directory is $HOME/.ssh. + +# Examples: +# 1. Generate and convert an SSH key pair: +# ./ssh_keygen_script.sh + +# 2. Generate and convert an SSH key pair with verbose output: +# ./ssh_keygen_script.sh -v + +# 3. Generate and convert an SSH key pair with a custom SSH directory: +# ./ssh_keygen_script.sh -d /custom/path/to/ssh_directory + +# Notes: +# - If the script encounters any errors during key generation or conversion, +# it will exit with a non-zero status. +# - The script ensures that duplicate key filenames are not overwritten to +# prevent accidental data loss. +# - Verbose mode provides additional information about the key pair generation +# and conversion process, including the contents of the generated and +# converted public keys. + +# Default values +ssh_dir="$HOME/.ssh" # Default SSH directory +file_extension="ppk" # Default file extension for converted keys +log_file="$ssh_dir/ssh_keygen_script.log" # Log file path + +# Function to print text in cyan color +print_cyan() { + echo -e "\e[36m$1\e[0m" # Print text in cyan color +} + +# Function to print section headers +print_section_header() { + echo "" # Add a newline for separation + echo "" # Add another newline for better readability + echo -e "$(print_cyan "=== $1 ===")" # Print section header in cyan color +} + +# Function for displaying verbose information +display_verbose_info() { + local key_type="$1" + local key_file="$2" + local extension="$3" + + if [ "$verbose" == "true" ]; then # Check if verbose mode is enabled + print_cyan "${key_type} public key:" + cat "${key_file}.pub" # Print public key + print_cyan "Converted ${key_type} public key:" + cat "${key_file}.${extension}" # Print converted public key + fi +} + +# Function for logging actions and errors to a single log file +log_message() { + local timestamp + timestamp=$(date +"%Y-%m-%d %H:%M:%S") # Get current timestamp + + echo "${timestamp} - ${1}" >>"$log_file" 2>&1 # Append message to log file +} + +# Start logging +echo "" >>"$log_file" # Add an empty line after the marker for separation +log_message "=== beginning of the log ===" # Log script execution start +log_message "Script execution started" # Log script execution start + +# Function for displaying usage instructions +display_usage() { + echo "Usage: $0 [-v] [-d /path/to/ssh_directory]" # Print usage instructions + echo "Options:" + echo " -v, --verbose Enable verbose mode" # Enable verbose mode option + echo " -d, --directory Specify the path to the SSH directory (default is \$HOME/.ssh)" # Specify SSH directory option + exit 1 # Exit script with error status +} + +# Function for checking required software and informing the user if not present +check_required_software() { + local software_list=("ssh-keygen" "putty") # List of required software + local missing_software=() # Initialize list for missing software + + for software in "${software_list[@]}"; do + if ! command -v "$software" >/dev/null 2>&1; then # Check if software is installed + missing_software+=("$software") # Add missing software to list + fi + done + + if [ ${#missing_software[@]} -eq 0 ]; then # Check if all required software is installed + log_message "All required software is installed." # Log message + else + log_message "Error: The following required software is not installed: ${missing_software[*]}" # Log missing software + log_message "Please install the missing software manually." # Log instruction to install missing software + exit 1 # Exit script with error status + fi +} + +# Function for trapping signals (interrupts) +trap_handler() { + echo "" # Print an empty line for better formatting + log_message "Script execution interrupted. Cleaning up..." # Log message + echo "=== end of the log ===" >>"$log_file" # Add marker for the end of the log + exit 1 # Exit script with error status +} + +# Function for generating key pair +generate_key_pair() { + local key_type="$1" # Key type (e.g., "ed25519" or "rsa") + local file_name="$2" # Filename for the key pair + + log_message "Generating new ${key_type} SSH key pair for server: ${server}, filename: ${file_name}" # Log message + print_section_header "Generating new ${key_type} SSH key pair" # Print section header + if ssh-keygen -a 100 -C "${server}" -f "${ssh_dir}/id_${key_type}_${file_name}" -t "${key_type}" >>"$log_file" 2>&1; then # Generate key pair + log_message "Successfully generated ${key_type} SSH key pair for filename: ${file_name}" # Log message + else + log_message "Failed to generate ${key_type} SSH key pair for filename: ${file_name}" # Log message + log_message "=== end of the log ===" # Add marker for the end of the log + exit 1 # Exit script with error status + fi +} + +# Function for converting key pair +convert_key_pair() { + local key_type="$1" # Key type (e.g., "ed25519" or "rsa") + local file_name="$2" # Filename for the key pair + + log_message "Convert ${key_type} SSH key pair to ${file_name}.${file_extension}" # Log message + print_section_header "Convert ${key_type} SSH key pair to ${file_name}.${file_extension}" # Print section header + if puttygen "${ssh_dir}/id_${key_type}_${file_name}" -o "${ssh_dir}/id_${key_type}_${file_name}.${file_extension}" >>"$log_file" 2>&1; then # Convert key pair + log_message "Successfully converted ${key_type} SSH key pair for filename: ${file_name}" # Log message + else + log_message "Failed to convert ${key_type} SSH key pair for filename: ${file_name}" # Log message + log_message "=== end of the log ===" # Add marker for the end of the log + exit 1 # Exit script with error status + fi +} + +# Function for checking key file existence +check_key_file_existence() { + local key_type="$1" # Key type (e.g., "ed25519" or "rsa") + local file_name="$2" # Filename for the key pair + + if [ -f "${ssh_dir}/id_${key_type}_${file_name}" ]; then # Check if key file exists + log_message "The ${key_type} SSH key pair already exists for filename: ${file_name}" # Log message + log_message "=== end of the log ===" # Add marker for the end of the log + echo "$(print_cyan "Error:") The ${key_type} SSH key pair already exists for filename: ${file_name}" # Print error message + exit 1 # Exit script with error status + fi +} + +# Function for choosing key type +choose_key_type() { + echo "" # Print an empty line for better formatting + print_cyan "Choose the SSH key type:" # Print prompt in cyan color + PS3="Enter your choice (1 for ed25519, 2 for RSA): " # Set prompt for select menu + options=("ed25519" "RSA") # Options for key type selection + select KEY_TYPE in "${options[@]}"; do # Display select menu + case $KEY_TYPE in + "ed25519") + check_key_file_existence "ed25519" "${file_name}" # Check if key file already exists + generate_key_pair "ed25519" "${file_name}" # Generate key pair + convert_key_pair "ed25519" "${file_name}" # Convert key pair + display_verbose_info "ed25519" "${ssh_dir}/id_ed25519_${file_name}" "${file_extension}" # Display verbose info + log_message "Ed25519 SSH key pair generated and converted for filename: ${file_name}" # Log message + break # Exit loop + ;; + "RSA") + check_key_file_existence "rsa" "${file_name}" # Check if key file already exists + generate_key_pair "rsa" "${file_name}" # Generate key pair + convert_key_pair "rsa" "${file_name}" # Convert key pair + display_verbose_info "RSA" "${ssh_dir}/id_rsa_${file_name}" "${file_extension}" # Display verbose info + log_message "RSA SSH key pair generated and converted for filename: ${file_name}" # Log message + break # Exit loop + ;; + *) + echo "Invalid option. Choose 1 for ed25519 or 2 for RSA." # Print error message + ;; + esac + done +} + +# Check installed software and install if necessary +check_required_software + +# Initialize options +verbose=false + +# Parse command line options +while [[ $# -gt 0 ]]; do + case "$1" in + -v | --verbose) + verbose=true + shift + ;; + -d | --directory) + shift + ssh_dir="$1" + shift + ;; + *) + display_usage + ;; + esac +done + +# Trap interrupts and clean up +trap trap_handler SIGINT SIGTERM + +# Prompt for SSH key pair information +read -r -p "$(print_cyan "Enter the server name: ")" server +read -r -p "$(print_cyan "Enter the filename for the new SSH key pair: ")" file_name + +# Check if the specified key file already exists +check_key_file_existence "ed25519" "${file_name}" +check_key_file_existence "rsa" "${file_name}" + +# Choose key type and generate/convert key pair +choose_key_type + +# Logging completion +log_message "Script execution completed for filename: ${file_name}" +log_message "=== end of the log ===" diff --git a/.bash_script/user_accounts_info.sh b/.bash_script/user_accounts_info.sh new file mode 100755 index 0000000..4b88fcc --- /dev/null +++ b/.bash_script/user_accounts_info.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +# Script Name: user_accounts_info.sh +# Author: GJS (homelab-aplha) +# Date: 2024-05-18T12:09:38+02:00 +# Version: 1.0 + +# Description: This script retrieves information about system user accounts and +# organizes them into system and normal user categories. + +# Usage: ./user_accounts_info.sh + +# Notes: +# - This script requires read access to /etc/login.defs and /etc/passwd. +# - It uses awk for data processing. +# - Output is sorted based on UID and GID. + +# Functions: + +# Function to print header +print_header() { + echo "===========================================================================================================" + printf "%-15s %-15s %-30s %-25s %-20s\n" "UID" "GID" "Shell" "Username" "Groups" + echo "===========================================================================================================" +} + +# Main Program: + +# File paths +login_defs="/etc/login.defs" +passwd_file="/etc/passwd" + +# Check if required files exist +if [ ! -f "$login_defs" ] || [ ! -f "$passwd_file" ]; then + echo "ERROR: Required files not found." + exit 1 +fi + +# Get UID and GID limits +min_uid=$(awk '/^UID_MIN/{print $2}' "$login_defs") +max_uid=$(awk '/^UID_MAX/{print $2}' "$login_defs") +min_gid=$(awk '/^GID_MIN/{print $2}' "$login_defs") +max_gid=$(awk '/^GID_MAX/{print $2}' "$login_defs") + +# Check if awk is available +if ! command -v awk &>/dev/null; then + echo "ERROR: awk command not found." + exit 1 +fi + +# Print system user accounts +print_header "System User Accounts" +awk -F':' -v "min_uid=$min_uid" -v "max_uid=$max_uid" -v "min_gid=$min_gid" -v "max_gid=$max_gid" ' + function get_user_groups(username) { + "id -Gn " username | getline groups + close("id -Gn " username) + return groups + } + !($3 >= min_uid && $3 <= max_uid && $4 >= min_gid && $4 <= max_gid) { + printf "%-15s %-15s %-30s %-25s %-20s\n", "UID: "$3, "GID: "$4, "Shell: "$7, $1, get_user_groups($1) + }' "$passwd_file" | sort -n -t ':' -k 2 + +echo "" # Add a blank line between sections + +# Print normal user accounts +print_header "Normal User Accounts" +awk -F':' -v "min_uid=$min_uid" -v "max_uid=$max_uid" -v "min_gid=$min_gid" -v "max_gid=$max_gid" ' + function get_user_groups(username) { + "id -Gn " username | getline groups + close("id -Gn " username) + return groups + } + $3 >= min_uid && $3 <= max_uid && $4 >= min_gid && $4 <= max_gid { + printf "%-15s %-15s %-30s %-25s %-20s\n", "UID: "$3, "GID: "$4, "Shell: "$7, $1, get_user_groups($1) + }' "$passwd_file" | sort -n -t ':' -k 2 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..6d3bfec --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Code owners for 'dotfiles' directory +* @homelab-alpha diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dfe873d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" +--- + +**Describe the bug** A clear and concise description of what the bug is. + +**To Reproduce** Steps to reproduce the behavior: + +1. Go to "...." +2. Click on "...." +3. Scroll down to "...." +4. See error + +**Expected behavior** A clear and concise description of what you expected to +happen. + +**Screenshots** If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] + +**Mobile phone (please complete the following information):** + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] + +**Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/security_report.md b/.github/ISSUE_TEMPLATE/security_report.md new file mode 100644 index 0000000..2533c84 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/security_report.md @@ -0,0 +1,31 @@ +--- +name: Security Issue Report +about: Report a security issue or vulnerability +title: "" +labels: "" +assignees: "" +--- + +**Description** Provide a brief description of the security issue or +vulnerability you have identified. + +**Steps to Reproduce** Outline the steps or conditions necessary to reproduce +the security issue. + +**Impact** Explain the potential impact of the security issue, including any +risks or consequences. + +**Affected Versions** List the versions of Docker or specific Docker images +affected by the security issue, if known. + +**Recommended Fix** Offer suggestions or recommendations for addressing and +mitigating the security issue. + +**Additional Information** Include any additional information, context, or +resources that may be relevant to understanding or resolving the security issue. + +**Contact Information** If you are open to further communication regarding the +security issue, provide your preferred contact information here. + +**Confidentiality Notice** If applicable, specify any confidentiality +requirements or restrictions associated with the security issue report.\*\* diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ac2dc05 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + target-branch: "main" + directory: "/" + schedule: + interval: "daily" + time: "02:00" + timezone: "Europe/Amsterdam" + commit-message: + prefix: "dependabot" + labels: + - "auto-merge" + - "dependencies" + - "github-actions" + open-pull-requests-limit: 5 diff --git a/.github/linters/.ansible-lint.yml b/.github/linters/.ansible-lint.yml new file mode 100644 index 0000000..02310f1 --- /dev/null +++ b/.github/linters/.ansible-lint.yml @@ -0,0 +1,17 @@ +--- +exclude_paths: +parseable: true +quiet: true +rulesdir: +skip_list: + - "empty-string-compare" + - "204" + - "no-changed-when" + - "command-instead-of-module" + - "command-instead-of-shell" + - "no-handler" + - "unnamed-task" + - "yaml" +tags: +use_default_rules: true +verbosity: 1 diff --git a/.github/linters/.arm-ttk.psd1 b/.github/linters/.arm-ttk.psd1 new file mode 100644 index 0000000..bcddce8 --- /dev/null +++ b/.github/linters/.arm-ttk.psd1 @@ -0,0 +1,30 @@ +# Documentation: +# - Test Parameters: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit#test-parameters +# - Test Cases: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/test-cases +@{ + # Test = @( + # 'Parameters Property Must Exist', + # 'Parameters Must Be Referenced', + # 'Secure String Parameters Cannot Have Default', + # 'Location Should Not Be Hardcoded', + # 'Resources Should Have Location', + # 'VM Size Should Be A Parameter', + # 'Min And Max Value Are Numbers', + # 'artifacts-parameter', + # 'Variables Must Be Referenced', + # 'Dynamic Variable References Should Not Use Concat', + # 'apiVersions Should Be Recent', + # 'Providers apiVersions Is Not Permitted', + # 'Template Should Not Contain Blanks', + # 'IDs Should Be Derived From ResourceIDs', + # 'ResourceIds should not contain', + # 'DependsOn Must Not Be Conditional', + # 'Deployment Resources Must Not Be Debug', + # 'adminUsername Should Not Be A Literal', + # 'VM Images Should Use Latest Version', + # 'Virtual-Machines-Should-Not-Be-Preview', + # 'ManagedIdentityExtension must not be used', + # 'Outputs Must Not Contain Secrets' + # ) + # Skip = @() +} diff --git a/.github/linters/.cfnlintrc.yml b/.github/linters/.cfnlintrc.yml new file mode 100644 index 0000000..19b154e --- /dev/null +++ b/.github/linters/.cfnlintrc.yml @@ -0,0 +1,3 @@ +--- +include_checks: + - I diff --git a/.github/linters/.checkov.yml b/.github/linters/.checkov.yml new file mode 100644 index 0000000..e88e69e --- /dev/null +++ b/.github/linters/.checkov.yml @@ -0,0 +1,7 @@ +--- +enable-secret-scan-all-files: true +framework: + - secrets +quiet: true +skip-path: +summary-position: bottom diff --git a/.github/linters/.chktexrc b/.github/linters/.chktexrc new file mode 100644 index 0000000..c2a96fb --- /dev/null +++ b/.github/linters/.chktexrc @@ -0,0 +1,802 @@ +## +## ChkTeX, example resource file for ChkTeX. +## Copyright (C) 1995-96 Jens T. Berger Thielemann +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +## +## Contact the author at: +## Jens Berger +## Spektrumvn. 4 +## N-0666 Oslo +## Norway +## E-mail: +## + +##################################################################### +# +# Note: The format has changed slightly (again). The { ... } +# syntax does now mean case-sensitive comparing, while [ ... ] means +# case-insensitive comparing of the keywords. Case-insensitive +# comparing of the keywords is only supported on a few of the +# keywords (it's not meaningful in all contexts, and it slows ChkTeX +# down). Keywords supporting this are marked throughout the file. +# +# You may also reset a list by saying "KEYWORD = { ... }"; it will +# then be set equal to the contents of the list you specify. +# +# Comments begin with `#', and continues for the rest of the line. +# Blank lines plus leading and trailing spaces are of course ignored. +# +# The general format of this file is the following: +# +# KEYWORD { item item ...} [ item item ... ] /* Adds items */ +# +# KEYWORD [ item item ...] { item item ... } /* Adds items */ +# +# KEYWORD = item +# +# KEYWORD = { item item ... } /* Clears list before adding */ +# +# KEYWORD = [ item item ... ] /* Clears list before adding */ +# +# This does _not_ mean that you may alternate the forms; certain +# keywords demands a list, other a single value. You thus have to +# look at the examples of their use. +# +# Please also note that if you specify a list-keyword twice, we'll +# concatenate the lists. If you specify a item-keyword twice, we'll +# kill the previous value. +# +# We are slightly context-sensitive when detecting tokens like "}" +# and "]"; they have to be preceded by a space. This generally makes +# life easier. +# +# Items are separated by spaces. Newlines are considered as spaces, +# but can't be escaped. You may surround items with quotes (`"') to +# easily put spaces into them. +# +# Escape sequences available: +# +# Sequence Resulting character +# ! A space (type `! ', not just a exclamation mark) +# !" " +# !# # +# !! ! +# !{ { +# !} } +# ![ [ +# !] ] +# != = +# !b Backspace +# !n New line +# !r Carriage return +# !t Tab +# !f Form feed +# !xNN NN must be a hexadecimal number (00 - ff), +# _both_ characters must be included. +# !dNNN DDD must be a decimal number (000 - 255), all +# three characters must be included. Unspecified +# results if DDD > 255. +# !NNN DDD must be a octal number (000 - 377), all +# three characters must be included. Unspecified +# results if DDD > 377. +# +# Minor note: As you can see, most of these escape sequences are +# equal to those in C (with some extensions); however, we use ! +# instead of \ as escape character for obvious reasons. +# +# +# Quick summary of keywords follows. Keywords marked with a * accept +# keywords accepting case-insensitive lists. +# +# Abbrev* - A list of abbreviations not automatically caught. +# CenterDots - Commands/characters which should have \cdots in +# between. +# CmdLine - Default commandline options. These will be +# processed before the ones you give on the command +# line. +# HyphDash \ +# NumDash - Number of dashes allowed in different contexts. +# WordDash / +# IJAccent - Commands which puts an accent _over_ their +# argument. +# Italic - Commands immediately turning on italic mode. +# ItalCmd - Commands putting their argument into italic. +# Linker - Commands which should have a non-breaking space in +# front. +# LowDots - Commands/characters which should have \ldots in +# between. +# MathEnvir - Environments which turn on math mode. +# MathCmd - Commands which turn on math mode. +# TextCmd - Commands which turn off math mode. +# MathRoman - Mathematical operators with LaTeX replacement +# defined. +# NoCharNext - Insists on that certain commands aren't followed by +# certain characters. +# NonItalic - Commands immediately turning off italic mode. +# NotPreSpaced- Commands which should not have a space in front of +# them. +# Primitives - Primitive TeX commands. +# PostLink - Commands which generates a page reference. +# OutFormat - Formats to use for output. See the -f & -v switch +# in the main doc. +# QuoteStyle - Either "Traditional" or "Logical". See main doc, +# warning 38. +# Silent - These commands do not produce any textual output; +# and are thus allowed to have a space after them. +# TabSize - Tab size you are using. +# TeXInputs - Paths to search \input and \include files for. +# UserWarn* - These strings will be searched for throughout the +# text. +# VerbEnvir - Environments which contents should be ignored. +# VerbClear - String we will overwrite unwanted data with. +# WipeArg - Commands (with arguments) which should be ignored +# in the checking. +# + + +##################################################################### +# +# Enter which type of quote-style you are using here. Currently, we +# support the following styles: +# +# Style Example of use +# Traditional "An example," he said, "would be great." +# Logical "An example", he said, "would be great". +# + +QuoteStyle = Logical + +##################################################################### +# +# Enter here what interval you have between your tabs. Only regular +# intervals are supported. +# + +TabSize = 8 + +##################################################################### +# +# Here, you can put default commandline options; most users would for +# instance like to put -v2 here. +# + +CmdLine +{ + -v2 +} + +##################################################################### +# +# These patterns will be searched for through the text; no matter +# whether they appear as normal text, commands or whatever. +# Currently case-sensitive. They are not found in comments. +# +# I usually define a special command like this: +# +# \def\unknown{\large\bf??} +# +# which I use whenever there is some information I don't have at the +# moment of writing. Thus, it makes sense to search for it. +# +# You should be able to develop your own uses for this. +# + +UserWarn +{ + + \unknown +### +# +# Another example; one should write \chktex or Chk\TeX - never ChkTeX. +# +### + + ChkTeX +} +[ + +### +# +# You may put case-insensitive patterns here. +# +### + +] + + +### +# +# These patterns will be searched for, no matter whether they appear +# as normal text, commands or arguments. However, they will _not_ +# match in verbatim environments. +# +# Remember that you have to escape (with a !) the following +# characters: "#!= as well as spaces and {}[] if they are proceeded by +# a space. +# +# Since these are PCRE regular expressions, you can use (?i) to make +# the expression case insensitive. See the man pages (man pcresyntax) +# or the nicely formatted http://perldoc.perl.org/perlre.html for +# documentation on the regular expression syntax. Note however that +# some the features of perl regular expression are not available such +# as running code (callouts), and replacing. +# +# An initial PCRE comment (?# ... ) can be used change what is +# displayed, thereby reminding yourself how to fix the problem. +# +### +UserWarnRegex +{ + + (?!#Always! use! \nmid)\\not! *(\||\\mid) + + # capitalize section when saying Section 6. + (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref + (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref + + # spell it out. + # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.) + # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$) + + # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf + (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline + # This relies on it being on a single line, and not having anything + # else on that line. With PCRE we could match balanced [] and {}, + # but I wonder if it's worth the complexity... + (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\} + +} + + +##################################################################### +# +# Here you can list the path of where ChkTeX should look for files it +# \inputs. The // postfix is now supported; if you append a double +# path-separator we'll recursively search that directory directories. +# MS-DOS users must append \\ instead, e.g. "C:\EMTEX\\". +# +# If you under either MS-DOS or UNIX wish to search an entire +# partition or the complete directory tree, you must use *three* +# slashes, e.g. "c:\\\" or "///". This may be considered to be a bug. +# +# By default, we'll search the current directory (not recursively, +# put "//" in the list for this); any paths specified below will be +# searched in addition to this. +# + +TeXInputs +{ + +} + +##################################################################### +# +# Here you may specify more output formats for use with the -v option, +# it simply indexes into this list. Remember to use ! instead of \, +# though. +# +# For explanation of how % fields expand; look at ChkTeX.{dvi,ps,pdf}. +# +# We will by default select entry number _two_ in this list (we count +# from 0), and -v without any parameter selects entry number _three_. +# + +OutFormat +{ + +# -v0; silent mode +%f%b%l%b%c%b%n%b%m!n + +# -v1; normal mode +"%k %n in %f line %l: %m!n%r%s%t!n%u!n" + +# -v2; fancy mode +"%k %n in %f line %l: %m!n%r%i%s%I%t!n!n" + +# -v3; lacheck mode +"!"%f!", line %l: %m!n" + +# -v4; verbose lacheck mode +"!"%f!", line %l: %m!n%r%s%t!n%u!n" + +# -v5; no line number, ease auto-test +"%k %n in %f: %m!n%r%s%t!n%u!n" + +# -v6; emacs compilation mode +"!"%f!", line %l.%c:(#%n) %m!n" + +} + + + +##################################################################### +# +# These commands should be ignored when detecting whether a command +# is ended by a space. You can specify regular expressions in the [] +# section in case you have many custom macros that can be safely +# terminated with a space. +# + +Silent +{ + \rm \em \bf \it \sl \sf \sc \tt \selectfont + \rmfamily \sffamily \ttfamily \mdseries \bfseries + \slshape \scshape \relax + \vskip \pagebreak \nopagebreak + + \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt + + \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak + \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy + \twocolumn \vdots + \today \kill \newline \thicklines \thinlines + + \columnsep \space \item \tiny \footnotesize \small \normalsize + \normal \large \Large \LARGE \huge \Huge \printindex + + \newpage \listoffigures \listoftables \tableofcontents + \maketitle \makeindex + + \hline \hrule \vrule + + \centering + + \bigskip \medskip \smallskip + + \noindent \expandafter + + \makeatletter \makeatother + + \columnseprule + + \textwidth \textheight \hsize \vsize + + \if \fi \else + + \csname \endcsname + + \z@ \p@ \@warning \typeout + + \dots \ldots \input \endinput \nextline \leavevmode \cdots + \appendix \listfiles \and \quad + \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin + \frenchspacing \nonfrenchspacing + \begingroup \endgroup \par + + \vrefwarning \upshape \headheight \headsep \hoffset \voffset + \cdot \qquad + \left \right + \qedhere + + \xspace + + \addlinespace \cr \fill \frontmatter + \toprule \midrule \bottomrule + +}[ +# Here you can put regular expressions to match Silent macros. It was +# designed for the case where you have many custom macros sharing a +# common prefix, but can of course be used for other things. + +# Support ConTeXt to at least some extent +\\start.* \\stop.* + +] + +##################################################################### +# +# Here, you can specify the length of various dashes. We sort the +# dash according to which type of characters that are on the left and +# right of it. We are only conclusive if they are the same. +# +# We associate as follows: +# +# Name Type of character on each side +# HyphDash Alphabetic (foo-bar) +# NumDash Numeric (2--3) +# WordDash Space (like this --- see?) +# +# Below you specify how many dashes which are legal in each case. We +# define 0 as a magic constant which always generates an error. You +# may specify more than one legal dash-length. +# +# Let's look at an example. You use the following dash-syntax: +# +# foo-bar +# 2--3 +# like this---see? +# +# +# HYPHDASH { 1 3 } # Either a hyphen, or inter-word +# NUMDASH { 2 } # Between words +# WORDDASH { 0 } # We never use this +# + +HyphDash +{ + 1 3 +} + +NumDash +{ + 2 +} + +WordDash +{ + 3 +} + +##################################################################### +# +# Here are exceptions to the dash rules above. For example, an +# n-dash -- between words is usually wrong, but in some cases it is +# correct, such as when naming a theorem. The Birch--Swinnerton-Dyer +# conjecture is one example where the difference matters. You can +# tell that Birch is one person and Swinnerton-Dyer is another. +# +# Adding line suppressions for these is possible, but can quickly +# become tedious if a certain theorem is referenced often. For this +# reason exceptions can be specified here. They are case-sensitive. +# + +DashExcpt +{ + Birch--Swinnerton-Dyer +} + +##################################################################### +# +# This keyword indicates commands whose argument isn't LaTeX code, +# and thus should be ignored. +# +# After the command, you may place arguments that you wish that +# should be wiped in the process; use [] for optional arguments, {} +# for required ones and * if the command supports an alternative +# variant. These should be separated from the command with a colon. +# Some commands (e.g. \cmidrule) use () to delimit and optional +# argument and so this syntax is supported as well. +# +# For instance, if you would like to wipe the \newcommand command, +# you would declare it as \newcommand:*[][]{} +# +# These commands may be "executed" before they're wiped, so you will +# typically also wish to list filehandling commands and similar here. +# + +WipeArg +{ + \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{} + \cite:[][]{} \nocite:{} + \input:{} \verbatiminput:[]{} \listinginput:[]{}{} + \verbatimtabinput:[]{} \include:{} \includeonly:{} + \bibitem:[]{} + \cline:{} \cmidrule:[](){} + \href:{}{} + # Cleveref -- there are many others that could be here as well... + \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{} + \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{} + # natbib + \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{} + \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{} + \citetext:{} \citeyear:*{} \citeyearpar:{} + # tipa which uses " + \textipa:{} +} + +##################################################################### +# +# These environments contain material which will be typeset as +# mathematics by LaTeX. This turns on/off some warnings. +# +# We will automagically append a * to each keyword. +# + +MathEnvir +{ + displaymath math eqnarray array equation + align alignat gather flalign multline +} + +##################################################################### +# +# These commands contain material which will be typeset as mathematics +# by LaTeX. The commands are assumed to have one mandatory argument +# which is in math mode. This turns on/off some warnings. +# + +MathCmd +{ + \ensuremath +} + +##################################################################### +# +# These commands contain material which will _not_ be typeset as +# mathematics by LaTeX even if it would otherwise be in mathmode. The +# commands are assumed to have one mandatory argument which is in text +# mode. This turns on/off some warnings. +# + +TextCmd +{ + \text \intertext \shortintertext \mbox +} + +##################################################################### +# +# These environments contains material which contents should be +# ignored. +# +# We will automagically append a * to each keyword. +# + +VerbEnvir +{ + verbatim comment listing verbatimtab rawhtml errexam picture texdraw + filecontents pgfpicture tikzpicture minted lstlisting IPA ignore +} + +##################################################################### +# +# ChkTeX does automagically catch most abbreviations; the ones we +# need to list here, are those which are most likely to be followed +# by a word with an upper-case letter (that is not the beginning of a +# new sentence). +# +# The case-insensitive abbreviations are not really case-insensitive, +# it seems to be more practical to only let the first character be +# case-insensitive, while the remaining are case-sensitive. +# +# To speed up the searching process somewhat, we require that these +# end in a `.', this should not be a problem. +# +# Much of this work (both the abbreviations below, and the regexps +# necessary to catch the remaining automatically) have been provided +# by Russ Bubley, . +# + +Abbrev +{ +# Ordinals +1st. 2nd. 3rd. 4th. +# Titles +Mr. Mrs. Miss. Ms. Dr. Prof. St. + +# +# Days +# Mon. Tue. Wed. Thu. Fri. Sat. Sun. +# +# Months +# Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec. +# +# Letters +# Kt. Jr. +# +# Corporate +# Co. Ltd. +# +# Addresses +# Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn. +# +# Misc. +# oe. pbab. ps. rsvp. Tx. +} +[ +### +# +# The first letter is case-insensitive in the abbrevs in this +# list. Due to the nature of the checking algorithm used for +# this, entries consisting of only one character will be +# silently ignored. +# +## + +# Latin +# cf. "et al." etc. qed. qv. viz. +# +# Corporate +# inc. plc. +# +# Misc +# fax. pcs. qty. tel. misc. +] + +##################################################################### +# +# Commands which accent characters, meaning that \i or \j (\imath and +# \jmath in mathmode) should be used instead of `i' and `j' +# + +IJAccent +{ + \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot + + \' \` \^ \" \~ \= \. \u \v \H \t + +### +# +# The remaining accent commands (\c,\d,\b) put their accent _under_ +# the character, not above, and should thus be used with normal i's +# and j's. +# +### + +} + +##################################################################### +# +# Commands which, when the group is terminated, needs italic +# correction. +# + +Italic +{ + \it \em \sl + \itshape \slshape +} + +##################################################################### +# +# Commands which makes the font non-italic. +# + +NonItalic +{ + \bf \rm \sf \tt \sc + \upshape +} + +##################################################################### +# +# Commands which put their argument into italic (and thus possibly +# needs italic correction in the end). +# +# This is currently empty, since \textit, \textsl and \emph do that +# automatically. +# + +ItalCmd +{ +} + +##################################################################### +# +# These commands all have in common that a pagebreak right in front +# of them is highly undesirable; thus there should be no space in +# front of them. +# + +PostLink +{ + \index \label +} + +##################################################################### +# +# These commands should not have a space in front of them for various +# reasons. I.e. much the same as POSTLINK, but produces another +# warning. +# + +NotPreSpaced +{ + \footnote \footnotemark \/ +} + +##################################################################### +# +# The commands listed here, should be prepended with a `~', as in +# "look in table~\ref{foo}", to avoid the references being split +# across lines. +# + +Linker +{ + \ref \vref \pageref \eqref \cite +} + +##################################################################### +# +# Commands/characters which should have \cdots in between, e.g. +# $1+2+3+\cdots+n$. +# + +CenterDots +{ + = + - \cdot \div & \times \geq \leq < > +} + +##################################################################### +# +# Commands/characters which should have \ldots in between, e.g. +# $1,2,3,\ldots,n$. +# + +LowDots +{ + . , ; +} + +##################################################################### +# +# In maths mode, there are certain aliases for mathematical operators +# like sin, cos, etc. Ignore the leading backslash in the commands, +# and so forth. You should list these below. +# + +MathRoman +{ + log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan + arctan tanh cot coth sec csc max min sup inf arg ker dim hom det + exp Pr gcd deg bmod pmod mod +} + +##################################################################### +# +# These TeX commands have become unnecessary, as there are LaTeX +# commands that does the same. Purists should thus avoid these in +# their code. +# +# (These are a spell-corrected version of those lacheck uses). +# + +Primitives +{ + \above \advance \catcode \chardef \closein \closeout \copy \count + \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide + \expandafter \font \hskip \vskip \openout +} + +##################################################################### +# +# Format: \command:characters +# +# We'll emit a warning if any of characters are found after the +# command. +# + +NoCharNext +{ + \left:{}$ \right:{}$ +} + +##################################################################### +# +# We're killing \verb@...@ commands and the arguments of the commands +# listed above in WipeArg by overwriting them with a string or a +# single character. +# +# This should not contain an alphabetic character (in case the user +# writes (\foo\verb@bar@), neither should it contain be one of +# LaTeX's reserved characters (`#$%&~_^\{}'), or any parenthesis +# character ('()[]{}'). If possible, don't use a punctuation +# character, either, or any spacing character. +# +# The asterisk is also unsuitable, as some commands behave in another +# way if they are appended with an asterisk. Which more or less +# leaves us with the pipe. +# +# Please note that this may also be a _string_, which will be +# repeated until the proper length is reached. +# + +VerbClear = "|" + +# +# All for now - have fun. +# +##################################################################### diff --git a/.github/linters/.clang-format b/.github/linters/.clang-format new file mode 100644 index 0000000..9b3aa8b --- /dev/null +++ b/.github/linters/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: LLVM diff --git a/.github/linters/.clj-kondo/config.edn b/.github/linters/.clj-kondo/config.edn new file mode 100644 index 0000000..8a2999a --- /dev/null +++ b/.github/linters/.clj-kondo/config.edn @@ -0,0 +1,7 @@ +{:linters + {:unresolved-symbol + {:exclude [(compojure.api.sweet/defroutes)]} + :refer-all + {:exclude [clj-time.jdbc]} + } +} diff --git a/.github/linters/.coffee-lint.json b/.github/linters/.coffee-lint.json new file mode 100644 index 0000000..053b20d --- /dev/null +++ b/.github/linters/.coffee-lint.json @@ -0,0 +1,135 @@ +{ + "arrow_spacing": { + "level": "ignore" + }, + "braces_spacing": { + "level": "ignore", + "spaces": 0, + "empty_object_spaces": 0 + }, + "camel_case_classes": { + "level": "error" + }, + "coffeescript_error": { + "level": "error" + }, + "colon_assignment_spacing": { + "level": "ignore", + "spacing": { + "left": 0, + "right": 0 + } + }, + "cyclomatic_complexity": { + "level": "ignore", + "value": 10 + }, + "duplicate_key": { + "level": "error" + }, + "empty_constructor_needs_parens": { + "level": "ignore" + }, + "ensure_comprehensions": { + "level": "warn" + }, + "eol_last": { + "level": "ignore" + }, + "indentation": { + "value": 2, + "level": "warn" + }, + "line_endings": { + "level": "ignore", + "value": "unix" + }, + "max_line_length": { + "value": 80, + "level": "ignore", + "limitComments": true + }, + "missing_fat_arrows": { + "level": "ignore", + "is_strict": false + }, + "newlines_after_classes": { + "value": 3, + "level": "ignore" + }, + "no_backticks": { + "level": "error" + }, + "no_debugger": { + "level": "warn", + "console": false + }, + "no_empty_functions": { + "level": "ignore" + }, + "no_empty_param_list": { + "level": "ignore" + }, + "no_implicit_braces": { + "level": "ignore", + "strict": true + }, + "no_implicit_parens": { + "level": "ignore", + "strict": true + }, + "no_interpolation_in_single_quotes": { + "level": "ignore" + }, + "no_nested_string_interpolation": { + "level": "warn" + }, + "no_plusplus": { + "level": "ignore" + }, + "no_private_function_fat_arrows": { + "level": "warn" + }, + "no_stand_alone_at": { + "level": "ignore" + }, + "no_tabs": { + "level": "error" + }, + "no_this": { + "level": "ignore" + }, + "no_throwing_strings": { + "level": "error" + }, + "no_trailing_semicolons": { + "level": "error" + }, + "no_trailing_whitespace": { + "level": "ignore", + "allowed_in_comments": false, + "allowed_in_empty_lines": true + }, + "no_unnecessary_double_quotes": { + "level": "ignore" + }, + "no_unnecessary_fat_arrows": { + "level": "warn" + }, + "non_empty_constructor_needs_parens": { + "level": "ignore" + }, + "prefer_english_operator": { + "level": "ignore", + "doubleNotLevel": "ignore" + }, + "space_operators": { + "level": "ignore" + }, + "spacing_after_comma": { + "level": "ignore" + }, + "transform_messes_up_line_numbers": { + "level": "warn" + } +} diff --git a/.github/linters/.ecrc b/.github/linters/.ecrc new file mode 100644 index 0000000..dd7eb41 --- /dev/null +++ b/.github/linters/.ecrc @@ -0,0 +1,20 @@ +{ + "Verbose": false, + "Debug": false, + "IgnoreDefaults": false, + "SpacesAftertabs": false, + "NoColor": false, + "exclude": [ + "testfiles" + ], + "AllowedContentTypes": [], + "PassedFiles": [], + "Disable": { + "EndOfLine": false, + "Indentation": false, + "InsertFinalNewline": false, + "TrimTrailingWhitespace": false, + "IndentSize": false, + "MaxLineLength": false + } +} diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml new file mode 100644 index 0000000..eaa0809 --- /dev/null +++ b/.github/linters/.eslintrc.yml @@ -0,0 +1,51 @@ +--- +env: + browser: true + es6: true + jest: true + +globals: + Atomics: readonly + SharedArrayBuffer: readonly + +ignorePatterns: + - "!.*" + - "**/node_modules/.*" + +parser: "@typescript-eslint/parser" +parserOptions: + ecmaVersion: 2018 + sourceType: module + +plugins: + - "@typescript-eslint" + +rules: { } + +overrides: + # JSON files + - files: + - "*.json" + extends: + - plugin:jsonc/recommended-with-json + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON + + # JSONC files + - files: + - "*.jsonc" + extends: + - plugin:jsonc/recommended-with-jsonc + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSONC + + # JSON5 files + - files: + - "*.json5" + extends: + - plugin:jsonc/recommended-with-json5 + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON5 diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 new file mode 100644 index 0000000..8332de3 --- /dev/null +++ b/.github/linters/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 120 +extend-ignore = E203 diff --git a/.github/linters/.gherkin-lintrc b/.github/linters/.gherkin-lintrc new file mode 100644 index 0000000..76111d0 --- /dev/null +++ b/.github/linters/.gherkin-lintrc @@ -0,0 +1,52 @@ +{ + "no-files-without-scenarios": "on", + "no-unnamed-features": "on", + "no-unnamed-scenarios": "on", + "no-dupe-scenario-names": [ + "on", + "in-feature" + ], + "no-dupe-feature-names": "on", + "no-partially-commented-tag-lines": "on", + "indentation": "on", + "no-trailing-spaces": "on", + "new-line-at-eof": [ + "on", + "yes" + ], + "no-multiple-empty-lines": "on", + "no-empty-file": "on", + "no-scenario-outlines-without-examples": "on", + "name-length": [ + "on", + { + "Feature": 50 + } + ], + "no-restricted-tags": [ + "on", + { + "tags": [ + "@watch", + "@wip" + ] + } + ], + "use-and": "on", + "no-duplicate-tags": "on", + "no-superfluous-tags": "on", + "no-homogenous-tags": "on", + "one-space-between-tags": "on", + "no-unused-variables": "on", + "no-background-only-scenario": "on", + "no-empty-background": "on", + "scenario-size": [ + "on", + { + "steps-length": { + "Background": 15, + "Scenario": 15 + } + } + ] +} diff --git a/.github/linters/.gitleaks.toml b/.github/linters/.gitleaks.toml new file mode 100644 index 0000000..c104171 --- /dev/null +++ b/.github/linters/.gitleaks.toml @@ -0,0 +1,6 @@ +title = "gitleaks config" + +[extend] +# useDefault will extend the base configuration with the default gitleaks config: +# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml +useDefault = true diff --git a/.github/linters/.golangci.yml b/.github/linters/.golangci.yml new file mode 100644 index 0000000..6cf8c61 --- /dev/null +++ b/.github/linters/.golangci.yml @@ -0,0 +1,43 @@ +--- +issues: + exclude-rules: + - path: _test\.go + linters: + - dupl + - gosec + - goconst + exclude-dirs: + - test/testdata_etc # test files + - internal/cache # extracted from Go code + - internal/renameio # extracted from Go code + - internal/robustio # extracted from Go code + +linters: + enable: + - gosec + - unconvert + - gocyclo + - goconst + - goimports + - gocritic + - govet + - revive +linters-settings: + errcheck: + check-blank: true + govet: + settings: + printf: + funcs: + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf + enable: + - nilness + - shadow + gocyclo: + min-complexity: 15 + +run: + timeout: 5m diff --git a/.github/linters/.groovylintrc.json b/.github/linters/.groovylintrc.json new file mode 100644 index 0000000..16700af --- /dev/null +++ b/.github/linters/.groovylintrc.json @@ -0,0 +1,65 @@ +{ + "extends": "recommended", + "rules": { + "CatchException": { + "enabled": false + }, + "CatchThrowable": { + "enabled": false + }, + "ClassJavadoc": { + "enabled": false + }, + "ClosureAsLastMethodParameter": { + "enabled": false + }, + "DuplicateNumberLiteral": { + "enabled": false + }, + "DuplicateStringLiteral": { + "enabled": false + }, + "FieldTypeRequired": { + "enabled": false + }, + "JavaIoPackageAccess": { + "enabled": false + }, + "MethodParameterTypeRequired": { + "enabled": false + }, + "MethodSize": { + "enabled": false + }, + "NoDef": { + "enabled": false + }, + "PrintStackTrace": { + "enabled": false + }, + "PropertyName": { + "enabled": false + }, + "SpaceAroundMapEntryColon": { + "enabled": false + }, + "SystemExit": { + "enabled": false + }, + "UnnecessaryGetter": { + "enabled": false + }, + "UnnecessaryObjectReferences": { + "enabled": false + }, + "UnnecessarySetter": { + "enabled": false + }, + "VariableName": { + "enabled": false + }, + "VariableTypeRequired": { + "enabled": false + } + } +} diff --git a/.github/linters/.hadolint.yml b/.github/linters/.hadolint.yml new file mode 100644 index 0000000..68cb20f --- /dev/null +++ b/.github/linters/.hadolint.yml @@ -0,0 +1,4 @@ +--- +failure-threshold: warning + +ignored: diff --git a/.github/linters/.htmlhintrc b/.github/linters/.htmlhintrc new file mode 100644 index 0000000..5daf1dd --- /dev/null +++ b/.github/linters/.htmlhintrc @@ -0,0 +1,25 @@ +{ + "tagname-lowercase": true, + "attr-lowercase": true, + "attr-value-double-quotes": true, + "attr-value-not-empty": false, + "attr-no-duplication": true, + "doctype-first": true, + "tag-pair": true, + "tag-self-close": false, + "spec-char-escape": true, + "id-unique": true, + "src-not-empty": true, + "title-require": true, + "alt-require": true, + "doctype-html5": true, + "id-class-value": "dash", + "style-disabled": false, + "inline-style-disabled": false, + "inline-script-disabled": false, + "space-tab-mixed-disabled": "space", + "id-class-ad-disabled": false, + "href-abs-or-rel": false, + "attr-unsafe-chars": true, + "head-script-disabled": true +} diff --git a/.github/linters/.isort.cfg b/.github/linters/.isort.cfg new file mode 100644 index 0000000..b9fb3f3 --- /dev/null +++ b/.github/linters/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +profile=black diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json new file mode 100644 index 0000000..6ec7daf --- /dev/null +++ b/.github/linters/.jscpd.json @@ -0,0 +1,11 @@ +{ + "threshold": 0, + "reporters": [ + "consoleFull" + ], + "ignore": [ + "**/github/workspace/dotfiles_installer.sh**", + "**/tmp/lint/dotfiles_installer.sh**" + ], + "absolute": true +} diff --git a/.github/linters/.lintr b/.github/linters/.lintr new file mode 100644 index 0000000..4a776d9 --- /dev/null +++ b/.github/linters/.lintr @@ -0,0 +1 @@ +linters: linters_with_defaults(object_usage_linter = NULL) diff --git a/.github/linters/.luacheckrc b/.github/linters/.luacheckrc new file mode 100644 index 0000000..00aa308 --- /dev/null +++ b/.github/linters/.luacheckrc @@ -0,0 +1 @@ +--std max diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..90086c2 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,15 @@ +--- +MD004: false +MD007: + indent: 2 +MD013: + line_length: 80, + code_block_line_length: 120, + tables: false +MD026: + punctuation: ".,;:!。,;:" +MD029: false +MD033: false +MD036: false +blank_lines: false +no-hard-tabs: false diff --git a/.github/linters/.mypy.ini b/.github/linters/.mypy.ini new file mode 100644 index 0000000..dd1ccba --- /dev/null +++ b/.github/linters/.mypy.ini @@ -0,0 +1,4 @@ +# Global options: + +[mypy] +ignore_missing_imports = True diff --git a/.github/linters/.openapirc.yml b/.github/linters/.openapirc.yml new file mode 100644 index 0000000..7c593db --- /dev/null +++ b/.github/linters/.openapirc.yml @@ -0,0 +1,2 @@ +--- +extends: spectral:oas diff --git a/.github/linters/.perlcriticrc b/.github/linters/.perlcriticrc new file mode 100644 index 0000000..eb92033 --- /dev/null +++ b/.github/linters/.perlcriticrc @@ -0,0 +1,2 @@ +severity = 1 +verbose = %f:%l:%c [%s %p] %m near '%r'\n diff --git a/.github/linters/.powershell-psscriptanalyzer.psd1 b/.github/linters/.powershell-psscriptanalyzer.psd1 new file mode 100644 index 0000000..1986650 --- /dev/null +++ b/.github/linters/.powershell-psscriptanalyzer.psd1 @@ -0,0 +1,18 @@ +#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Cmdlets/Invoke-ScriptAnalyzer.md#-settings +@{ + #CustomRulePath='path\to\CustomRuleModule.psm1' + #RecurseCustomRulePath='path\of\customrules' + #Severity = @( + # 'Error' + # 'Warning' + #) + #IncludeDefaultRules=${true} + #ExcludeRules = @( + # 'PSAvoidUsingWriteHost', + # 'MyCustomRuleName' + #) + #IncludeRules = @( + # 'PSAvoidUsingWriteHost', + # 'MyCustomRuleName' + #) +} diff --git a/.github/linters/.protolintrc.yml b/.github/linters/.protolintrc.yml new file mode 100644 index 0000000..5db5a6a --- /dev/null +++ b/.github/linters/.protolintrc.yml @@ -0,0 +1,4 @@ +--- +lint: + rules: + all_default: false diff --git a/.github/linters/.python-black b/.github/linters/.python-black new file mode 100644 index 0000000..e69de29 diff --git a/.github/linters/.python-lint b/.github/linters/.python-lint new file mode 100644 index 0000000..0f974f1 --- /dev/null +++ b/.github/linters/.python-lint @@ -0,0 +1,4 @@ +[MASTER] + +# Use multiple processes to speed up Pylint. +jobs=0 diff --git a/.github/linters/.ruby-lint.yml b/.github/linters/.ruby-lint.yml new file mode 100644 index 0000000..103b1f4 --- /dev/null +++ b/.github/linters/.ruby-lint.yml @@ -0,0 +1,4 @@ +--- +inherit_gem: + rubocop-github: + - config/default.yml diff --git a/.github/linters/.ruff.toml b/.github/linters/.ruff.toml new file mode 100644 index 0000000..9d16dc7 --- /dev/null +++ b/.github/linters/.ruff.toml @@ -0,0 +1,6 @@ +cache-dir = "/tmp/.ruff_cache" + +line-length = 120 + +[lint] +ignore = ["E203"] diff --git a/.github/linters/.scalafmt.conf b/.github/linters/.scalafmt.conf new file mode 100644 index 0000000..0d6df90 --- /dev/null +++ b/.github/linters/.scalafmt.conf @@ -0,0 +1,7 @@ +// Scala Format Configuration +// https://scalameta.org/scalafmt/docs/configuration.html +version = 3.8.1 +align.preset = more // For pretty alignment. +maxColumn = 80 +// https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects +runner.dialect = scala3 diff --git a/.github/linters/.shellcheckrc b/.github/linters/.shellcheckrc new file mode 100644 index 0000000..9a5cf93 --- /dev/null +++ b/.github/linters/.shellcheckrc @@ -0,0 +1,5 @@ +# Look for 'source'd files relative to the checked script +source-path=SCRIPTDIR + +# Allow opening any 'source'd file, even if not specified as input +external-sources=true diff --git a/.github/linters/.snakefmt.toml b/.github/linters/.snakefmt.toml new file mode 100644 index 0000000..e69de29 diff --git a/.github/linters/.sql-config.json b/.github/linters/.sql-config.json new file mode 100644 index 0000000..db91b91 --- /dev/null +++ b/.github/linters/.sql-config.json @@ -0,0 +1,3 @@ +{ + "_comment": "details can be found at: https://sql-lint.readthedocs.io/en/latest/files/configuration.html" +} diff --git a/.github/linters/.sqlfluff b/.github/linters/.sqlfluff new file mode 100644 index 0000000..1254352 --- /dev/null +++ b/.github/linters/.sqlfluff @@ -0,0 +1,18 @@ +## This /.sqlfluff file can be used to configure the SQLFluff linter when +## used via the Super Linter. Copy it to the .github/linters folder of +## your repo, and uncomment the necessary lines to configure the Super Linter. +## +## IMPORTANT NOTE: The Super Linter configuration file for SQLFluff +## supersedes any local configuration files you might have in within your +## codebase. For this reason it should only be used when you want the same +## configuration for your entire code base. If you need different configuration +## in different folders you must leave this config commented out, and instead +## manage all your config files within your code base rather than in the +## .github/linters folder +## +## Configuration options are described here: +## https://docs.sqlfluff.com/en/stable/configuration.html +## + +[sqlfluff] +#dialect = ansi diff --git a/.github/linters/.stylelintrc.json b/.github/linters/.stylelintrc.json new file mode 100644 index 0000000..40db42c --- /dev/null +++ b/.github/linters/.stylelintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-standard" +} diff --git a/.github/linters/.textlintrc b/.github/linters/.textlintrc new file mode 100644 index 0000000..3a62705 --- /dev/null +++ b/.github/linters/.textlintrc @@ -0,0 +1,514 @@ +{ + "filters": { + "comments": true, + "allowlist": { + "allow": [ + "Airbnb", + "AJAX", + "Android", + "API", + "AppleScript", + "AppVeyor", + "AVA", + "BrowserStack", + "Browsersync", + "Codecov", + "CodePen", + "CodeSandbox", + "CSS", + "DefinitelyTyped", + "EditorConfig", + "ESLint", + "GIF", + "GitHub", + "GraphiQL", + "GraphQL", + "HTML", + "HTTPS", + "I/O", + "ID", + "iOS", + "IoT", + "JavaScript", + "JetBrains", + "JPEG", + "jQuery", + "LinkedIn", + "Lodash", + "MacBook", + "markdown", + "Markdown", + "MIME", + "OK", + "OpenType", + "PaaS", + "PayPal", + "PDF", + "PhpStorm", + "PNG", + "RubyMine", + "SaaS", + "SemVer", + "smartphones", + "Smartphones", + "TypeScript", + "UglifyJS", + "URL", + "Wasm", + "WebAssembly", + "Website", + "website", + "WebStorm", + "WordPress", + "YouTube" + ] + } + }, + "rules": { + "terminology": { + "defaultTerms": false, + "skip": [ + "Blockquote", + "Link" + ], + "terms": [ + [ + "3-D", + "3D" + ], + [ + "a npm", + "an npm" + ], + [ + "HTTP[ /]2(?:\\.0)?", + "HTTP/2" + ], + [ + "Mac ?OS", + "macOS" + ], + [ + "OS X", + "macOS" + ], + [ + "StackOverflow", + "Stack Overflow" + ], + [ + "styled ?components", + "styled-components" + ], + [ + "API['’]?s", + "APIs" + ], + [ + "I-O", + "I/O" + ], + [ + "URL['’]?s", + "URLs" + ], + [ + "an URL", + "a URL" + ], + [ + "wi[- ]?fi", + "Wi-Fi" + ], + [ + "CVE['’]?s", + "CVEs" + ], + [ + "id['’]?s", + "IDs" + ], + [ + "backwards compatible", + "backward compatible" + ], + [ + "build system(s)?", + "build tool$1" + ], + [ + "CLI tool(s)?", + "command-line tool$1" + ], + [ + "he or she", + "they" + ], + [ + "he/she", + "they" + ], + [ + "\\(s\\)he", + "they" + ], + [ + "his/her", + "their" + ], + [ + "his or her", + "their" + ], + [ + "repo\\b", + "repository" + ], + [ + "spread operator", + "spread syntax" + ], + [ + "re-direct", + "redirect" + ], + [ + "auto[- ]complete", + "autocomplete" + ], + [ + "auto[- ]format", + "autoformat" + ], + [ + "auto[- ]fix", + "autofix" + ], + [ + "auto[- ]fixing", + "autofixing" + ], + [ + "bug[- ]fix(es)?", + "bugfix$1" + ], + [ + "change[- ]log(s)?", + "changelog$1" + ], + [ + "check[- ]box(es)?", + "checkbox$1" + ], + [ + "code[- ]base(es)?", + "codebase$1" + ], + [ + "co[- ]locate(d?)", + "colocate$1" + ], + [ + "end[- ]point(s)?", + "endpoint$1" + ], + [ + "e[- ]mail(s)?", + "email$1" + ], + [ + "file[- ]name(s)?", + "filename$1" + ], + [ + "hack[- ]a[- ]thon(s)?", + "hackathon$1" + ], + [ + "host[- ]name(s)?", + "hostname$1" + ], + [ + "hot[- ]key(s)?", + "hotkey$1" + ], + [ + "lock[- ]file(s)?", + "lockfile$1" + ], + [ + "mark-up", + "markup" + ], + [ + "meta[- ]data", + "metadata" + ], + [ + "micro[- ]service(s)?", + "microservice$1" + ], + [ + "name[- ]space(s)?", + "namespace$1" + ], + [ + "pre[- ]condition(s)?", + "precondition$1" + ], + [ + "pre[- ]defined", + "predefined" + ], + [ + "pre[- ]release(s)?", + "prerelease$1" + ], + [ + "re[- ]write", + "rewrite" + ], + [ + "run[- ]time", + "runtime" + ], + [ + "screen[- ]shot(s)?", + "screenshot$1" + ], + [ + "screen[- ]?snap(s)?", + "screenshot$1" + ], + [ + "sub[- ]class((?:es|ing)?)", + "subclass$1" + ], + [ + "sub[- ]tree(s)?", + "subtree$1" + ], + [ + "time[- ]stamp(s)?", + "timestamp$1" + ], + [ + "touch[- ]screen(s)?", + "touchscreen$1" + ], + [ + "user[- ]name(s)?", + "username$1" + ], + [ + "walk[- ]through", + "walkthrough" + ], + [ + "white[- ]space", + "whitespace" + ], + [ + "wild[- ]card(s)?", + "wildcard$1" + ], + [ + "css-?in-?js", + "CSS in JS" + ], + [ + "code-?review(s)?", + "code review$1" + ], + [ + "code-?splitting", + "code splitting" + ], + [ + "end-?user(s)?", + "end user$1" + ], + [ + "file-?type(s)?", + "file type$1" + ], + [ + "style-?guide(s)?", + "style guide$1" + ], + [ + "source-?map(s)?", + "source map$1" + ], + [ + "style-?sheet(s)?", + "style sheet$1" + ], + [ + "user-?base", + "user base" + ], + [ + "web-page(s)?", + "webpage$1" + ], + [ + "built ?in", + "built-in" + ], + [ + "command ?line", + "command-line" + ], + [ + "end ?to ?end", + "end-to-end" + ], + [ + "end[- ]?2[- ]?end", + "end-to-end" + ], + [ + "error ?prone", + "error-prone" + ], + [ + "higher ?order", + "higher-order" + ], + [ + "key[/ ]?value", + "key-value" + ], + [ + "two ?steps? authentication", + "two-step authentication" + ], + [ + "two ?steps? verification", + "two-step verification" + ], + [ + "2 ?steps? authentication", + "two-step authentication" + ], + [ + "2 ?steps? verification", + "two-step verification" + ], + [ + "3rd[- ]party", + "third-party" + ], + [ + "(?<=(?:\\w+[^.?!])? )stylelint\\b", + "stylelint" + ], + [ + "(?<=(?:\\w+[^.?!])? )webpack\\b", + "webpack" + ], + [ + "(?<=(?:\\w+[^.?!])? )npm\\b", + "npm" + ], + [ + "accidentially", + "accidentally" + ], + [ + "busineess", + "business" + ], + [ + "busines", + "business" + ], + [ + "analysed", + "analyzed" + ], + [ + "cancelling", + "canceling" + ], + [ + "environemnt(s)?", + "environment$1" + ], + [ + "explotation", + "exploitation" + ], + [ + "encyprtion", + "encryption" + ], + [ + "flacky test(s)?", + "flaky test$1" + ], + [ + "falsey", + "falsy" + ], + [ + "hsot", + "host" + ], + [ + "intiated", + "initiated" + ], + [ + "localised", + "localized" + ], + [ + "pacakge(s)?", + "package$1" + ], + [ + "perfomed", + "performed" + ], + [ + "refernece(s)?", + "reference$1" + ], + [ + "renegotiaion(s)?", + "renegotiation$1" + ], + [ + "traget", + "target" + ], + [ + "tagret", + "target" + ], + [ + "tilda", + "tilde" + ], + [ + "teh", + "the" + ], + [ + "transfered", + "transferred" + ], + [ + "unlkely", + "unlikely" + ], + [ + "utilising", + "utilizing" + ] + ] + } + } +} diff --git a/.github/linters/.tflint.hcl b/.github/linters/.tflint.hcl new file mode 100644 index 0000000..98a41ca --- /dev/null +++ b/.github/linters/.tflint.hcl @@ -0,0 +1,28 @@ +// https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/config.md +config { + module = false + force = false +} + +plugin "terraform" { + enabled = true + preset = "recommended" +} + +plugin "aws" { + enabled = true + version = "0.28.0" + source = "github.com/terraform-linters/tflint-ruleset-aws" +} + +plugin "azurerm" { + enabled = true + version = "0.25.1" + source = "github.com/terraform-linters/tflint-ruleset-azurerm" +} + +plugin "google" { + enabled = true + version = "0.26.0" + source = "github.com/terraform-linters/tflint-ruleset-google" +} diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000..5f8c084 --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,52 @@ +--- +rules: + braces: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 1 + max-spaces-inside-empty: 5 + brackets: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 1 + max-spaces-inside-empty: 5 + colons: + level: warning + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: warning + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: disable + comments-indentation: disable + document-end: disable + document-start: + level: warning + present: true + empty-lines: + level: warning + max: 2 + max-start: 0 + max-end: 0 + hyphens: + level: warning + max-spaces-after: 1 + indentation: + level: warning + spaces: consistent + indent-sequences: true + check-multi-line-strings: false + key-duplicates: enable + line-length: + level: warning + max: 80 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable diff --git a/.github/linters/actionlint.yml b/.github/linters/actionlint.yml new file mode 100644 index 0000000..8dd1001 --- /dev/null +++ b/.github/linters/actionlint.yml @@ -0,0 +1,5 @@ +--- +self-hosted-runner: + # Labels of self-hosted runner in array of string + # labels: + # - mylabel diff --git a/.github/linters/php.ini b/.github/linters/php.ini new file mode 100644 index 0000000..5e80173 --- /dev/null +++ b/.github/linters/php.ini @@ -0,0 +1,1947 @@ +[PHP] + +;;;;;;;;;;;;;;;;;;; +; About php.ini ; +;;;;;;;;;;;;;;;;;;; +; PHP's initialization file, generally called php.ini, is responsible for +; configuring many of the aspects of PHP's behavior. + +; PHP attempts to find and load this configuration from a number of locations. +; The following is a summary of its search order: +; 1. SAPI module specific location. +; 2. The PHPRC environment variable. (As of PHP 5.2.0) +; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0) +; 4. Current working directory (except CLI) +; 5. The web server's directory (for SAPI modules), or directory of PHP +; (otherwise in Windows) +; 6. The directory from the --with-config-file-path compile time option, or the +; Windows directory (usually C:\windows) +; See the PHP docs for more specific information. +; http://php.net/configuration.file + +; The syntax of the file is extremely simple. Whitespace and lines +; beginning with a semicolon are silently ignored (as you probably guessed). +; Section headers (e.g. [Foo]) are also silently ignored, even though +; they might mean something in the future. + +; Directives following the section heading [PATH=/www/mysite] only +; apply to PHP files in the /www/mysite directory. Directives +; following the section heading [HOST=www.example.com] only apply to +; PHP files served from www.example.com. Directives set in these +; special sections cannot be overridden by user-defined INI files or +; at runtime. Currently, [PATH=] and [HOST=] sections only work under +; CGI/FastCGI. +; http://php.net/ini.sections + +; Directives are specified using the following syntax: +; directive = value +; Directive names are *case sensitive* - foo=bar is different from FOO=bar. +; Directives are variables used to configure PHP or PHP extensions. +; There is no name validation. If PHP can't find an expected +; directive because it is not set or is mistyped, a default value will be used. + +; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one +; of the INI constants (On, Off, True, False, Yes, No and None) or an expression +; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a +; previously set variable or directive (e.g. ${foo}) + +; Expressions in the INI file are limited to bitwise operators and parentheses: +; | bitwise OR +; ^ bitwise XOR +; & bitwise AND +; ~ bitwise NOT +; ! boolean NOT + +; Boolean flags can be turned on using the values 1, On, True or Yes. +; They can be turned off using the values 0, Off, False or No. + +; An empty string can be denoted by simply not writing anything after the equal +; sign, or by using the None keyword: + +; foo = ; sets foo to an empty string +; foo = None ; sets foo to an empty string +; foo = "None" ; sets foo to the string 'None' + +; If you use constants in your value, and these constants belong to a +; dynamically loaded extension (either a PHP extension or a Zend extension), +; you may only use these constants *after* the line that loads the extension. + +;;;;;;;;;;;;;;;;;;; +; About this file ; +;;;;;;;;;;;;;;;;;;; +; PHP comes packaged with two INI files. One that is recommended to be used +; in production environments and one that is recommended to be used in +; development environments. + +; php.ini-production contains settings which hold security, performance and +; best practices at its core. But please be aware, these settings may break +; compatibility with older or less security conscience applications. We +; recommending using the production ini in production and testing environments. + +; php.ini-development is very similar to its production variant, except it is +; much more verbose when it comes to errors. We recommend using the +; development version only in development environments, as errors shown to +; application users can inadvertently leak otherwise secure information. + +; This is the php.ini-production INI file. + +;;;;;;;;;;;;;;;;;;; +; Quick Reference ; +;;;;;;;;;;;;;;;;;;; +; The following are all the settings which are different in either the production +; or development versions of the INIs with respect to PHP's default behavior. +; Please see the actual settings later in the document for more details as to why +; we recommend these changes in PHP's behavior. + +; display_errors +; Default Value: On +; Development Value: On +; Production Value: Off + +; display_startup_errors +; Default Value: Off +; Development Value: On +; Production Value: Off + +; error_reporting +; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +; Development Value: E_ALL +; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT + +; log_errors +; Default Value: Off +; Development Value: On +; Production Value: On + +; max_input_time +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) + +; output_buffering +; Default Value: Off +; Development Value: 4096 +; Production Value: 4096 + +; register_argc_argv +; Default Value: On +; Development Value: Off +; Production Value: Off + +; request_order +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" + +; session.gc_divisor +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 + +; session.sid_bits_per_character +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 + +; short_open_tag +; Default Value: On +; Development Value: Off +; Production Value: Off + +; variables_order +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS" + +;;;;;;;;;;;;;;;;;;;; +; php.ini Options ; +;;;;;;;;;;;;;;;;;;;; +; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini" +;user_ini.filename = ".user.ini" + +; To disable this feature set this option to an empty value +;user_ini.filename = + +; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes) +;user_ini.cache_ttl = 300 + +;;;;;;;;;;;;;;;;;;;; +; Language Options ; +;;;;;;;;;;;;;;;;;;;; + +; Enable the PHP scripting language engine under Apache. +; http://php.net/engine +engine = On + +; This directive determines whether or not PHP will recognize code between +; tags as PHP source which should be processed as such. It is +; generally recommended that should be used and that this feature +; should be disabled, as enabling it may result in issues when generating XML +; documents, however this remains supported for backward compatibility reasons. +; Note that this directive does not control the would work. +; http://php.net/syntax-highlighting +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.default = #0000BB +;highlight.html = #000000 + +; If enabled, the request will be allowed to complete even if the user aborts +; the request. Consider enabling it if executing long requests, which may end up +; being interrupted by the user or a browser timing out. PHP's default behavior +; is to disable this feature. +; http://php.net/ignore-user-abort +;ignore_user_abort = On + +; Determines the size of the realpath cache to be used by PHP. This value should +; be increased on systems where PHP opens many files to reflect the quantity of +; the file operations performed. +; Note: if open_basedir is set, the cache is disabled +; http://php.net/realpath-cache-size +;realpath_cache_size = 4096k + +; Duration of time, in seconds for which to cache realpath information for a given +; file or directory. For systems with rarely changing files, consider increasing this +; value. +; http://php.net/realpath-cache-ttl +;realpath_cache_ttl = 120 + +; Enables or disables the circular reference collector. +; http://php.net/zend.enable-gc +zend.enable_gc = On + +; If enabled, scripts may be written in encodings that are incompatible with +; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such +; encodings. To use this feature, mbstring extension must be enabled. +; Default: Off +;zend.multibyte = Off + +; Allows to set the default encoding for the scripts. This value will be used +; unless "declare(encoding=...)" directive appears at the top of the script. +; Only affects if zend.multibyte is set. +; Default: "" +;zend.script_encoding = + +; Allows to include or exclude arguments from stack traces generated for exceptions. +; In production, it is recommended to turn this setting on to prohibit the output +; of sensitive information in stack traces +; Default: Off +zend.exception_ignore_args = On + +;;;;;;;;;;;;;;;;; +; Miscellaneous ; +;;;;;;;;;;;;;;;;; + +; Decides whether PHP may expose the fact that it is installed on the server +; (e.g. by adding its signature to the Web server header). It is no security +; threat in any way, but it makes it possible to determine whether you use PHP +; on your server or not. +; http://php.net/expose-php +expose_php = On + +;;;;;;;;;;;;;;;;;;; +; Resource Limits ; +;;;;;;;;;;;;;;;;;;; + +; Maximum execution time of each script, in seconds +; http://php.net/max-execution-time +; Note: This directive is hardcoded to 0 for the CLI SAPI +max_execution_time = 30 + +; Maximum amount of time each script may spend parsing request data. It's a good +; idea to limit this time on productions servers in order to eliminate unexpectedly +; long running scripts. +; Note: This directive is hardcoded to -1 for the CLI SAPI +; Default Value: -1 (Unlimited) +; Development Value: 60 (60 seconds) +; Production Value: 60 (60 seconds) +; http://php.net/max-input-time +max_input_time = 60 + +; Maximum input variable nesting level +; http://php.net/max-input-nesting-level +;max_input_nesting_level = 64 + +; How many GET/POST/COOKIE input variables may be accepted +;max_input_vars = 1000 + +; Maximum amount of memory a script may consume +; http://php.net/memory-limit +memory_limit = 128M + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Error handling and logging ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; This directive informs PHP of which errors, warnings and notices you would like +; it to take action for. The recommended way of setting values for this +; directive is through the use of the error level constants and bitwise +; operators. The error level constants are below here for convenience as well as +; some common settings and their meanings. +; By default, PHP is set to take action on all errors, notices and warnings EXCEPT +; those related to E_NOTICE and E_STRICT, which together cover best practices and +; recommended coding standards in PHP. For performance reasons, this is the +; recommend error reporting setting. Your production server shouldn't be wasting +; resources complaining about best practices and coding standards. That's what +; development servers and development settings are for. +; Note: The php.ini-development file has this setting as E_ALL. This +; means it pretty much reports everything which is exactly what you want during +; development and early testing. +; +; Error Level Constants: +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) +; E_ERROR - fatal run-time errors +; E_RECOVERABLE_ERROR - almost fatal run-time errors +; E_WARNING - run-time warnings (non-fatal errors) +; E_PARSE - compile-time parse errors +; E_NOTICE - run-time notices (these are warnings which often result +; from a bug in your code, but it's possible that it was +; intentional (e.g., using an uninitialized variable and +; relying on the fact it is automatically initialized to an +; empty string) +; E_STRICT - run-time notices, enable to have PHP suggest changes +; to your code which will ensure the best interoperability +; and forward compatibility of your code +; E_CORE_ERROR - fatal errors that occur during PHP's initial startup +; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's +; initial startup +; E_COMPILE_ERROR - fatal compile-time errors +; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) +; E_USER_ERROR - user-generated error message +; E_USER_WARNING - user-generated warning message +; E_USER_NOTICE - user-generated notice message +; E_DEPRECATED - warn about code that will not work in future versions +; of PHP +; E_USER_DEPRECATED - user-generated deprecation warnings +; +; Common Values: +; E_ALL (Show all errors, warnings and notices including coding standards.) +; E_ALL & ~E_NOTICE (Show all errors, except for notices) +; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) +; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) +; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +; Development Value: E_ALL +; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; http://php.net/error-reporting +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT + +; This directive controls whether or not and where PHP will output errors, +; notices and warnings too. Error output is very useful during development, but +; it could be very dangerous in production environments. Depending on the code +; which is triggering the error, sensitive information could potentially leak +; out of your application such as database usernames and passwords or worse. +; For production environments, we recommend logging errors rather than +; sending them to STDOUT. +; Possible Values: +; Off = Do not display any errors +; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) +; On or stdout = Display errors to STDOUT +; Default Value: On +; Development Value: On +; Production Value: Off +; http://php.net/display-errors +display_errors = Off + +; The display of errors which occur during PHP's startup sequence are handled +; separately from display_errors. PHP's default behavior is to suppress those +; errors from clients. Turning the display of startup errors on can be useful in +; debugging configuration problems. We strongly recommend you +; set this to 'off' for production servers. +; Default Value: Off +; Development Value: On +; Production Value: Off +; http://php.net/display-startup-errors +display_startup_errors = Off + +; Besides displaying errors, PHP can also log errors to locations such as a +; server-specific log, STDERR, or a location specified by the error_log +; directive found below. While errors should not be displayed on productions +; servers they should still be monitored and logging is a great way to do that. +; Default Value: Off +; Development Value: On +; Production Value: On +; http://php.net/log-errors +log_errors = On + +; Set maximum length of log_errors. In error_log information about the source is +; added. The default is 1024 and 0 allows to not apply any maximum length at all. +; http://php.net/log-errors-max-len +log_errors_max_len = 1024 + +; Do not log repeated messages. Repeated errors must occur in same file on same +; line unless ignore_repeated_source is set true. +; http://php.net/ignore-repeated-errors +ignore_repeated_errors = Off + +; Ignore source of message when ignoring repeated messages. When this setting +; is On you will not log errors with repeated messages from different files or +; source lines. +; http://php.net/ignore-repeated-source +ignore_repeated_source = Off + +; If this parameter is set to Off, then memory leaks will not be shown (on +; stdout or in the log). This is only effective in a debug compile, and if +; error reporting includes E_WARNING in the allowed list +; http://php.net/report-memleaks +report_memleaks = On + +; This setting is on by default. +;report_zend_debug = 0 + +; Store the last error/warning message in $php_errormsg (boolean). Setting this value +; to On can assist in debugging and is appropriate for development servers. It should +; however be disabled on production servers. +; This directive is DEPRECATED. +; Default Value: Off +; Development Value: Off +; Production Value: Off +; http://php.net/track-errors +;track_errors = Off + +; Turn off normal error reporting and emit XML-RPC error XML +; http://php.net/xmlrpc-errors +;xmlrpc_errors = 0 + +; An XML-RPC faultCode +;xmlrpc_error_number = 0 + +; When PHP displays or logs an error, it has the capability of formatting the +; error message as HTML for easier reading. This directive controls whether +; the error message is formatted as HTML or not. +; Note: This directive is hardcoded to Off for the CLI SAPI +; http://php.net/html-errors +;html_errors = On + +; If html_errors is set to On *and* docref_root is not empty, then PHP +; produces clickable error messages that direct to a page describing the error +; or function causing the error in detail. +; You can download a copy of the PHP manual from http://php.net/docs +; and change docref_root to the base URL of your local copy including the +; leading '/'. You must also specify the file extension being used including +; the dot. PHP's default behavior is to leave these settings empty, in which +; case no links to documentation are generated. +; Note: Never use this feature for production boxes. +; http://php.net/docref-root +; Examples +;docref_root = "/phpmanual/" + +; http://php.net/docref-ext +;docref_ext = .html + +; String to output before an error message. PHP's default behavior is to leave +; this setting blank. +; http://php.net/error-prepend-string +; Example: +;error_prepend_string = "" + +; String to output after an error message. PHP's default behavior is to leave +; this setting blank. +; http://php.net/error-append-string +; Example: +;error_append_string = "" + +; Log errors to specified file. PHP's default behavior is to leave this value +; empty. +; http://php.net/error-log +; Example: +;error_log = php_errors.log +; Log errors to syslog (Event Log on Windows). +;error_log = syslog + +; The syslog ident is a string which is prepended to every message logged +; to syslog. Only used when error_log is set to syslog. +;syslog.ident = php + +; The syslog facility is used to specify what type of program is logging +; the message. Only used when error_log is set to syslog. +;syslog.facility = user + +; Set this to disable filtering control characters (the default). +; Some loggers only accept NVT-ASCII, others accept anything that's not +; control characters. If your logger accepts everything, then no filtering +; is needed at all. +; Allowed values are: +; ascii (all printable ASCII characters and NL) +; no-ctrl (all characters except control characters) +; all (all characters) +; raw (like "all", but messages are not split at newlines) +; http://php.net/syslog.filter +;syslog.filter = ascii + +;windows.show_crt_warning +; Default value: 0 +; Development value: 0 +; Production value: 0 + +;;;;;;;;;;;;;;;;; +; Data Handling ; +;;;;;;;;;;;;;;;;; + +; The separator used in PHP generated URLs to separate arguments. +; PHP's default setting is "&". +; http://php.net/arg-separator.output +; Example: +;arg_separator.output = "&" + +; List of separator(s) used by PHP to parse input URLs into variables. +; PHP's default setting is "&". +; NOTE: Every character in this directive is considered as separator! +; http://php.net/arg-separator.input +; Example: +;arg_separator.input = ";&" + +; This directive determines which super global arrays are registered when PHP +; starts up. G,P,C,E & S are abbreviations for the following respective super +; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty +; paid for the registration of these arrays and because ENV is not as commonly +; used as the others, ENV is not recommended on productions servers. You +; can still get access to the environment variables through getenv() should you +; need to. +; Default Value: "EGPCS" +; Development Value: "GPCS" +; Production Value: "GPCS"; +; http://php.net/variables-order +variables_order = "GPCS" + +; This directive determines which super global data (G,P & C) should be +; registered into the super global array REQUEST. If so, it also determines +; the order in which that data is registered. The values for this directive +; are specified in the same manner as the variables_order directive, +; EXCEPT one. Leaving this value empty will cause PHP to use the value set +; in the variables_order directive. It does not mean it will leave the super +; globals array REQUEST empty. +; Default Value: None +; Development Value: "GP" +; Production Value: "GP" +; http://php.net/request-order +request_order = "GP" + +; This directive determines whether PHP registers $argv & $argc each time it +; runs. $argv contains an array of all the arguments passed to PHP when a script +; is invoked. $argc contains an integer representing the number of arguments +; that were passed when the script was invoked. These arrays are extremely +; useful when running scripts from the command line. When this directive is +; enabled, registering these variables consumes CPU cycles and memory each time +; a script is executed. For performance reasons, this feature should be disabled +; on production servers. +; Note: This directive is hardcoded to On for the CLI SAPI +; Default Value: On +; Development Value: Off +; Production Value: Off +; http://php.net/register-argc-argv +register_argc_argv = Off + +; When enabled, the ENV, REQUEST and SERVER variables are created when they're +; first used (Just In Time) instead of when the script starts. If these +; variables are not used within a script, having this directive on will result +; in a performance gain. The PHP directive register_argc_argv must be disabled +; for this directive to have any effect. +; http://php.net/auto-globals-jit +auto_globals_jit = On + +; Whether PHP will read the POST data. +; This option is enabled by default. +; Most likely, you won't want to disable this option globally. It causes $_POST +; and $_FILES to always be empty; the only way you will be able to read the +; POST data will be through the php://input stream wrapper. This can be useful +; to proxy requests or to process the POST data in a memory efficient fashion. +; http://php.net/enable-post-data-reading +;enable_post_data_reading = Off + +; Maximum size of POST data that PHP will accept. +; Its value may be 0 to disable the limit. It is ignored if POST data reading +; is disabled through enable_post_data_reading. +; http://php.net/post-max-size +post_max_size = 8M + +; Automatically add files before PHP document. +; http://php.net/auto-prepend-file +auto_prepend_file = + +; Automatically add files after PHP document. +; http://php.net/auto-append-file +auto_append_file = + +; By default, PHP will output a media type using the Content-Type header. To +; disable this, simply set it to be empty. +; +; PHP's built-in default media type is set to text/html. +; http://php.net/default-mimetype +default_mimetype = "text/html" + +; PHP's default character set is set to UTF-8. +; http://php.net/default-charset +default_charset = "UTF-8" + +; PHP internal character encoding is set to empty. +; If empty, default_charset is used. +; http://php.net/internal-encoding +;internal_encoding = + +; PHP input character encoding is set to empty. +; If empty, default_charset is used. +; http://php.net/input-encoding +;input_encoding = + +; PHP output character encoding is set to empty. +; If empty, default_charset is used. +; See also output_buffer. +; http://php.net/output-encoding +;output_encoding = + +;;;;;;;;;;;;;;;;;;;;;;;;; +; Paths and Directories ; +;;;;;;;;;;;;;;;;;;;;;;;;; + +; UNIX: "/path1:/path2" +include_path = ".:/usr/share/php7" +; +; Windows: "\path1;\path2" +;include_path = ".;c:\php\includes" +; +; PHP's default setting for include_path is ".;/path/to/php/pear" +; http://php.net/include-path + +; The root of the PHP pages, used only if nonempty. +; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root +; if you are running php as a CGI under any web server (other than IIS) +; see documentation for security issues. The alternate is to use the +; cgi.force_redirect configuration below +; http://php.net/doc-root +doc_root = + +; The directory under which PHP opens the script using /~username used only +; if nonempty. +; http://php.net/user-dir +user_dir = + +; Directory in which the loadable extensions (modules) reside. +; http://php.net/extension-dir +;extension_dir = "./" +; On windows: +;extension_dir = "ext" + +; Directory where the temporary files should be placed. +; Defaults to the system default (see sys_get_temp_dir) +;sys_temp_dir = "/tmp" + +; Whether or not to enable the dl() function. The dl() function does NOT work +; properly in multithreaded servers, such as IIS or Zeus, and is automatically +; disabled on them. +; http://php.net/enable-dl +enable_dl = Off + +; cgi.force_redirect is necessary to provide security running PHP as a CGI under +; most web servers. Left undefined, PHP turns this on by default. You can +; turn it off here AT YOUR OWN RISK +; **You CAN safely turn this off for IIS, in fact, you MUST.** +; http://php.net/cgi.force-redirect +;cgi.force_redirect = 1 + +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. PHP's default behavior is to disable this feature. +;cgi.nph = 1 + +; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape +; (iPlanet) web servers, you MAY need to set an environment variable name that PHP +; will look for to know it is OK to continue execution. Setting this variable MAY +; cause security issues, KNOW WHAT YOU ARE DOING FIRST. +; http://php.net/cgi.redirect-status-env +;cgi.redirect_status_env = + +; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's +; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok +; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting +; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting +; of zero causes PHP to behave as before. Default is 1. You should fix your scripts +; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. +; http://php.net/cgi.fix-pathinfo +;cgi.fix_pathinfo=1 + +; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside +; of the web tree and people will not be able to circumvent .htaccess security. +;cgi.discard_path=1 + +; FastCGI under IIS supports the ability to impersonate +; security tokens of the calling client. This allows IIS to define the +; security context that the request runs under. mod_fastcgi under Apache +; does not currently support this feature (03/17/2002) +; Set to 1 if running under IIS. Default is zero. +; http://php.net/fastcgi.impersonate +;fastcgi.impersonate = 1 + +; Disable logging through FastCGI connection. PHP's default behavior is to enable +; this feature. +;fastcgi.logging = 0 + +; cgi.rfc2616_headers configuration option tells PHP what type of headers to +; use when sending HTTP response code. If set to 0, PHP sends Status: header that +; is supported by Apache. When this option is set to 1, PHP will send +; RFC2616 compliant header. +; Default is zero. +; http://php.net/cgi.rfc2616-headers +;cgi.rfc2616_headers = 0 + +; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #! +; (shebang) at the top of the running script. This line might be needed if the +; script support running both as stand-alone script and via PHP CGI<. PHP in CGI +; mode skips this line and ignores its content if this directive is turned on. +; http://php.net/cgi.check-shebang-line +;cgi.check_shebang_line=1 + +;;;;;;;;;;;;;;;; +; File Uploads ; +;;;;;;;;;;;;;;;; + +; Whether to allow HTTP file uploads. +; http://php.net/file-uploads +file_uploads = On + +; Temporary directory for HTTP uploaded files (will use system default if not +; specified). +; http://php.net/upload-tmp-dir +;upload_tmp_dir = + +; Maximum allowed size for uploaded files. +; http://php.net/upload-max-filesize +upload_max_filesize = 2M + +; Maximum number of files that can be uploaded via a single request +max_file_uploads = 20 + +;;;;;;;;;;;;;;;;;; +; Fopen wrappers ; +;;;;;;;;;;;;;;;;;; + +; Whether to allow the treatment of URLs (like http:// or ftp://) as files. +; http://php.net/allow-url-fopen +allow_url_fopen = On + +; Whether to allow include/require to open URLs (like http:// or ftp://) as files. +; http://php.net/allow-url-include +allow_url_include = Off + +; Define the anonymous ftp password (your email address). PHP's default setting +; for this is empty. +; http://php.net/from +;from="john@doe.com" + +; Define the User-Agent string. PHP's default setting for this is empty. +; http://php.net/user-agent +;user_agent="PHP" + +; Default timeout for socket based streams (seconds) +; http://php.net/default-socket-timeout +default_socket_timeout = 60 + +; If your scripts have to deal with files from Macintosh systems, +; or you are running on a Mac and need to deal with files from +; unix or win32 systems, setting this flag will cause PHP to +; automatically detect the EOL character in those files so that +; fgets() and file() will work regardless of the source of the file. +; http://php.net/auto-detect-line-endings +;auto_detect_line_endings = Off + +;;;;;;;;;;;;;;;;;;;;;; +; Dynamic Extensions ; +;;;;;;;;;;;;;;;;;;;;;; + +; If you wish to have an extension loaded automatically, use the following +; syntax: +; +; extension=modulename +; +; For example: +; +; extension=mysqli +; +; When the extension library to load is not located in the default extension +; directory, You may specify an absolute path to the library file: +; +; extension=/path/to/extension/mysqli.so +; +; Note : The syntax used in previous PHP versions ('extension=.so' and +; 'extension='php_.dll') is supported for legacy reasons and may be +; deprecated in a future PHP major version. So, when it is possible, please +; move to the new ('extension=) syntax. +; +; Notes for Windows environments : +; +; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) +; extension folders as well as the separate PECL DLL download (PHP 5+). +; Be sure to appropriately set the extension_dir directive. +; +;extension=bz2 +;extension=curl +;extension=ffi +;extension=ftp +;extension=fileinfo +;extension=gd2 +;extension=gettext +;extension=gmp +;extension=intl +;extension=imap +;extension=ldap +;extension=mbstring +;extension=exif ; Must be after mbstring as it depends on it +;extension=mysqli +;extension=oci8_12c ; Use with Oracle Database 12c Instant Client +;extension=odbc +;extension=openssl +;extension=pdo_firebird +;extension=pdo_mysql +;extension=pdo_oci +;extension=pdo_odbc +;extension=pdo_pgsql +;extension=pdo_sqlite +;extension=pgsql +;extension=shmop + +; The MIBS data available in the PHP distribution must be installed. +; See http://www.php.net/manual/en/snmp.installation.php +;extension=snmp + +;extension=soap +;extension=sockets +;extension=sodium +;extension=sqlite3 +;extension=tidy +;extension=xmlrpc +;extension=xsl + +;;;;;;;;;;;;;;;;;;; +; Module Settings ; +;;;;;;;;;;;;;;;;;;; + +[CLI Server] +; Whether the CLI web server uses ANSI color coding in its terminal output. +cli_server.color = On + +[Date] +; Defines the default timezone used by the date functions +; http://php.net/date.timezone +;date.timezone = + +; http://php.net/date.default-latitude +;date.default_latitude = 31.7667 + +; http://php.net/date.default-longitude +;date.default_longitude = 35.2333 + +; http://php.net/date.sunrise-zenith +;date.sunrise_zenith = 90.583333 + +; http://php.net/date.sunset-zenith +;date.sunset_zenith = 90.583333 + +[filter] +; http://php.net/filter.default +;filter.default = unsafe_raw + +; http://php.net/filter.default-flags +;filter.default_flags = + +[iconv] +; Use of this INI entry is deprecated, use global input_encoding instead. +; If empty, default_charset or input_encoding or iconv.input_encoding is used. +; The precedence is: default_charset < input_encoding < iconv.input_encoding +;iconv.input_encoding = + +; Use of this INI entry is deprecated, use global internal_encoding instead. +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;iconv.internal_encoding = + +; Use of this INI entry is deprecated, use global output_encoding instead. +; If empty, default_charset or output_encoding or iconv.output_encoding is used. +; The precedence is: default_charset < output_encoding < iconv.output_encoding +; To use an output encoding conversion, iconv's output handler must be set +; otherwise output encoding conversion cannot be performed. +;iconv.output_encoding = + +[imap] +; rsh/ssh logins are disabled by default. Use this INI entry if you want to +; enable them. Note that the IMAP library does not filter mailbox names before +; passing them to rsh/ssh command, thus passing untrusted data to this function +; with rsh/ssh enabled is insecure. +;imap.enable_insecure_rsh=0 + +[intl] +;intl.default_locale = +; This directive allows you to produce PHP errors when some error +; happens within intl functions. The value is the level of the error produced. +; Default is 0, which does not produce any errors. +;intl.error_level = E_WARNING +;intl.use_exceptions = 0 + +[sqlite3] +; Directory pointing to SQLite3 extensions +; http://php.net/sqlite3.extension-dir +;sqlite3.extension_dir = + +; SQLite defensive mode flag (only available from SQLite 3.26+) +; When the defensive flag is enabled, language features that allow ordinary +; SQL to deliberately corrupt the database file are disabled. This forbids +; writing directly to the schema, shadow tables (eg. FTS data tables), or +; the sqlite_dbpage virtual table. +; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html +; (for older SQLite versions, this flag has no use) +;sqlite3.defensive = 1 + +[Pcre] +; PCRE library backtracking limit. +; http://php.net/pcre.backtrack-limit +;pcre.backtrack_limit=100000 + +; PCRE library recursion limit. +; Please note that if you set this value to a high number you may consume all +; the available process stack and eventually crash PHP (due to reaching the +; stack size limit imposed by the Operating System). +; http://php.net/pcre.recursion-limit +;pcre.recursion_limit=100000 + +; Enables or disables JIT compilation of patterns. This requires the PCRE +; library to be compiled with JIT support. +;pcre.jit=1 + +[Pdo] +; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" +; http://php.net/pdo-odbc.connection-pooling +;pdo_odbc.connection_pooling=strict + +;pdo_odbc.db2_instance_name + +[Pdo_mysql] +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +pdo_mysql.default_socket= + +[Phar] +; http://php.net/phar.readonly +;phar.readonly = On + +; http://php.net/phar.require-hash +;phar.require_hash = On + +;phar.cache_list = + +[mail function] +; For Win32 only. +; http://php.net/smtp +SMTP = localhost +; http://php.net/smtp-port +smtp_port = 25 + +; For Win32 only. +; http://php.net/sendmail-from +;sendmail_from = me@example.com + +; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). +; http://php.net/sendmail-path +;sendmail_path = + +; Force the addition of the specified parameters to be passed as extra parameters +; to the sendmail binary. These parameters will always replace the value of +; the 5th parameter to mail(). +;mail.force_extra_parameters = + +; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename +mail.add_x_header = Off + +; The path to a log file that will log all mail() calls. Log entries include +; the full path of the script, line number, To address and headers. +;mail.log = +; Log mail to syslog (Event Log on Windows). +;mail.log = syslog + +[ODBC] +; http://php.net/odbc.default-db +;odbc.default_db = Not yet implemented + +; http://php.net/odbc.default-user +;odbc.default_user = Not yet implemented + +; http://php.net/odbc.default-pw +;odbc.default_pw = Not yet implemented + +; Controls the ODBC cursor model. +; Default: SQL_CURSOR_STATIC (default). +;odbc.default_cursortype + +; Allow or prevent persistent links. +; http://php.net/odbc.allow-persistent +odbc.allow_persistent = On + +; Check that a connection is still valid before reuse. +; http://php.net/odbc.check-persistent +odbc.check_persistent = On + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/odbc.max-persistent +odbc.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +; http://php.net/odbc.max-links +odbc.max_links = -1 + +; Handling of LONG fields. Returns number of bytes to variables. 0 means +; passthru. +; http://php.net/odbc.defaultlrl +odbc.defaultlrl = 4096 + +; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. +; See the documentation on odbc_binmode and odbc_longreadlen for an explanation +; of odbc.defaultlrl and odbc.defaultbinmode +; http://php.net/odbc.defaultbinmode +odbc.defaultbinmode = 1 + +[MySQLi] + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/mysqli.max-persistent +mysqli.max_persistent = -1 + +; Allow accessing, from PHP's perspective, local files with LOAD DATA statements +; http://php.net/mysqli.allow_local_infile +;mysqli.allow_local_infile = On + +; Allow or prevent persistent links. +; http://php.net/mysqli.allow-persistent +mysqli.allow_persistent = On + +; Maximum number of links. -1 means no limit. +; http://php.net/mysqli.max-links +mysqli.max_links = -1 + +; Default port number for mysqli_connect(). If unset, mysqli_connect() will use +; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the +; compile-time value defined MYSQL_PORT (in that order). Win32 will only look +; at MYSQL_PORT. +; http://php.net/mysqli.default-port +mysqli.default_port = 3306 + +; Default socket name for local MySQL connects. If empty, uses the built-in +; MySQL defaults. +; http://php.net/mysqli.default-socket +mysqli.default_socket = + +; Default host for mysqli_connect() (doesn't apply in safe mode). +; http://php.net/mysqli.default-host +mysqli.default_host = + +; Default user for mysqli_connect() (doesn't apply in safe mode). +; http://php.net/mysqli.default-user +mysqli.default_user = + +; Default password for mysqli_connect() (doesn't apply in safe mode). +; Note that this is generally a *bad* idea to store passwords in this file. +; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") +; and reveal this password! And of course, any users with read access to this +; file will be able to reveal the password as well. +; http://php.net/mysqli.default-pw +mysqli.default_pw = + +; Allow or prevent reconnect +mysqli.reconnect = Off + +[mysqlnd] +; Enable / Disable collection of general statistics by mysqlnd which can be +; used to tune and monitor MySQL operations. +mysqlnd.collect_statistics = On + +; Enable / Disable collection of memory usage statistics by mysqlnd which can be +; used to tune and monitor MySQL operations. +mysqlnd.collect_memory_statistics = Off + +; Records communication from all extensions using mysqlnd to the specified log +; file. +; http://php.net/mysqlnd.debug +;mysqlnd.debug = + +; Defines which queries will be logged. +;mysqlnd.log_mask = 0 + +; Default size of the mysqlnd memory pool, which is used by result sets. +;mysqlnd.mempool_default_size = 16000 + +; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. +;mysqlnd.net_cmd_buffer_size = 2048 + +; Size of a pre-allocated buffer used for reading data sent by the server in +; bytes. +;mysqlnd.net_read_buffer_size = 32768 + +; Timeout for network requests in seconds. +;mysqlnd.net_read_timeout = 31536000 + +; SHA-256 Authentication Plugin related. File with the MySQL server public RSA +; key. +;mysqlnd.sha256_server_public_key = + +[OCI8] + +; Connection: Enables privileged connections using external +; credentials (OCI_SYSOPER, OCI_SYSDBA) +; http://php.net/oci8.privileged-connect +;oci8.privileged_connect = Off + +; Connection: The maximum number of persistent OCI8 connections per +; process. Using -1 means no limit. +; http://php.net/oci8.max-persistent +;oci8.max_persistent = -1 + +; Connection: The maximum number of seconds a process is allowed to +; maintain an idle persistent connection. Using -1 means idle +; persistent connections will be maintained forever. +; http://php.net/oci8.persistent-timeout +;oci8.persistent_timeout = -1 + +; Connection: The number of seconds that must pass before issuing a +; ping during oci_pconnect() to check the connection validity. When +; set to 0, each oci_pconnect() will cause a ping. Using -1 disables +; pings completely. +; http://php.net/oci8.ping-interval +;oci8.ping_interval = 60 + +; Connection: Set this to a user chosen connection class to be used +; for all pooled server requests with Oracle 11g Database Resident +; Connection Pooling (DRCP). To use DRCP, this value should be set to +; the same string for all web servers running the same application, +; the database pool must be configured, and the connection string must +; specify to use a pooled server. +;oci8.connection_class = + +; High Availability: Using On lets PHP receive Fast Application +; Notification (FAN) events generated when a database node fails. The +; database must also be configured to post FAN events. +;oci8.events = Off + +; Tuning: This option enables statement caching, and specifies how +; many statements to cache. Using 0 disables statement caching. +; http://php.net/oci8.statement-cache-size +;oci8.statement_cache_size = 20 + +; Tuning: Enables statement prefetching and sets the default number of +; rows that will be fetched automatically after statement execution. +; http://php.net/oci8.default-prefetch +;oci8.default_prefetch = 100 + +; Compatibility. Using On means oci_close() will not close +; oci_connect() and oci_new_connect() connections. +; http://php.net/oci8.old-oci-close-semantics +;oci8.old_oci_close_semantics = Off + +[PostgreSQL] +; Allow or prevent persistent links. +; http://php.net/pgsql.allow-persistent +pgsql.allow_persistent = On + +; Detect broken persistent links always with pg_pconnect(). +; Auto reset feature requires a little overheads. +; http://php.net/pgsql.auto-reset-persistent +pgsql.auto_reset_persistent = Off + +; Maximum number of persistent links. -1 means no limit. +; http://php.net/pgsql.max-persistent +pgsql.max_persistent = -1 + +; Maximum number of links (persistent+non persistent). -1 means no limit. +; http://php.net/pgsql.max-links +pgsql.max_links = -1 + +; Ignore PostgreSQL backends Notice message or not. +; Notice message logging require a little overheads. +; http://php.net/pgsql.ignore-notice +pgsql.ignore_notice = 0 + +; Log PostgreSQL backends Notice message or not. +; Unless pgsql.ignore_notice=0, module cannot log notice message. +; http://php.net/pgsql.log-notice +pgsql.log_notice = 0 + +[bcmath] +; Number of decimal digits for all bcmath functions. +; http://php.net/bcmath.scale +bcmath.scale = 0 + +[browscap] +; http://php.net/browscap +;browscap = extra/browscap.ini + +[Session] +; Handler used to store/retrieve data. +; http://php.net/session.save-handler +session.save_handler = files + +; Argument passed to save_handler. In the case of files, this is the path +; where data files are stored. Note: Windows users have to change this +; variable in order to use PHP's session functions. +; +; The path can be defined as: +; +; session.save_path = "N;/path" +; +; where N is an integer. Instead of storing all the session files in +; /path, what this will do is use subdirectories N-levels deep, and +; store the session data in those directories. This is useful if +; your OS has problems with many files in one directory, and is +; a more efficient layout for servers that handle many sessions. +; +; NOTE 1: PHP will not create this directory structure automatically. +; You can use the script in the ext/session dir for that purpose. +; NOTE 2: See the section on garbage collection below if you choose to +; use subdirectories for session storage +; +; The file storage module creates files using mode 600 by default. +; You can change that by using +; +; session.save_path = "N;MODE;/path" +; +; where MODE is the octal representation of the mode. Note that this +; does not overwrite the process's umask. +; http://php.net/session.save-path +;session.save_path = "/tmp" + +; Whether to use strict session mode. +; Strict session mode does not accept an uninitialized session ID, and +; regenerates the session ID if the browser sends an uninitialized session ID. +; Strict mode protects applications from session fixation via a session adoption +; vulnerability. It is disabled by default for maximum compatibility, but +; enabling it is encouraged. +; https://wiki.php.net/rfc/strict_sessions +session.use_strict_mode = 0 + +; Whether to use cookies. +; http://php.net/session.use-cookies +session.use_cookies = 1 + +; http://php.net/session.cookie-secure +;session.cookie_secure = + +; This option forces PHP to fetch and use a cookie for storing and maintaining +; the session id. We encourage this operation as it's very helpful in combating +; session hijacking when not specifying and managing your own session id. It is +; not the be-all and end-all of session hijacking defense, but it's a good start. +; http://php.net/session.use-only-cookies +session.use_only_cookies = 1 + +; Name of the session (used as cookie name). +; http://php.net/session.name +session.name = PHPSESSID + +; Initialize session on request startup. +; http://php.net/session.auto-start +session.auto_start = 0 + +; Lifetime in seconds of cookie or, if 0, until browser is restarted. +; http://php.net/session.cookie-lifetime +session.cookie_lifetime = 0 + +; The path for which the cookie is valid. +; http://php.net/session.cookie-path +session.cookie_path = / + +; The domain for which the cookie is valid. +; http://php.net/session.cookie-domain +session.cookie_domain = + +; Whether or not to add the httpOnly flag to the cookie, which makes it +; inaccessible to browser scripting languages such as JavaScript. +; http://php.net/session.cookie-httponly +session.cookie_httponly = + +; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF) +; Current valid values are "Strict", "Lax" or "None". When using "None", +; make sure to include the quotes, as `none` is interpreted like `false` in ini files. +; https://tools.ietf.org/html/draft-west-first-party-cookies-07 +session.cookie_samesite = + +; Handler used to serialize data. php is the standard serializer of PHP. +; http://php.net/session.serialize-handler +session.serialize_handler = php + +; Defines the probability that the 'garbage collection' process is started on every +; session initialization. The probability is calculated by using gc_probability/gc_divisor, +; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. +; Default Value: 1 +; Development Value: 1 +; Production Value: 1 +; http://php.net/session.gc-probability +session.gc_probability = 1 + +; Defines the probability that the 'garbage collection' process is started on every +; session initialization. The probability is calculated by using gc_probability/gc_divisor, +; e.g. 1/100 means there is a 1% chance that the GC process starts on each request. +; For high volume production servers, using a value of 1000 is a more efficient approach. +; Default Value: 100 +; Development Value: 1000 +; Production Value: 1000 +; http://php.net/session.gc-divisor +session.gc_divisor = 1000 + +; After this number of seconds, stored data will be seen as 'garbage' and +; cleaned up by the garbage collection process. +; http://php.net/session.gc-maxlifetime +session.gc_maxlifetime = 1440 + +; NOTE: If you are using the subdirectory option for storing session files +; (see session.save_path above), then garbage collection does *not* +; happen automatically. You will need to do your own garbage +; collection through a shell script, cron entry, or some other method. +; For example, the following script is the equivalent of setting +; session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): +; find /path/to/sessions -cmin +24 -type f | xargs rm + +; Check HTTP Referer to invalidate externally stored URLs containing ids. +; HTTP_REFERER has to contain this substring for the session to be +; considered as valid. +; http://php.net/session.referer-check +session.referer_check = + +; Set to {nocache,private,public,} to determine HTTP caching aspects +; or leave this empty to avoid sending anti-caching headers. +; http://php.net/session.cache-limiter +session.cache_limiter = nocache + +; Document expires after n minutes. +; http://php.net/session.cache-expire +session.cache_expire = 180 + +; trans sid support is disabled by default. +; Use of trans sid may risk your users' security. +; Use this option with caution. +; - User may send URL contains active session ID +; to other person via. email/irc/etc. +; - URL that contains active session ID may be stored +; in publicly accessible computer. +; - User may access your site with the same session ID +; always using URL stored in browser's history or bookmarks. +; http://php.net/session.use-trans-sid +session.use_trans_sid = 0 + +; Set session ID character length. This value could be between 22 to 256. +; Shorter length than default is supported only for compatibility reason. +; Users should use 32 or more chars. +; http://php.net/session.sid-length +; Default Value: 32 +; Development Value: 26 +; Production Value: 26 +session.sid_length = 26 + +; The URL rewriter will look for URLs in a defined set of HTML tags. +;
is special; if you include them here, the rewriter will +; add a hidden field with the info which is otherwise appended +; to URLs. tag's action attribute URL will not be modified +; unless it is specified. +; Note that all valid entries require a "=", even if no value follows. +; Default Value: "a=href,area=href,frame=src,form=" +; Development Value: "a=href,area=href,frame=src,form=" +; Production Value: "a=href,area=href,frame=src,form=" +; http://php.net/url-rewriter.tags +session.trans_sid_tags = "a=href,area=href,frame=src,form=" + +; URL rewriter does not rewrite absolute URLs by default. +; To enable rewrites for absolute paths, target hosts must be specified +; at RUNTIME. i.e. use ini_set() +; tags is special. PHP will check action attribute's URL regardless +; of session.trans_sid_tags setting. +; If no host is defined, HTTP_HOST will be used for allowed host. +; Example value: php.net,www.php.net,wiki.php.net +; Use "," for multiple hosts. No spaces are allowed. +; Default Value: "" +; Development Value: "" +; Production Value: "" +;session.trans_sid_hosts="" + +; Define how many bits are stored in each character when converting +; the binary hash data to something readable. +; Possible values: +; 4 (4 bits: 0-9, a-f) +; 5 (5 bits: 0-9, a-v) +; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") +; Default Value: 4 +; Development Value: 5 +; Production Value: 5 +; http://php.net/session.hash-bits-per-character +session.sid_bits_per_character = 5 + +; Enable upload progress tracking in $_SESSION +; Default Value: On +; Development Value: On +; Production Value: On +; http://php.net/session.upload-progress.enabled +;session.upload_progress.enabled = On + +; Cleanup the progress information as soon as all POST data has been read +; (i.e. upload completed). +; Default Value: On +; Development Value: On +; Production Value: On +; http://php.net/session.upload-progress.cleanup +;session.upload_progress.cleanup = On + +; A prefix used for the upload progress key in $_SESSION +; Default Value: "upload_progress_" +; Development Value: "upload_progress_" +; Production Value: "upload_progress_" +; http://php.net/session.upload-progress.prefix +;session.upload_progress.prefix = "upload_progress_" + +; The index name (concatenated with the prefix) in $_SESSION +; containing the upload progress information +; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" +; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" +; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" +; http://php.net/session.upload-progress.name +;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" + +; How frequently the upload progress should be updated. +; Given either in percentages (per-file), or in bytes +; Default Value: "1%" +; Development Value: "1%" +; Production Value: "1%" +; http://php.net/session.upload-progress.freq +;session.upload_progress.freq = "1%" + +; The minimum delay between updates, in seconds +; Default Value: 1 +; Development Value: 1 +; Production Value: 1 +; http://php.net/session.upload-progress.min-freq +;session.upload_progress.min_freq = "1" + +; Only write session data when session data is changed. Enabled by default. +; http://php.net/session.lazy-write +;session.lazy_write = On + +[Assertion] +; Switch whether to compile assertions at all (to have no overhead at run-time) +; -1: Do not compile at all +; 0: Jump over assertion at run-time +; 1: Execute assertions +; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) +; Default Value: 1 +; Development Value: 1 +; Production Value: -1 +; http://php.net/zend.assertions +zend.assertions = -1 + +; Assert(expr); active by default. +; http://php.net/assert.active +;assert.active = On + +; Throw an AssertionError on failed assertions +; http://php.net/assert.exception +;assert.exception = On + +; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) +; http://php.net/assert.warning +;assert.warning = On + +; Don't bail out by default. +; http://php.net/assert.bail +;assert.bail = Off + +; User-function to be called if an assertion fails. +; http://php.net/assert.callback +;assert.callback = 0 + +; Eval the expression with current error_reporting(). Set to true if you want +; error_reporting(0) around the eval(). +; http://php.net/assert.quiet-eval +;assert.quiet_eval = 0 + +[COM] +; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs +; http://php.net/com.typelib-file +;com.typelib_file = + +; allow Distributed-COM calls +; http://php.net/com.allow-dcom +;com.allow_dcom = true + +; autoregister constants of a component's typlib on com_load() +; http://php.net/com.autoregister-typelib +;com.autoregister_typelib = true + +; register constants casesensitive +; http://php.net/com.autoregister-casesensitive +;com.autoregister_casesensitive = false + +; show warnings on duplicate constant registrations +; http://php.net/com.autoregister-verbose +;com.autoregister_verbose = true + +; The default character set code-page to use when passing strings to and from COM objects. +; Default: system ANSI code page +;com.code_page= + +[mbstring] +; language for internal character representation. +; This affects mb_send_mail() and mbstring.detect_order. +; http://php.net/mbstring.language +;mbstring.language = Japanese + +; Use of this INI entry is deprecated, use global internal_encoding instead. +; internal/script encoding. +; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) +; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. +; The precedence is: default_charset < internal_encoding < iconv.internal_encoding +;mbstring.internal_encoding = + +; Use of this INI entry is deprecated, use global input_encoding instead. +; http input encoding. +; mbstring.encoding_translation = On is needed to use this setting. +; If empty, default_charset or input_encoding or mbstring.input is used. +; The precedence is: default_charset < input_encoding < mbstring.http_input +; http://php.net/mbstring.http-input +;mbstring.http_input = + +; Use of this INI entry is deprecated, use global output_encoding instead. +; http output encoding. +; mb_output_handler must be registered as output buffer to function. +; If empty, default_charset or output_encoding or mbstring.http_output is used. +; The precedence is: default_charset < output_encoding < mbstring.http_output +; To use an output encoding conversion, mbstring's output handler must be set +; otherwise output encoding conversion cannot be performed. +; http://php.net/mbstring.http-output +;mbstring.http_output = + +; enable automatic encoding translation according to +; mbstring.internal_encoding setting. Input chars are +; converted to internal encoding by setting this to On. +; Note: Do _not_ use automatic encoding translation for +; portable libs/applications. +; http://php.net/mbstring.encoding-translation +;mbstring.encoding_translation = Off + +; automatic encoding detection order. +; "auto" detect order is changed according to mbstring.language +; http://php.net/mbstring.detect-order +;mbstring.detect_order = auto + +; substitute_character used when character cannot be converted +; one from another +; http://php.net/mbstring.substitute-character +;mbstring.substitute_character = none + +; overload(replace) single byte functions by mbstring functions. +; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), +; etc. Possible values are 0,1,2,4 or combination of them. +; For example, 7 for overload everything. +; 0: No overload +; 1: Overload mail() function +; 2: Overload str*() functions +; 4: Overload ereg*() functions +; http://php.net/mbstring.func-overload +;mbstring.func_overload = 0 + +; enable strict encoding detection. +; Default: Off +;mbstring.strict_detection = On + +; This directive specifies the regex pattern of content types for which mb_output_handler() +; is activated. +; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) +;mbstring.http_output_conv_mimetype= + +; This directive specifies maximum stack depth for mbstring regular expressions. It is similar +; to the pcre.recursion_limit for PCRE. +; Default: 100000 +;mbstring.regex_stack_limit=100000 + +; This directive specifies maximum retry count for mbstring regular expressions. It is similar +; to the pcre.backtrack_limit for PCRE. +; Default: 1000000 +;mbstring.regex_retry_limit=1000000 + +[gd] +; Tell the jpeg decode to ignore warnings and try to create +; a gd image. The warning will then be displayed as notices +; disabled by default +; http://php.net/gd.jpeg-ignore-warning +;gd.jpeg_ignore_warning = 1 + +[exif] +; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. +; With mbstring support this will automatically be converted into the encoding +; given by corresponding encode setting. When empty mbstring.internal_encoding +; is used. For the decode settings you can distinguish between motorola and +; intel byte order. A decode setting cannot be empty. +; http://php.net/exif.encode-unicode +;exif.encode_unicode = ISO-8859-15 + +; http://php.net/exif.decode-unicode-motorola +;exif.decode_unicode_motorola = UCS-2BE + +; http://php.net/exif.decode-unicode-intel +;exif.decode_unicode_intel = UCS-2LE + +; http://php.net/exif.encode-jis +;exif.encode_jis = + +; http://php.net/exif.decode-jis-motorola +;exif.decode_jis_motorola = JIS + +; http://php.net/exif.decode-jis-intel +;exif.decode_jis_intel = JIS + +[Tidy] +; The path to a default tidy configuration file to use when using tidy +; http://php.net/tidy.default-config +;tidy.default_config = /usr/local/lib/php/default.tcfg + +; Should tidy clean and repair output automatically? +; WARNING: Do not use this option if you are generating non-html content +; such as dynamic images +; http://php.net/tidy.clean-output +tidy.clean_output = Off + +[soap] +; Enables or disables WSDL caching feature. +; http://php.net/soap.wsdl-cache-enabled +soap.wsdl_cache_enabled=1 + +; Sets the directory name where SOAP extension will put cache files. +; http://php.net/soap.wsdl-cache-dir +soap.wsdl_cache_dir="/tmp" + +; (time to live) Sets the number of second while cached file will be used +; instead of original one. +; http://php.net/soap.wsdl-cache-ttl +soap.wsdl_cache_ttl=86400 + +; Sets the size of the cache limit. (Max. number of WSDL files to cache) +soap.wsdl_cache_limit = 5 + +[sysvshm] +; A default size of the shared memory segment +;sysvshm.init_mem = 10000 + +[ldap] +; Sets the maximum number of open links or -1 for unlimited. +ldap.max_links = -1 + +[dba] +;dba.default_handler= + +[opcache] +; Determines if Zend OPCache is enabled +;opcache.enable=1 + +; Determines if Zend OPCache is enabled for the CLI version of PHP +;opcache.enable_cli=0 + +; The OPcache shared memory storage size. +;opcache.memory_consumption=128 + +; The amount of memory for interned strings in Mbytes. +;opcache.interned_strings_buffer=8 + +; The maximum number of keys (scripts) in the OPcache hash table. +; Only numbers between 200 and 1000000 are allowed. +;opcache.max_accelerated_files=10000 + +; The maximum percentage of "wasted" memory until a restart is scheduled. +;opcache.max_wasted_percentage=5 + +; When this directive is enabled, the OPcache appends the current working +; directory to the script key, thus eliminating possible collisions between +; files with the same name (basename). Disabling the directive improves +; performance, but may break existing applications. +;opcache.use_cwd=1 + +; When disabled, you must reset the OPcache manually or restart the +; webserver for changes to the filesystem to take effect. +;opcache.validate_timestamps=1 + +; How often (in seconds) to check file timestamps for changes to the shared +; memory storage allocation. ("1" means validate once per second, but only +; once per request. "0" means always validate) +;opcache.revalidate_freq=2 + +; Enables or disables file search in include_path optimization +;opcache.revalidate_path=0 + +; If disabled, all PHPDoc comments are dropped from the code to reduce the +; size of the optimized code. +;opcache.save_comments=1 + +; Allow file existence override (file_exists, etc.) performance feature. +;opcache.enable_file_override=0 + +; A bitmask, where each bit enables or disables the appropriate OPcache +; passes +;opcache.optimization_level=0x7FFFBFFF + +;opcache.dups_fix=0 + +; The location of the OPcache blacklist file (wildcards allowed). +; Each OPcache blacklist file is a text file that holds the names of files +; that should not be accelerated. The file format is to add each filename +; to a new line. The filename may be a full path or just a file prefix +; (i.e., /var/www/x blacklists all the files and directories in /var/www +; that start with 'x'). Line starting with a ; are ignored (comments). +;opcache.blacklist_filename= + +; Allows exclusion of large files from being cached. By default all files +; are cached. +;opcache.max_file_size=0 + +; Check the cache checksum each N requests. +; The default value of "0" means that the checks are disabled. +;opcache.consistency_checks=0 + +; How long to wait (in seconds) for a scheduled restart to begin if the cache +; is not being accessed. +;opcache.force_restart_timeout=180 + +; OPcache error_log file name. Empty string assumes "stderr". +;opcache.error_log= + +; All OPcache errors go to the Web server log. +; By default, only fatal errors (level 0) or errors (level 1) are logged. +; You can also enable warnings (level 2), info messages (level 3) or +; debug messages (level 4). +;opcache.log_verbosity_level=1 + +; Preferred Shared Memory back-end. Leave empty and let the system decide. +;opcache.preferred_memory_model= + +; Protect the shared memory from unexpected writing during script execution. +; Useful for internal debugging only. +;opcache.protect_memory=0 + +; Allows calling OPcache API functions only from PHP scripts which path is +; started from specified string. The default "" means no restriction +;opcache.restrict_api= + +; Mapping base of shared memory segments (for Windows only). All the PHP +; processes have to map shared memory into the same address space. This +; directive allows to manually fix the "Unable to reattach to base address" +; errors. +;opcache.mmap_base= + +; Facilitates multiple OPcache instances per user (for Windows only). All PHP +; processes with the same cache ID and user share an OPcache instance. +;opcache.cache_id= + +; Enables and sets the second level cache directory. +; It should improve performance when SHM memory is full, at server restart or +; SHM reset. The default "" disables file based caching. +;opcache.file_cache= + +; Enables or disables opcode caching in shared memory. +;opcache.file_cache_only=0 + +; Enables or disables checksum validation when script loaded from file cache. +;opcache.file_cache_consistency_checks=1 + +; Implies opcache.file_cache_only=1 for a certain process that failed to +; reattach to the shared memory (for Windows only). Explicitly enabled file +; cache is required. +;opcache.file_cache_fallback=1 + +; Enables or disables copying of PHP code (text segment) into HUGE PAGES. +; This should improve performance, but requires appropriate OS configuration. +;opcache.huge_code_pages=1 + +; Validate cached file permissions. +;opcache.validate_permission=0 + +; Prevent name collisions in chroot'ed environment. +;opcache.validate_root=0 + +; If specified, it produces opcode dumps for debugging different stages of +; optimizations. +;opcache.opt_debug_level=0 + +; Specifies a PHP script that is going to be compiled and executed at server +; start-up. +; http://php.net/opcache.preload +;opcache.preload= + +; Preloading code as root is not allowed for security reasons. This directive +; facilitates to let the preloading to be run as another user. +; http://php.net/opcache.preload_user +;opcache.preload_user= + +; Prevents caching files that are less than this number of seconds old. It +; protects from caching of incompletely updated files. In case all file updates +; on your site are atomic, you may increase performance by setting it to "0". +;opcache.file_update_protection=2 + +; Absolute path used to store shared lockfiles (for *nix only). +;opcache.lockfile_path=/tmp + +[curl] +; A default value for the CURLOPT_CAINFO option. This is required to be an +; absolute path. +;curl.cainfo = + +[openssl] +; The location of a Certificate Authority (CA) file on the local filesystem +; to use when verifying the identity of SSL/TLS peers. Most users should +; not specify a value for this directive as PHP will attempt to use the +; OS-managed cert stores in its absence. If specified, this value may still +; be overridden on a per-stream basis via the "cafile" SSL stream context +; option. +;openssl.cafile= + +; If openssl.cafile is not specified or if the CA file is not found, the +; directory pointed to by openssl.capath is searched for a suitable +; certificate. This value must be a correctly hashed certificate directory. +; Most users should not specify a value for this directive as PHP will +; attempt to use the OS-managed cert stores in its absence. If specified, +; this value may still be overridden on a per-stream basis via the "capath" +; SSL stream context option. +;openssl.capath= + +[ffi] +; FFI API restriction. Possible values: +; "preload" - enabled in CLI scripts and preloaded files (default) +; "false" - always disabled +; "true" - always enabled +;ffi.enable=preload + +; List of headers files to preload, wildcard patterns allowed. +;ffi.preload= diff --git a/.github/linters/phpcs.xml b/.github/linters/phpcs.xml new file mode 100644 index 0000000..27cefdd --- /dev/null +++ b/.github/linters/phpcs.xml @@ -0,0 +1,6 @@ + + + + The default coding standard for usage with Super-Linter. It just includes PSR12. + + diff --git a/.github/linters/phpstan.neon b/.github/linters/phpstan.neon new file mode 100644 index 0000000..a2b3ad8 --- /dev/null +++ b/.github/linters/phpstan.neon @@ -0,0 +1,2 @@ +parameters: + level: 5 diff --git a/.github/linters/psalm.xml b/.github/linters/psalm.xml new file mode 100644 index 0000000..0eb2e12 --- /dev/null +++ b/.github/linters/psalm.xml @@ -0,0 +1,4 @@ + + + + diff --git a/.github/linters/terrascan.toml b/.github/linters/terrascan.toml new file mode 100644 index 0000000..af4be02 --- /dev/null +++ b/.github/linters/terrascan.toml @@ -0,0 +1,12 @@ +# terrascan configuration file https://github.com/accurics/terrascan/blob/master/config/terrascan.toml + +# scan and skip rules configuration +[rules] + # scan rules (list of rules to scan, adding rules here will override rules in the policy path) + # scan-rules = [ + # "AWS.S3Bucket.DS.High.1043", + # "AWS.S3Bucket.IAM.High.0370" + # ] + + # skip rules (list of rules to skip) + skip-rules = [] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..32780ae --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,49 @@ +# Pull Request Summary + +**Overview:** + +Briefly describe the purpose and scope of this pull request. + +**Changes:** + +List the main changes introduced by this pull request. + +**Related Issues:** + +Specify any related issues or tasks that this pull request addresses. Use GitHub +issue references (e.g., #123) if applicable. + +## Testing + +Describe the testing strategy employed for these changes. Include details on any +new tests added or existing tests modified. + +## Documentation Updates + +Outline any updates made to project documentation, including README files, API +documentation, or inline code comments. + +## Reviewer Checklist + +- [ ] Reviewed code changes for correctness and adherence to coding standards. +- [ ] Verified that the changes solve the stated problem or implement the + intended feature. +- [ ] Confirmed that the code is well-tested and adequately covered by tests. +- [ ] Checked for any potential performance or scalability concerns introduced + by these changes. +- [ ] Ensured that the documentation is clear, accurate, and up-to-date. + +## Deployment Considerations + +If applicable, discuss any deployment considerations or instructions for +deploying these changes to production or staging environments. + +## Additional Context + +Provide any additional context, background information, or alternative +approaches considered during the development of this pull request. + +## Screenshots (if applicable) + +Include screenshots or GIFs demonstrating the visual changes introduced by this +pull request. diff --git a/.github/review-process_template.md b/.github/review-process_template.md new file mode 100644 index 0000000..021364c --- /dev/null +++ b/.github/review-process_template.md @@ -0,0 +1,56 @@ +# Review Process + +**NOTE:** The Review Process document is currently under development. It will be +available soon. Please check back for updates. + +## Author self-review + +- [ ] The changes in this PR meet the user experience and goals outlined in the + content design plan. +- [ ] The changes in this PR adhere to our + [style guide](https://docs.github.com/en/contributing/style-guide-and-content-model/style-guide), + [content model](https://docs.github.com/en/contributing/writing-for-github-docs/content-model), + and + "[Writing content to be translated](https://docs.github.com/en/contributing/writing-for-github-docs/writing-content-to-be-translated)." +- [ ] Compare this PR's source changes to the preview deployment and review for + versioning issues, redirects, rendering problems, typos, and wonky + screenshots. +- [ ] All screenshots in this PR adhere to the guidance in + "[Creating screenshots](https://docs.github.com/en/contributing/writing-for-github-docs/creating-screenshots)." +- [ ] All checks are passing. +- [ ] For REST API content, verify that endpoints, parameters, and responses are + correct and work as expected and provided curl samples below. + +## Review request + +### Summary + +Help reviewers understand this project and its context by writing a paragraph +summarizing its goals and intended user experience and explaining how the PR +meets those goals. [Content design plan](LINK HERE) + +### Docs Content review + +Give Docs Content any extra context, highlight areas for them to consider in +their review, and ask them questions you need answered to ship the PR. + +### Technical review + +Ping in technical reviewers, asking them to review whether content is +technically accurate and right for the audience. Highlight areas for them to +consider in their review and ask them questions you need answered to ship the +PR. + +### Content changes + +[PR on staging](LINK HERE) + +Give a high-level overview of the changes in your PR and how they support the +overall goals of the PR. Share links to important articles or changes in source +and on staging. If your PR is large or complex, use a table to highlight changes +with high user impact. + +### Notes + +Discuss test failures, versioning issues, or anything else reviewers should know +to consider the overall user experience of the PR. diff --git a/.github/super-linter.env b/.github/super-linter.env new file mode 100644 index 0000000..5c21920 --- /dev/null +++ b/.github/super-linter.env @@ -0,0 +1,111 @@ +# Git branch +DEFAULT_BRANCH=main + +# Loging +# LOG_LEVEL=INFO +# LOG_LEVEL=NOTICE +# LOG_LEVEL=ERROR +# LOG_LEVEL=DEBUG + +# Algotithm +USE_FIND_ALGORITHM=false + +# Configures options +BASH_SEVERITY=warning + +# Enable/Disable Linter +# VALIDATE_ALL_CODEBASE=false +VALIDATE_ANSIBLE=true +VALIDATE_ARM=true +VALIDATE_BASH=true +VALIDATE_BASH_EXEC=true +VALIDATE_CHECKOV=true +VALIDATE_CLANG_FORMAT=true +VALIDATE_CLOJURE=true +VALIDATE_CLOUDFORMATION=true +VALIDATE_COFFEESCRIPT=true +VALIDATE_CPP=true +VALIDATE_CSHARP=true +VALIDATE_CSS=true +# VALIDATE_CSS_PRETTIER=false +VALIDATE_DART=true +VALIDATE_DOCKERFILE_HADOLINT=true +VALIDATE_DOTNET_SLN_FORMAT_ANALYZERS=true +VALIDATE_DOTNET_SLN_FORMAT_STYLE=true +VALIDATE_DOTNET_SLN_FORMAT_WHITESPACE=true +VALIDATE_EDITORCONFIG=true +VALIDATE_ENV=true +VALIDATE_GHERKIN=true +VALIDATE_GITHUB_ACTIONS=true +VALIDATE_GITLEAKS=true +VALIDATE_GO=true +VALIDATE_GOOGLE_JAVA_FORMAT=true +VALIDATE_GO_MODULES=true +VALIDATE_GO_RELEASER=true +# VALIDATE_GRAPHQL_PRETTIER=false +VALIDATE_GROOVY=true +VALIDATE_HTML=true +# VALIDATE_HTML_PRETTIER=false +VALIDATE_JAVA=true +VALIDATE_JAVASCRIPT_ES=true +# VALIDATE_JAVASCRIPT_PRETTIER=false +VALIDATE_JAVASCRIPT_STANDARD=true +# VALIDATE_JSCPD=false +VALIDATE_JSON=true +# VALIDATE_JSON_PRETTIER=false +VALIDATE_JSONC=true +# VALIDATE_JSONC_PRETTIER=false +VALIDATE_JSX=true +# VALIDATE_JSX_PRETTIER=false +VALIDATE_KOTLIN=true +VALIDATE_KUBERNETES_KUBECONFORM=true +VALIDATE_LATEX=true +VALIDATE_LUA=true +VALIDATE_MARKDOWN=true +# VALIDATE_MARKDOWN_PRETTIER=false +VALIDATE_NATURAL_LANGUAGE=true +VALIDATE_OPENAPI=true +VALIDATE_PERL=true +VALIDATE_PHP=true +VALIDATE_PHP_BUILTIN=true +VALIDATE_PHP_PHPCS=true +VALIDATE_PHP_PHPSTAN=true +VALIDATE_PHP_PSALM=true +# VALIDATE_POWERSHELL=false +VALIDATE_PROTOBUF=true +VALIDATE_PYTHON=true +VALIDATE_PYTHON_BLACK=true +VALIDATE_PYTHON_FLAKE8=true +VALIDATE_PYTHON_ISORT=true +VALIDATE_PYTHON_MYPY=true +VALIDATE_PYTHON_PYINK=true +VALIDATE_PYTHON_PYLINT=true +VALIDATE_PYTHON_RUFF=true +VALIDATE_R=true +VALIDATE_RAKU=true +VALIDATE_RENOVATE=true +VALIDATE_RUBY=true +VALIDATE_RUST_2015=true +VALIDATE_RUST_2018=true +VALIDATE_RUST_2021=true +VALIDATE_RUST_CLIPPY=true +VALIDATE_SCALAFMT=true +# VALIDATE_SHELL_SHFMT=false +VALIDATE_SNAKEMAKE_LINT=true +VALIDATE_SNAKEMAKE_SNAKEFMT=true +VALIDATE_SQL=true +VALIDATE_SQLFLUFF=true +VALIDATE_STATES=true +VALIDATE_TEKTON=true +VALIDATE_TERRAFORM_FMT=true +VALIDATE_TERRAFORM_TERRASCAN=true +VALIDATE_TERRAFORM_TFLINT=true +VALIDATE_TERRAGRUNT=true +VALIDATE_TSX=true +VALIDATE_TYPESCRIPT_ES=true +# VALIDATE_TYPESCRIPT_PRETTIER=false +VALIDATE_TYPESCRIPT_STANDARD=true +# VALIDATE_VUE_PRETTIER=false +VALIDATE_XML=true +VALIDATE_YAML=true +# VALIDATE_YAML_PRETTIER=false diff --git a/.github/workflows/automerge_dependabot_prs.yml b/.github/workflows/automerge_dependabot_prs.yml new file mode 100644 index 0000000..d18950e --- /dev/null +++ b/.github/workflows/automerge_dependabot_prs.yml @@ -0,0 +1,28 @@ +--- +name: Automerge Dependabot PRs + +on: pull_request + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + if: + ${{ steps.metadata.outputs.update-type == + 'version-update:semver-minor' || steps.metadata.outputs.update-type == + 'version-update:semver-patch' }} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..34750c3 --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,51 @@ +--- +name: Super-Linter + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: read-all + +jobs: + build: + name: Super-Linter + runs-on: ubuntu-latest + permissions: + contents: read + packages: read + statuses: write + steps: + - name: Checkout code + uses: actions/checkout@v4.1.7 + with: + fetch-depth: false + fetch-tags: false + - name: Super-linter + uses: super-linter/super-linter@v7.1.0 + env: + BASH_SEVERITY: warning + VALIDATE_CSS_PRETTIER: false + VALIDATE_GRAPHQL_PRETTIER: false + VALIDATE_HTML_PRETTIER: false + VALIDATE_JAVASCRIPT_PRETTIER: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_JSONC_PRETTIER: false + VALIDATE_JSX_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_POWERSHELL: false + VALIDATE_SHELL_SHFMT: false + VALIDATE_TYPESCRIPT_PRETTIER: false + VALIDATE_VUE_PRETTIER: false + VALIDATE_YAML_PRETTIER: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..973f0f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Folders + +# Files + +# Temporary Files and Folders +temp* +TEMP* diff --git a/.nano/Dockerfile.nanorc b/.nano/Dockerfile.nanorc new file mode 100644 index 0000000..80e56df --- /dev/null +++ b/.nano/Dockerfile.nanorc @@ -0,0 +1,26 @@ +## Syntax highlighting for Dockerfiles +syntax "Dockerfile" "Dockerfile[^/]*$" + +## Keywords +icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]" + +## Brackets & parenthesis +color brightgreen "(\(|\)|\[|\])" + +## Double ampersand +color brightmagenta "&&" + +## Comments +icolor cyan "^[[:space:]]*#.*$" + +## Blank space at EOL +color ,green "[[:space:]]+$" + +## Strings, single-quoted +color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" + +## Strings, double-quoted +color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" + +## Single and double quotes +color brightyellow "('|\")" diff --git a/.nano/bash.nanorc b/.nano/bash.nanorc new file mode 100644 index 0000000..fd61211 --- /dev/null +++ b/.nano/bash.nanorc @@ -0,0 +1,30 @@ +# Bash only syntax highlighting +syntax "bash" "\.bash$" "\.bash_(profile|aliases|functions|login|logout)$" "(\.|/)profile$" +header "^#!.*/(ba|k|pdk)?sh[-0-9_]*" + +## Control +color magenta "\<(if|else|for|function|case|esac|in|select|until|while|do|elif|then|set|\.|done|fi)\>" + +## Brackets and redirects +color yellow "[(){}[;|<>]" +color yellow "\]" + +## Builtins +color red "\<(source|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|suspend|test|times|trap|type|ulimit|umask|unalias|wait)\>" + +## Unix Commands +color red "\<(arch|awk|bash|bunzip2|bzcat|bzcmp|bzdiff|bzegrep|bzfgrep|bzgrep|bzip2|bzip2recover|bzless|bzmore|cat|chattr|chgrp|chmod|chown|chvt|cp|date|dd|deallocvt|df|dir|dircolors|dmesg|dnsdomainname|domainname|du|dumpkeys|echo|ed|egrep|false|fgconsole|fgrep|fuser|gawk|getkeycodes|gocr|grep|groups|gunzip|gzexe|gzip|hostname|igawk|install|kbd_mode|kbdrate|killall|last|lastb|link|ln|loadkeys|loadunimap|login|ls|lsattr|lsmod|lsmod.old|mapscrn|mesg|mkdir|mkfifo|mknod|mktemp|more|mount|mv|nano|netstat|nisdomainname|openvt|pgawk|pidof|ping|ps|pstree|pwd|rbash|readlink|red|resizecons|rm|rmdir|run-parts|sash|sed|setfont|setkeycodes|setleds|setmetamode|setserial|sh|showkey|shred|sleep|ssed|stat|stty|su|sync|tar|tempfile|touch|true|umount|uname|unicode_start|unicode_stop|unlink|utmpdump|uuidgen|vdir|wall|wc|ypdomainname|zcat|zcmp|zdiff|zegrep|zfgrep|zforce|zgrep|zless|zmore|znew|zsh)\>" + +## More Unix Commands +color red "\<(aclocal|aconnect|aplay|apm|apmsleep|apropos|ar|arecord|as|as86|autoconf|autoheader|automake|awk|basename|bc|bison|c\+\+|cal|cat|cc|cdda2wav|cdparanoia|cdrdao|cd-read|cdrecord|chfn|chgrp|chmod|chown|chroot|chsh|clear|cmp|co|col|comm|cp|cpio|cpp|cut|dc|dd|df|diff|diff3|dir|dircolors|directomatic|dirname|du|env|expr|fbset|file|find|flex|flex\+\+|fmt|free|ftp|funzip|fuser|g\+\+|gawk|gc|gcc|gdb|getent|getopt|gettext|gettextize|gimp|gimp-remote|gimptool|gmake|gs|head|hexdump|id|install|join|kill|killall|ld|ld86|ldd|less|lex|ln|locate|lockfile|logname|lp|lpr|ls|lynx|m4|make|man|mkdir|mknod|msgfmt|mv|namei|nasm|nawk|nc|nice|nl|nm|nm86|nmap|nohup|nop|od|passwd|patch|pcregrep|pcretest|perl|perror|pidof|pr|printf|procmail|prune|ps2ascii|ps2epsi|ps2frag|ps2pdf|ps2ps|psbook|psmerge|psnup|psresize|psselect|pstops|rcs|rev|rm|scp|sed|seq|setterm|shred|size|size86|skill|slogin|snice|sort|sox|split|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|stat|strings|strip|sudo|suidperl|sum|tac|tail|tee|test|tr|uniq|unlink|unzip|updatedb|updmap|uptime|users|vmstat|w|wc|wget|whatis|whereis|which|who|whoami|write|xargs|yacc|yes|zip|zsoelim)\>" + +## Strings +color blue "\"(\\.|[^\"])*\"" +color blue "'(\\.|[^\'])*'" + +## Variables +# NOTE: Keep this section below the Strings section, such that Variables are highlighted inside strings. +color cyan start="[$@%]" end="([[:alnum:]]|_)*" + +## Comments +color green "#.*$" diff --git a/.nano/css.nanorc b/.nano/css.nanorc new file mode 100644 index 0000000..1ef9f60 --- /dev/null +++ b/.nano/css.nanorc @@ -0,0 +1,8 @@ +syntax "css" "\.css$" +color brightred "." +color brightyellow start="\{" end="\}" +color brightwhite start=":" end="[;^\{]" +color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" +color brightblue start="\/\*" end="\\*/" +color green ";|:|\{|\}" + diff --git a/.nano/dotenv.nanorc b/.nano/dotenv.nanorc new file mode 100644 index 0000000..dff22f6 --- /dev/null +++ b/.nano/dotenv.nanorc @@ -0,0 +1,22 @@ +# Supports `.env` files +syntax "dotenv" "\/\.env(\.old|\.bak|.example|~)?$" + +## Keys +color cyan "^\s*[A-Z0-9_]+" + +## Values +color brightyellow "=.*$" +color ,red "[\'\"].*$" +color brightwhite "[\'\"].*[\'\"]$" + +## Equal sign +color green "=" + +## Booleans +color brightmagenta "(TRUE|true|FALSE|false)\s*($|;)" + +## Comments +color brightyellow ";.*$" + +## Spaces in front of tabs. +color ,red " + +" diff --git a/.nano/html.nanorc b/.nano/html.nanorc new file mode 100644 index 0000000..4705fac --- /dev/null +++ b/.nano/html.nanorc @@ -0,0 +1,3 @@ +syntax "html" "\.htm[l]?$" +color cyan start="<" end=">" +color red "&[^;[[:space:]]]*;" diff --git a/.nano/java.nanorc b/.nano/java.nanorc new file mode 100644 index 0000000..d7011ac --- /dev/null +++ b/.nano/java.nanorc @@ -0,0 +1,14 @@ +syntax "java" "\.java$" +color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" +color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" +color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" +color red ""[^"]*"" +color yellow "\<(true|false|null)\>" + +# Comments +color blue "//.*" +color blue start="/\*" end="\*/" +color brightblue start="/\*\*" end="\*/" + +# Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/.nano/js.nanorc b/.nano/js.nanorc new file mode 100644 index 0000000..a60f381 --- /dev/null +++ b/.nano/js.nanorc @@ -0,0 +1,40 @@ +syntax "javascript" "\.(mjs)|(js)|(jsx)|(json)$" + +## Default +color white "^.+$" + +## Decimal, cotal and hexadecimal numbers +color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" + +## Floating point number with at least one digit before decimal point +color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" +color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" + +## Keywords +color green "\<(abstract|await|boolean|break|byte|case|catch|char)\>" +color green "\<(class|const|continue|debugger|default|delete|double)\>" +color green "\<(do|else|enum|export|extends|finally|final|float|for)\>" +color green "\<(from|function|goto|if|implements|import|instanceof)\>" +color green "\<(interface|int|in|let|long|native|new|package|private)\>" +color green "\<(protected|public|return|short|static|super|switch)\>" +color green "\<(synchronized|this|throws|throw|transient|try|typeof)\>" +color green "\<(var|void|volatile|while|with|yield)\>" + +## Type specifiers +color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" +color red "\<(Number|Object|RegExp|String)\>" +color red "\<(true|false)\>" + +## String +color brightyellow "L?\"(\\"|[^"])*\"" +color brightyellow "L?'(\'|[^'])*'" +color brightcyan "L?`(\`|[^`])*`" +color brightwhite,blue start="\$\{" end="\}" + +## Escapes +color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" + +## Comments +color magenta start="/\*" end="\*/" +color magenta "//.*$" + diff --git a/.nano/makefile.nanorc b/.nano/makefile.nanorc new file mode 100644 index 0000000..cf98c7f --- /dev/null +++ b/.nano/makefile.nanorc @@ -0,0 +1,12 @@ +syntax "makefile" "(m|M)akefile$" "\.mak$" +color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include" +icolor cyan start="\{" end="\}" +icolor cyan start="\(" end="\)" +color brightyellow "\$" +color green "#.*$" + +color red "[:=]" +color magenta "\<(if|ifeq|else|endif)\>" +color blue "\$\{.*}" +color brightblue "\w+:" +color green "#.*$" diff --git a/.nano/man.nanorc b/.nano/man.nanorc new file mode 100644 index 0000000..79e0613 --- /dev/null +++ b/.nano/man.nanorc @@ -0,0 +1,7 @@ +syntax "man" "\.[1-9]x?$" +color green "\.(S|T)H.*$" +color brightgreen "\.(S|T)H" "\.TP" +color brightred "\.(BR?|I[PR]?).*$" +color brightblue "\.(BR?|I[PR]?|PP)" +color brightwhite "\\f[BIPR]" +color yellow "\.(br|DS|RS|RE|PD)" diff --git a/.nano/markdown.nanorc b/.nano/markdown.nanorc new file mode 100644 index 0000000..02d6e18 --- /dev/null +++ b/.nano/markdown.nanorc @@ -0,0 +1,54 @@ +# Markdown syntax for .nanorc + +syntax "Markdown" "\.(md|mkd|mkdn|markdown)$" + +# Tables (Github extension) +color cyan ".*[ :]\|[ :].*" + +# quotes +color brightblack start="^>" end="^$" +color brightblack "^>.*" + +# Emphasis +color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)" + +# Strong emphasis +color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)" + +# strike-through +color red "(^|[[:space:]])~~[^ ][^~]*~~" + +# horizontal rules +color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$" + +# headlines +color brightmagenta "^#{1,6}.*" + +# lists +color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " + +# leading whitespace +color black "^[[:space:]]+" + +# misc +color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])" + +# links +color brightblue "\[[^]]+\]" +color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)" + +# images +color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])" + +# urls +color brightyellow "https?://[^ )>]+" + +# code +color yellow "`[^\`]*`|^ {4}[^-+*].*" + +# code blocks +color yellow start="^```[^$]' end="^```$" +color yellow "^```$" + +# Trailing spaces +color ,green "[[:space:]]+$" diff --git a/.nano/postgresql.nanorc b/.nano/postgresql.nanorc new file mode 100644 index 0000000..c7575fb --- /dev/null +++ b/.nano/postgresql.nanorc @@ -0,0 +1,5 @@ +syntax "postgreSQL" "\.sql$" +icolor red "\<(A(LL|NALY(S|Z)E|ND|NY|RRAY|S|SC|SYMMETRIC|UTHORIZATION)|B(ETWEEN|INARY|OTH|Y)|C(ASE|AST|HECK|OLLATE|OLUMN|ONSTRAINT|REATE|ROSS|URRENT_(DATE|ROLE|TIME|TIMESTAMP|USER))|D(EFAULT|EFERRABLE|ESC|ISTINCT|O|ROP)|E(LSE|ND|XCEPT)|F(ALSE|OR(EIGN)?|REEZE|ROM|ULL)|GRANT|GROUP|HAVING|I(LIKE|N(ITIALLY|NER|TERSECT|TO)?|S|SNULL)|JOIN|L(EADING|EFT|IKE|IMIT|OCALTIME(STAMP)?)|N(ATURAL|EW|OT(NULL)?|ULL)|O(FF(SET)?|LD|N|NLY|R|RDER|UTER|VERLAPS)|PLACING|PRIMARY|REFERENCES|RIGHT|S(ELECT|ESSION_USER|IMILAR|OME|YMMETRIC)|T(ABLE|HEN|O|RAILING|RUE)|UNION|UNIQUE|USER|USING|VE(IW|RBOSE)|WHEN|WHERE)\>" +color magenta "(\{|\}|\(\)|\;|\]|\[|`|\\|\$|<|>|!|=|&)" +color yellow "'[^']*'" +color green "--.*$" diff --git a/.nano/rsync.nanorc b/.nano/rsync.nanorc new file mode 100644 index 0000000..9533757 --- /dev/null +++ b/.nano/rsync.nanorc @@ -0,0 +1,7 @@ +syntax "rsync" "rsyncd.conf$" +color cyan "(hosts|(u|g)id|pid\ file|use\ chroot|read\ only|address|max\ connections|motd\ file)" +color cyan "(log\ format|syslog\ facility|timeout)" +color yellow "(path|comment|exclude)" +color brightyellow start="\[" end="\]" +color green "#.*$" + diff --git a/.nano/sh.nanorc b/.nano/sh.nanorc new file mode 100644 index 0000000..13af71b --- /dev/null +++ b/.nano/sh.nanorc @@ -0,0 +1,13 @@ +## Here is an example for Bourne shell scripts. +## +syntax "sh" "\.sh$" +icolor brightgreen "^[0-9A-Z_]+\(\)" +color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color green "-[Ldefgruwx]\>" +color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" +color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" +color cyan "(^|[[:space:]])#.*$" +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color ,green "[[:space:]]+$" \ No newline at end of file diff --git a/.nano/toml.nanorc b/.nano/toml.nanorc new file mode 100644 index 0000000..2ffd5c1 --- /dev/null +++ b/.nano/toml.nanorc @@ -0,0 +1,16 @@ +# Supports `TOML` files +syntax "TOML" "\.toml$" + +## Multiline +icolor yellow start="\"\"\"" end="\"\"\"" +icolor yellow start="'''" end="'''" +icolor yellow start="\[" end="\]" + +## Values +icolor yellow "=.*" + +## Tables +icolor red "^\s*\[.*\]$" + +## Comments (keep at the end of this file!) +icolor cyan "#.*$" diff --git a/.nano/urls.nanorc b/.nano/urls.nanorc new file mode 100644 index 0000000..c87911c --- /dev/null +++ b/.nano/urls.nanorc @@ -0,0 +1,6 @@ +syntax "urls" +color brightmagenta "^.*$" +color cyan "^(1[0-9][0-9]|20[256]|30[45]).*$" +color green "^20[03].*$" +color brightyellow "^(201|30[0-37]).*$" +color brightred "^(204|[45][0-9][0-9]|666).*$" \ No newline at end of file diff --git a/.nano/xml.nanorc b/.nano/xml.nanorc new file mode 100644 index 0000000..20c3ef0 --- /dev/null +++ b/.nano/xml.nanorc @@ -0,0 +1,9 @@ +syntax "ml" ".*\.([jrs]?html?|xml|sgml?|lhtml|opml|kdevelop|vcproj|glade|xsd|plist|gcs|dtd|dcl)$" "catalog$" "docbook$" +color white "^.+$" +color green start="<" end=">" +color cyan "<[^> ]+" +color cyan ">" +color yellow start="" +color yellow start="" +color red "&[^;]*;" + diff --git a/.nano/yaml.nanorc b/.nano/yaml.nanorc new file mode 100644 index 0000000..36c0b5b --- /dev/null +++ b/.nano/yaml.nanorc @@ -0,0 +1,36 @@ +# Supports `YAML` files +syntax "YAML" "\.ya?ml$" +header "^(---|===)" "%YAML" + +## Keys +color magenta "^\s*[\$A-Za-z0-9_-]+\:" +color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:" + +## Values +color white ":\s.+$" +## Booleans +icolor brightcyan " (y|yes|n|no|true|false|on|off)$" +## Numbers +color brightred " [[:digit:]]+(\.[[:digit:]]+)?" +## Arrays +color red "\[" "\]" ":\s+[|>]" "^\s*- " +## Reserved +color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " + +## Comments +color brightwhite "#.*$" + +## Errors +color ,red ":\w.+$" +color ,red ":'.+$" +color ,red ":".+$" +color ,red "\s+$" + +## Non closed quote +color ,red "['\"][^['\"]]*$" + +## Closed quotes +color yellow "['\"].*['\"]" + +## Equal sign +color brightgreen ":( |$)" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6a048a5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,131 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at [INSERT CONTACT +METHOD]. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CODE_STYLE_AND_STANDARDS_GUIDES.md b/CODE_STYLE_AND_STANDARDS_GUIDES.md new file mode 100644 index 0000000..a9ed086 --- /dev/null +++ b/CODE_STYLE_AND_STANDARDS_GUIDES.md @@ -0,0 +1,73 @@ +# Code Style and Standards Guides + +## Introduction + +Coding standards act as the guiding principles for crafting top-notch source +code in any project. They aren't just a set of rules; rather, they embody a +collection of guidelines, best practices, and conventions that developers stick +to, ensuring uniformity, ease of maintenance, and scalability throughout the +codebase. + +By adhering to these standards, developers achieve several key objectives: + +- **Maintainability**: Ensuring that the codebase remains easy to modify, update + , and debug over time. +- **Transparency, Clarity, and Readability**: Making the code understandable to + other developers, resulting in fewer errors and quicker onboarding for new + team members. +- **Scalability**: Establishing a robust foundation that can accommodate future + growth and changes without requiring significant overhauls. + +In projects governed by a style guide, developers are not only expected to +comprehend but also consistently apply these guidelines. Any deviations from the +guide should be well-justified and properly documented. + +However, while maintaining consistency is crucial, there are situations where +flexibility is warranted. Contextual factors may demand deviations from the +standard, and developers should exercise judgment accordingly. + +The overarching principle is crystal clear: prioritize readability over rigid +adherence to rules. After all, code isn't just for computers; it's primarily for +humans to understand and maintain. + +## Available Guides + +A plethora of style and standards guides are at your disposal for various +technologies, including: + +- **[Bootstrap]**: A frontend framework for crafting responsive and mobile-first + sites. +- **[Cascading Style Sheets (CSS)]**: The styling language used for defining the + presentation of a document written in HTML. +- **[Commit Messages]**: Guidelines for crafting clear and informative commit + messages, crucial for effective collaboration in version control systems like + Git. +- **[Go]**: A programming language renowned for its simplicity, efficiency, and + support for concurrency. +- **[HTML]**: The standard markup language for crafting web pages and web + applications. +- **[JavaScript]**: A high-level, interpreted programming language that adheres + to the ECMAScript specification. +- **[Markdown]**: A lightweight markup language for formatting plain text, + widely employed for writing documentation. +- **[PHP]**: A server-side scripting language tailored for web development. +- **[XML]**: The Extensible Markup Language utilized for storing and + transporting data. + +Each guide offers valuable insights and recommendations for upholding code +quality and consistency within its respective domain. + +Remember, while these guides provide invaluable guidance, they should serve as +tools to empower developers rather than restrict their creativity and +problem-solving abilities. Ultimately, the objective is to produce code that is +not only functional but also elegant and easy to comprehend. + +[Bootstrap]: https://www.w3schools.com/bootstrap/bootstrap_ver.asp +[Cascading Style Sheets (CSS)]: https://www.w3schools.com/css/default.asp +[Commit Messages]: https://www.w3schools.com/git/default.asp +[Go]: https://www.w3schools.com/go/index.php +[HTML]: https://www.w3schools.com/html/default.asp +[JavaScript]: https://www.w3schools.com/js/default.asp +[Markdown]: https://www.markdownguide.org/cheat-sheet/ +[PHP]: https://www.w3schools.com/php/default.asp +[XML]: https://www.w3schools.com/xml/default.asp diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..203baa2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# Contributing to this Project + +Thanks for considering contributing to Homelab-Alpha! Your interest and effort +are invaluable to our community's growth and the enhancement of our project. +Below are some guidelines to streamline your contribution process: + +## Issues + +- **Check Existing Issues**: Take a look at our list of existing issues to see + if someone is already working on the problem or feature you're interested in. + If there's an open issue, consider contributing to it. +- **Creating New Issues**: If you're opening a new issue, ensure it's clear and + concise. Provide detailed descriptions, including steps to reproduce any + problems. +- **Indicate Willingness to Work**: When submitting a new issue, let us know if + you're willing to work on a solution. + +## Pull Requests + +- **Alignment with Project Goals**: Before sending a pull request, ensure your + contribution aligns with our project's objectives. For significant changes, + discussing them in an issue beforehand is beneficial. +- **Coding Standards**: Keep your code neat and consistent with our coding + standards, + +### Workflow and Versioning + +We follow the [GitHub flow] for our versioning workflow. + +When you're working on something: + +1. Fork the repository. +2. Create a new branch for your task. +3. Send a pull request from your branch to our `main` branch. + +### Style Guide + +- Make sure your pull requests adhere to the [Conventional Commits + specification] and our [Code Style + Standards Guides]. + +## How Can You Help? + +### Keep Homelab-Alpha Up-to-Date + +If you notice updates to your favorite operating systems or tools, feel free to +open a [pull request] to incorporate them into Homelab-Alpha. Your contribution +will undergo review and merge once validated. + +### Enhance Documentation and Knowledge Base + +At Homelab-Alpha, we're committed to nurturing an educational environment where +everyone can contribute to enhancing our documentation. If you excel in writing +technical documentation, consider contributing to documents that aid others in +learning and growing. + +### Share Your Ideas + +We're always eager to hear your innovative ideas and suggestions for new +projects. Share your thoughts or concepts using the [ideas] link. Your input +helps shape our future endeavors! + +## Licensing + +By contributing, you agree to license your work under the [Homelab-Alpha +license]. If you have any objections to changes in the license, please +communicate them to us promptly. + +## Enjoy and Have Fun + +Thanks for contemplating contributing to Homelab-Alpha. Together, we can elevate +and refine our project for the entire community to benefit from. We eagerly +anticipate your contributions! + +[GitHub flow]: https://guides.github.com/introduction/flow +[Conventional Commits specification]: https://conventionalcommits.org/ +[Code Style + Standards Guides]: CODE_STYLE_AND_STANDARDS_GUIDES.md +[pull request]: https://github.com/homelab-alpha/dotfiles/pulls +[ideas]: https://github.com/homelab-alpha/dotfiles/discussions/categories/ideas +[Homelab-Alpha license]: LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..8d4ca21 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,55 @@ +# Copyright © 2024 Homelab-Alpha + +This file is part of the dotfiles repository, owned by Homelab-Alpha. + +This project is protected by copyright and other intellectual property rights. +It is intended for personal and non-commercial use only. Any other use, +distribution, or modification without the express permission of Homelab-Alpha is +strictly prohibited. + +**YOU MAY:** + +- Use and modify the project for personal and non-commercial purposes. +- Copy and distribute the project in its original form, including this Copyright + notice. + +**YOU MAY NOT:** + +- Use the project for commercial purposes without prior written permission from + Homelab-Alpha. +- Use this project for advertising purposes without prior written permission + from Homelab-Alpha. +- Redistribute this project or parts of it under a different license. +- Use this project or parts of it for any purpose contrary to applicable law. + +Homelab-Alpha accepts no liability for any damage caused by the use of this +project. This includes but is not limited to any direct, indirect, special, +incidental, or consequential damages arising out of the use or inability to use +the project. + +For questions, commercial use, or permission for use in other contexts, please +contact me. + +All trademarks, service marks, trade names, product names, and logos used in +this project are the property of their respective owners. + +## Definitions + +- **Commercial Use**: Refers to any use of the project for financial gain or + commercial advantage, including but not limited to selling, licensing, or + providing services based on the project. + +## License + +This project is licensed under the Creative Commons +Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy +of this license, visit [here]. + +## Contact Information + +For inquiries regarding this project, commercial use, or permission for use in +other contexts, please feel free to send an email. + +Thank you for respecting the copyrights. + +[here]: https://creativecommons.org/licenses/by-nc-sa/4.0/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..150f3c4 --- /dev/null +++ b/README.md @@ -0,0 +1,182 @@ +# Homelab-Alpha + +[![Super-Linter](https://github.com/homelab-alpha/dotfiles/actions/workflows/super-linter.yml/badge.svg)](https://github.com/homelab-alpha/dotfiles/actions/workflows/super-linter.yml) + +Welcome to the Homelab-Alpha Dotfiles Repository! + +For all related documentation and more information about this repository, please +visit [Homelab-Alpha/Dotfiles]. + +## User Responsibilities + +### Ethical and Legal Use + +Users are expected to use the services provided by Homelab-Alpha in an ethical +and lawful manner. + +### Respect for Others + +Users must respect the rights and privacy of other users and refrain from +engaging in any behavior that may harass, intimidate, or harm others. + +### Abuse Prevention + +Users are prohibited from abusing or misusing the services of Homelab-Alpha, +including attempting to gain unauthorized access to accounts or systems, +distributing malware or other harmful content, or engaging in any form of +cyberbullying. + +### Compliance with Policies + +Users are required to comply with all applicable policies and guidelines +provided by Homelab-Alpha, including the Terms of Use, Privacy Policy, and any +community guidelines or rules. + +### User Feedback + +We’d love to hear your feedback. Please file documentation issues only in the +dotfiles GitHub repository. You can file a new issue to suggest improvements or +if you see any errors in the existing documentation. + +Before submitting a new issue, check whether the issue has already been +reported. You can join the discussion using an emoji, or by adding a comment to +an existing issue. If possible, we recommend that you suggest a fix to the issue +by creating a pull request. + +You can ask general questions and get community support through our [community]. + +If you have an idea for a new feature or behavior change in a specific aspect of +Homelab-Alpha Dotfiles or have found a bug, file that issue in the project's +code repository. + +We've made it easy for you to file new issues. + +- **Bug report:** Thanks for taking the time to help us improve our Dotfiles + project or documentation. To ensure we can address your issue effectively, + please fill out the entire form use the link [bug report]. Don't forget to + attach any relevant screenshots and provide a clear description of the bug or + typo you encountered. +- **Reporting a Vulnerability:** Please report any vulnerabilities you discover + to Homelab-Alpha by [security report]. We appreciate detailed reports that + include steps to reproduce the vulnerability and any potential impact. +- **Give feedback:** Your feedback is invaluable to us as we strive to enhance + your experience. Please take a moment to share your thoughts with us using the + link [give feedback]. Whether it's praise, criticism, or suggestions for + improvement, we want to hear it all! +- **Ideas:** We're always eager to hear your creative ideas and suggestions for + a new project. Please share any thoughts or concepts you have using the link + [ideas]. Your input helps shape the future of what we do! +- **Feature request:** We love hearing your ideas for making our project even + better. Please use the link [feature request] to share your feature request + with us. Be sure to provide as much detail as possible to help us understand + your suggestion and its potential impact. + +## Contribute to Homelab-Alpha Dotfiles repository + +We value your contribution. We want to make it as easy as possible to submit +your contributions to the Homelab-Alpha Dotfiles repository. Changes to the +Dotfiles are handled through pull requests against the `main` branch. To learn +how to contribute, see [contributing]. + +## Reporting Vulnerabilities + +Users are obligated to promptly report any security vulnerabilities or issues +found on [Homelab-Alpha's website] or [Homelab-Alpha's GitHub repositories] to +Homelab-Alpha using the designated reporting channels. + +## Supported Versions + +Users are encouraged to utilize either the latest stable release or the +preceding stable release for security reasons. Homelab-Alpha provides security +updates for these supported versions and urges users to promptly apply patches +and updates. + +## Third-Party Dependencies + +Users acknowledge that [Homelab-Alpha's website] and [Homelab-Alpha's GitHub +repositories] may incorporate third-party components beyond Homelab-Alpha's +control. While efforts are made to maintain the integrity and security of these +dependencies, Homelab-Alpha cannot guarantee their absolute safety. + +## Limitation of Liability + +By utilizing [Homelab-Alpha's website] and [Homelab-Alpha's GitHub +repositories], you expressly acknowledge and agree that Homelab-Alpha and its +contributors shall not be held liable for any damages, losses, or security +breaches arising from the use of [Homelab-Alpha's website] and [Homelab-Alpha's +GitHub repositories] or related components. This includes, but is not limited +to, any direct, indirect, incidental, special, or consequential damages, as well +as any loss of profits, data, or business opportunities. + +### Indemnification + +You agree to indemnify and hold harmless Homelab-Alpha and its affiliates, +directors, officers, employees, agents, and contributors from and against any +claims, liabilities, damages, losses, costs, or expenses (including reasonable +attorneys' fees) arising from or related to your use of [Homelab-Alpha's +website] and [Homelab-Alpha's GitHub repositories], including but not limited to +any breaches of security, violations of applicable laws or regulations, or +infringement of third-party rights. + +## Security Best Practices + +Users are advised to adhere to security best practices, including but not +limited to regular software updates, strong password policies, and secure coding +practices. Homelab-Alpha recommends following these practices to enhance +deployment security and minimize the risk of breaches or unauthorized access. + +## Disclaimer + +### No Warranty + +[Homelab-Alpha's website] and [Homelab-Alpha's GitHub repositories] are provided +"as is" without any warranty, express or implied. Homelab-Alpha makes no +warranties regarding the accuracy, reliability, or suitability of the services. + +### Changes to Terms + +Homelab-Alpha reserves the right to amend these terms of use pages at any time +without prior notice. Continued use of [Homelab-Alpha's website] and +[Homelab-Alpha's GitHub repositories] constitutes acceptance of the revised +terms. + +### Changes to Privacy Policy + +We may update our Privacy Policy periodically. We will notify you of any changes +by posting the new Privacy Policy on this page. It is advisable to periodically +review this Privacy Policy for any changes. Changes to this Privacy Policy +become effective when posted on this page. + +### Contact Us + +If you have any questions about this Privacy Policy, you can reach us by +visiting this page on our website: [Homelab-Alpha's contact] + +## Governing Law + +These legal pages are governed by the laws of the Netherlands. Any disputes +arising from the use of [Homelab-Alpha's website] and [Homelab-Alpha's GitHub +repositories] shall be subject to the exclusive jurisdiction of the courts of +the Netherlands. + +**Copyright and License** + +© 2024 Homelab-Alpha and its repositories are licensed under the terms of +the [license] agreement. + +[Homelab-Alpha/Dotfiles]: https://homelab-alpha.nl/dotfiles +[Homelab-Alpha's website]: https://homelab-alpha.nl +[Homelab-Alpha's GitHub repositories]: https://github.com/homelab-alpha +[community]: https://github.com/homelab-alpha/dotfiles/discussions +[bug report]: + https://github.com/homelab-alpha/dotfiles/issues/new?&template=bug_report.md +[security report]: + https://github.com/homelab-alpha/dotfiles/issues/new?&template=security_report.md +[give feedback]: + https://github.com/homelab-alpha/dotfiles/discussions/categories/feedback +[ideas]: https://github.com/homelab-alpha/dotfiles/discussions/categories/ideas +[feature request]: + https://github.com/homelab-alpha/dotfiles/discussions/categories/feature-requests +[contributing]: CONTRIBUTING.md +[Homelab-Alpha's contact]: https://homelab-alpha.nl/contact +[license]: LICENSE.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..d4e9259 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,60 @@ +# Security Policy + +## Reporting a Vulnerability + +At Homelab-Alpha, we prioritize the security and integrity of [Homelab-Alpha's +website] and [Homelab-Alpha's GitHub repositories]. If you discover any security +vulnerabilities or issues within our dotfiles repository, please promptly report +them to Homelab-Alpha by [creating a new security report]. Your assistance in +identifying and resolving potential security risks is greatly appreciated. + +## Supported Versions + +We are committed to providing security updates for the following versions: + +- The latest stable release +- The previous stable release (if applicable) + +To ensure the continued security, we strongly advise utilizing one of these +supported versions and promptly applying any available security patches and +updates. + +## Third-Party Dependencies + +[Homelab-Alpha's website] and [Homelab-Alpha's GitHub repositories] may utilize +third-party components and dependencies beyond our direct control. While we +strive to maintain the integrity and security of these dependencies, we cannot +guarantee their absolute safety. Users are encouraged to conduct their own +thorough assessments of any third-party. + +## Limitation of Liability + +By utilizing [Homelab-Alpha's website] and [Homelab-Alpha's GitHub +repositories], you expressly acknowledge and agree that Homelab-Alpha and its +contributors shall not be held liable for any damages, losses, or security +breaches arising from the use of [Homelab-Alpha's website] and [Homelab-Alpha's +GitHub repositories] or related components. This includes, but is not limited +to, any direct, indirect, incidental, special, or consequential damages, as well +as any loss of profits, data, or business opportunities. + +## Indemnification + +You agree to indemnify and hold harmless Homelab-Alpha and its affiliates, +directors, officers, employees, agents, and contributors from and against any +claims, liabilities, damages, losses, costs, or expenses (including reasonable +attorneys' fees) arising from or related to your use of our [Homelab-Alpha's +website] and [Homelab-Alpha's GitHub repositories], including but not limited to +any breaches of security, violations of applicable laws or regulations, or +infringement of third-party rights. + +## Security Best Practices + +Users are advised to adhere to security best practices, including but not +limited to regular software updates, strong password policies, and secure coding +practices. Homelab-Alpha recommends following these practices to enhance +deployment security and minimize the risk of breaches or unauthorized access. + +[Homelab-Alpha's website]: https://homelab-alpha.nl +[Homelab-Alpha's GitHub repositories]: https://github.com/homelab-alpha +[creating a new security report]: + https://github.com/homelab-alpha/dotfiles/issues/new?&template=security_report.md diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases new file mode 100644 index 0000000..640ced9 --- /dev/null +++ b/dotfiles/.bash_aliases @@ -0,0 +1,315 @@ +# Define directory paths. +log_dir="/var/log" +docker_dir="/docker" +downloads_dir="$HOME/Downloads" +bash_script_dir="$HOME/.bash_script" + +##### Global + +##### Docker: +##### Description: +# alias start-docker="sudo systemctl start docker.service" +# alias stop-dockerm="sudo systemctl stop docker.service" +alias status-docker="systemctl status docker.service" +alias restart-docker="sudo systemctl restart docker.service" + +##### Fail2ban: +##### Description: +# alias start-fail2ban="sudo systemctl start fail2ban.service" +# alias stop-fail2ban="sudo systemctl stop fail2ban.service" +alias status-fail2ban="systemctl status fail2ban.service" +alias restart-fail2ban="sudo systemctl restart fail2ban.service" +alias status-jail-jellyfin="sudo fail2ban-client status jellyfin" +alias status-jail-sshd="sudo fail2ban-client status sshd" + +##### HAProxy: +##### Description: +# alias start-haproxy="sudo systemctl start haproxy.service" +# alias stop-haproxy="sudo systemctl stop haproxy.service" +alias status-haproxy="systemctl status haproxy.service" +alias restart-haproxy="sudo systemctl restart haproxy.service" +alias haproxy-config="sudo nano /etc/haproxy/haproxy.cfg" +alias haproxy-f="sudo haproxy -f /etc/haproxy/haproxy.cfg" + +##### Uncomplicated Firewall: +##### Description: +# alias start-ufw="sudo systemctl start ufw.service" +# alias stop-ufw="sudo systemctl stop ufw.service" +alias status-ufw="systemctl status ufw.service" +alias restart-ufw="sudo systemctl restart ufw.service" + +# alias ufw-enable="sudo ufw enable" +# alias ufw-disable="sudo ufw disable" +alias status-ufw-v="sudo ufw status verbose" +alias status-ufw-n="sudo ufw status numbered" + +##### UniFi Network Application: +##### Description: +# alias start-unifi="sudo systemctl start unifi.service" +# alias stop-unifi="sudo systemctl stop unifi.service" +alias status-unifi="systemctl status unifi.service" +alias restart-unifi="sudo systemctl restart unifi.service" + +##### Bash: +##### Description: +alias rm-bash_history="rm $HOME/.bash_history" + +##### Boxes: +##### Description: +alias boxes-export="virsh dumpxml" +alias boxes-import="virsh define --file" +alias boxes-ls="virsh -c qemu:///session list --all" + +##### Change Directory: +##### Description: +alias ..="cd .." +alias cdbash="cd $HOME/.bash_script" +alias cddocker="cd $docker_dir/" +alias cddownloads="cd $HOME/Downloads" +alias cdlog="cd $log_dir" +alias cdssh="cd $HOME/.ssh" +alias cdssl="cd $HOME/ssl" +alias cdtrash="cd $HOME/.local/share/Trash/files/" +alias cdversioning="cd $HOME/.versioning" + +##### Chmod: +##### Description: +alias mx="sudo chmod a+x --preserve-root --changes" +alias mx-="sudo chmod a-x --preserve-root --changes" +alias 000="sudo chmod --preserve-root --changes 000" +alias 600="sudo chmod --preserve-root --changes 600" +alias 644="sudo chmod --preserve-root --changes 644" +alias 664="sudo chmod --preserve-root --changes 664" +alias 666="sudo chmod --preserve-root --changes 666" +alias 700="sudo chmod --preserve-root --changes 700" +alias 744="sudo chmod --preserve-root --changes 744" +alias 755="sudo chmod --preserve-root --changes 755" + +##### Cat: +##### Description: +alias cat="clear && cat --show-tabs --show-nonprinting" +alias cat-n="clear && cat --number --show-tabs --show-nonprinting" + +##### Clear the Terminal Screen: +##### Description: +alias c="clear" + +##### Copy: +##### Description: +alias cp="cp --recursive --preserve=all --verbose" + +##### Console setup: +##### Description: +alias console-setup="sudo dpkg-reconfigure console-setup" + +##### DF: +##### Description: +alias df="df --human-readable --output=source,size,used,avail,pcent,target" +alias df-t="df --type=ext4" + +##### Diff: +##### Description: +alias diff="diff --color=auto" + +##### Dig: +##### Description: +alias dig="dig +dnssec +fail" +alias dig+="dig +dnssec +fail +short" + +##### Dir: +##### Description: +alias dir="dir --color=auto" +alias vdir="vdir --color=auto" + +##### Find: +##### Description: +alias f="clear && find . | grep " + +##### Grep: +##### Description: +alias grep="grep --color=auto" +alias egrep="egrep --color=auto" +alias fgrep="fgrep --color=auto" + +##### ifconfig.co: +##### Description: +alias ifconfigco="curl -s ifconfig.co/json" + +##### Lnav: +##### Description: +alias lnav="sudo lnav" + +##### Locate: +##### Description: +alias update-locate="sudo updatedb" + +##### Logs: +##### Description: +alias logs="sudo lnav $log_dir/" + +##### ls: +##### Description: +alias l="clear && ls --almost-all -C --ignore="lost+found"" +alias ll="clear && ls --almost-all -C --no-group -l --ignore="lost+found"" +alias ls="clear && ls --color=auto --human-readable --sort="extension" --ignore="lost+found"" + +##### Machine ID: +##### Description: +alias machine-id="hostnamectl | grep \"Machine ID\"" + +##### Message of the Day: +##### Description: +alias motd="sudo run-parts /etc/update-motd.d" + +##### Netstat: +##### Description: +alias net="clear && sudo netstat --all --extend --tcp --udp --numeric --programs --verbose" + +##### Network management: +##### Description: +alias IP="clear && ip --color=auto addr" + +##### Move: +##### Description: +alias mv="mv --no-clobber --verbose" + +##### OpenSSL: +##### Description: +alias hash-md5="openssl passwd -1" +alias hash-sha256="openssl passwd -5" +alias hash-sha512="openssl passwd -6" +alias hash-apr1="openssl passwd -apr1" +alias hash-aixmd5="openssl passwd -aixmd5" +alias hash-password-sha256="echo $1 -n | shasum -a 256" + +##### Ping address: +##### Description: +alias p="ping -ODv" +alias p-cloudflare="ping -ODvc 4 1.1.1.1" +alias p-cloudflare.com="ping -ODvc 4 www.cloudflare.com" +alias p-google="ping -ODvc 4 8.8.8.8" +alias p-google.com="ping -ODvc 4 www.google.com" +alias p-quad9="ping -ODvc 4 9.9.9.9" +alias p-quad9.com="ping -ODvc 4 www.quad9.com" + +##### PS: +##### Description: Report a snapshot of the current processes. +alias ps="ps aux | grep" + +##### Shutdown commands: +##### Description: +alias reboot="sudo shutdown --reboot now" +alias shutdown="sudo shutdown --poweroff now" + +##### SSH: +##### Description: +alias rm-known_host="rm .ssh/known_hosts*" + +##### Tail: +##### Description: +alias tail="clear && tail --follow --lines=360" + +##### Trash: +##### Description: Remove files or directories +alias rm="trash-put" +alias rm-restore="trash-restore" +alias list-trashcan="trash-list" +alias emty-trashcan="trash-empty 30" + +##### Tree: +##### Description: +alias t="clear && tree -aAc" +alias tt="clear && tree -aAcDgpRu" + +##### Tmux: +##### Description: If not inside a tmux session, and if no session is started, start a new session +alias ts="tmux attach -t tmux-session || tmux new -s tmux-session" +alias th="tmux attach -t th-session || tmux new -s th-session \; split-window -h \; select-pane -t 1" +alias tv="tmux attach -t tv-session || tmux new -s tv-session \; split-window -v \; select-pane -t 1" +alias tn="tmux attach -t tn-session || tmux new -s tn-session \; split-window -v \; split-window -h \; select-pane -t 1 \; split-window -h \; select-pane -t 1" +alias tm="tmux attach -t temp-session || tmux new -s temp-session \; split-window -h \; select-pane -t 1" + +alias ts-kill="tmux kill-session -t tm-session" +alias th-kill="tmux kill-session -t th-session" +alias tm-kill="tmux kill-session -t temps-session" +alias tn-kill="tmux kill-session -t tn-session" +alias tv-kill="tmux kill-session -t tv-session" + +##### Ubuntu Pro +##### Description: +alias pro-fix="pro fix CVE-" +alias pro-livepatch="canonical-livepatch status" +alias pro-security-status="pro security-status" +alias pro-status="pro status" + +##### Visual Studio Code +##### Description: +alias vscode-export="code --list-extensions | xargs -L 1 echo code --install-extension" + +##### Wget: +##### Description: +alias wget="wget --directory-prefix=$downloads_dir" + +##### xz: +##### Description: +alias xz="xz --compress --keep --best --verbose" +alias xz-test="xz --test --verbose" +alias xz-uncompress="xz --decompress --best --verbose" + +##### Default ##### + +# #### Apt-Get Packages: +# #### Description: +# alias update="sudo apt update" +# alias update="sudo apt update && flatpak update" +# alias update="sudo apt update && sudo snap refresh" +# alias upgrade="sudo apt-get upgrade" +# alias dist-upgrade="sudo apt-get dist-upgrade" +# alias full-upgrade="sudo apt-get full-upgrade" +# alias clean="sudo apt-get autoremove && sudo apt-get autoclean" +# alias aptsearch="apt search" +# alias aptlist="apt list --upgradable -a" +# alias install-list="sudo apt list --installed" +# alias aptfix="sudo apt-get install --fix-broken" + +##### DNF Packages: +##### Description: +alias clean="sudo dnf autoremove && sudo dnf clean all" +alias update="sudo dnf check-update && flatpak update" +alias upgrade="sudo dnf upgrade" +alias dnf-downgrade="sudo dnf downgrade" +alias dnf-history-undo="sudo dnf history undo" +alias dnf-history="dnf history" +alias dnf-info="dnf info" +alias dnf-installlist="dnf list --installed" +alias dnf-list="dnf list --upgrades" +alias dnf-minimal-upgrade="sudo dnf upgrade-minimal" +alias dnf-search="dnf search" +alias dnf-rm-old-kernel="sudo dnf remove --oldinstallonly --setopt installonly_limit=2 kernel" + +##### Dotfiles: +##### Description: +alias git-install-dotfiles="git clone https://github.com/homelab-alpha/dotfiles.git && cd dotfiles && echo 1 | ./dotfiles_installer.sh" +alias uninstall-dotfiles="cd dotfiles && echo 1 | ./dotfiles_installer.sh" + +##### Hugo +##### Description: +alias hugo-up="hugo server --disableFastRender --noHTTPCache --buildDrafts" + +##### OpenSSL +##### Description: +alias git-install-openssl="git clone https://github.com/homelab-alpha/openssl.git && cd openssl && ./openssl_installer.sh && cd && exec bash" + +##### Scripts: +##### Description: +alias install-dart-sass="$bash_script_dir/install_latest_dart_sass.sh" +alias install-go="$bash_script_dir/install_latest_go.sh" +alias install-hugo="$bash_script_dir/install_latest_hugo.sh" +alias install-jetbrains-mono="$bash_script_dir/install_latest_jetbrains_mono.sh" +alias new-gpg-key-pair="$bash_script_dir/gpg_keygen_script.sh" +alias new-ssh-key-pair="$bash_script_dir/ssh_keygen_script.sh" +alias userid="$bash_script_dir/user_accounts_info.sh" + +##### Trim +##### Description: +alias trim="sudo fstrim --verbose" diff --git a/dotfiles/.bash_exports b/dotfiles/.bash_exports new file mode 100644 index 0000000..1b6f645 --- /dev/null +++ b/dotfiles/.bash_exports @@ -0,0 +1,42 @@ +# Export: +# Syntax: export test=you_did_it_congratulations + +# Dart-Sass +export PATH=$PATH:/usr/local/dart-sass + +# Go-lang +export PATH=$PATH:/usr/local/go/bin + +# GPG +export GPG_TTY=$(tty) + +# Hugo +export PATH=$PATH:/usr/local/hugo-extended + +# Set editor for nano +export EDITOR=nano + +# Setting for the new UTF-8 terminal support +export LANGUAGE DEFAULT=en_US:en +export LANG DEFAULT=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export LC_CTYPE=en_US.UTF-8 +export LC_NUMERIC DEFAULT=en_US.UTF-8 +export LC_TIME DEFAULT=en_US.UTF-8 +export LC_MONETARY DEFAULT=en_US.UTF-8 +export LC_PAPER DEFAULT=en_US.UTF-8 +export LC_NAME DEFAULT=en_US.UTF-8 +export LC_ADDRESS DEFAULT=en_US.UTF-8 +export LC_TELEPHONE DEFAULT=en_US.UTF-8 +export LC_MEASUREMENT DEFAULT=en_US.UTF-8 +export LC_IDENTIFICATION DEFAULT=en_US.UTF-8 +export PAPERSIZE DEFAULT=letter + +# man Using Color with less +export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink +export LESS_TERMCAP_md=$'\E[1;94m' # begin bold +export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video +export LESS_TERMCAP_se=$'\E[0m' # reset reverse video +export LESS_TERMCAP_us=$'\E[1;32m' # begin underline +export LESS_TERMCAP_ue=$'\E[0m' # reset underline diff --git a/dotfiles/.bash_snippets b/dotfiles/.bash_snippets new file mode 100644 index 0000000..864451b --- /dev/null +++ b/dotfiles/.bash_snippets @@ -0,0 +1,316 @@ +# Snippets + +# Funciones: +# Syntax: function () {} + +# Archive Files and Folders +# Description: Create a .tar.gz archive using gzip for compression +# Usage example: targzip /path/to/folder +function targzip() { + if [ -z "$1" ]; then + echo "Usage: targzip " + return 1 + fi + + local source="$1" + local timestamp=$(date +'%b %d, %Y - %H%M%S') + local tmpFile="${source%/} [$timestamp].tar" + local compressedFile="$tmpFile.gz" + + # tar --create --file="$tmpFile" --verify --verbose "$source" || return 1 + tar --create --file="$tmpFile" --verify "$source" || return 1 + + # Determine the correct 'stat' command for the platform + local size + if stat --version &>/dev/null; then + size=$(stat -c%s "$tmpFile") + elif stat -f%z "$tmpFile" &>/dev/null; then + size=$(stat -f%z "$tmpFile") + else + echo "Error: Unable to determine file size." + return 1 + fi + + local cmd="gzip" + + echo "" + echo "Compressing .tar using $cmd." + # $cmd "$tmpFile" --best --rsyncable --verbose || return 1 + $cmd "$tmpFile" --best --rsyncable || return 1 + [ -f "$tmpFile" ] && rm "$tmpFile" + + echo "" + echo "Verifying $compressedFile using $cmd." + # $cmd -t "$compressedFile" --verbose || return 1 + $cmd -t "$compressedFile" || return 1 + + echo "" + echo "$compressedFile has been successfully created and verified." + chmod 644 "$compressedFile" +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Archive Files and Folders +# Description: Create a .tar.zip archive, using `zip` for compression +# Usage example: tarzip /path/to/folder +function tarzip() { + local input_folder="$1" + local timestamp="$(date +'%b %d, %Y - %H%M%S')" + local tmp_file="${input_folder%/} [$timestamp].tar" + local zip_file="${input_folder%/} [$timestamp].tar.zip" + + # Create a .tar archive + echo "" + echo "Creating .tar archive..." + # tar --create --file="$tmp_file" --verify --verbose "$input_folder" || return 1 + tar --create --file="$tmp_file" --verify "$input_folder" || return 1 + + # Get the size of the .tar file + local size=$(stat -c "%s" "$tmp_file" 2>/dev/null) + [ -z "$size" ] && size=$(stat -f "%z" "$tmp_file" 2>/dev/null) + + # Compress the .tar archive using zip + local cmd="zip" + echo "" + echo "Compressing .tar using $cmd..." + # $cmd "$zip_file" --encrypt --recurse-paths -9 --verbose "$tmp_file" || return 1 + $cmd "$zip_file" --encrypt --recurse-paths -9 "$tmp_file" || return 1 + [ -f "$tmp_file" ] && rm "$tmp_file" + + # Verify the zip archive + echo "" + echo "Verifying $zip_file using $cmd..." + # $cmd "$zip_file" --test --verbose || return 1 + $cmd "$zip_file" --test || return 1 + + echo "" + echo "$zip_file has been successfully created and verified." + chmod 644 "$zip_file" +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Archive Extractor +# Description: Extracts archived files or mounts disk images +# Usage example: ex /path/to/folder +function ex() { + if [ -f "$1" ]; then + case "$1" in + *.tar.bz2) tar -jxvf "$1" ;; + *.tar.gz) tar -zxvf "$1" ;; + *.bz2) bunzip2 "$1" ;; + *.dmg) hdiutil mount "$1" ;; + *.gz) gunzip "$1" ;; + *.tar) tar -xvf "$1" ;; + *.tbz2) tar -jxvf "$1" ;; + *.tgz) tar -zxvf "$1" ;; + *.zip | *.ZIP) unzip "$1" ;; + *.pax) cat "$1" | pax -r ;; + *.pax.Z) uncompress "$1" --stdout | pax -r ;; + *.rar) unrar x "$1" ;; + *.Z) uncompress "$1" ;; + *) echo "$1 cannot be extracted/mounted via ex()" ;; + esac + else + echo "$1 is not a valid file" + fi +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Copy and Go +# Description: Copies a file or directory and enters it +# Example usage: cpg source_file.txt destination_directory/ +function cpg() { + if [ $# -ne 2 ]; then + echo "Usage: cpg source destination" + return 1 + fi + + local source="$1" + local destination="$2" + + if [ -d "$source" ]; then + if [ -d "$destination" ]; then + cp -r "$source" "$destination" && cd "$destination/$(basename "$source")" + else + echo "Destination is not a directory: $destination" + return 1 + fi + else + cp "$source" "$destination" + fi +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Make and Go +# Description: Create a new directory and enter it +function mkdirg() { + if [ $# -ne 1 ]; then + echo "Usage: mkdirg directory_name" + return 1 + fi + + local directory_name="$1" + + if [ -d "$directory_name" ]; then + echo "Directory already exists: $directory_name" + return 1 + fi + + mkdir -p "$directory_name" && cd "$directory_name" +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Move and Go +# Description: Move a file or directory and enter it +# Example usage: mvg source_file.txt destination_directory/ +function mvg() { + if [ $# -ne 2 ]; then + echo "Usage: mvg source destination" + return 1 + fi + + local source="$1" + local destination="$2" + + if [ -d "$source" ]; then + if [ -d "$destination" ]; then + mv "$source" "$destination" && cd "$destination/$(basename "$source")" + else + echo "Destination is not a directory: $destination" + return 1 + fi + else + mv "$source" "$destination" + fi +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# UP +# Description: Goes up a specified number of directories ( i.e. up 4 ) +# Example usage: up 2 go up 2 directories +function up() { + local levels=${1:-1} # Set the default level to 1 if not specified + local target="" + + for ((i = 1; i <= levels; i++)); do + target="../$target" + done + + if [ -z "$target" ]; then + target=".." + fi + + cd "$target" || return 1 # Go to the target directory or return an error code if it fails +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Curl +# Description: Use Curl for website health check +# Example usage: health-check example.com +function health-check() { + green="\e[32m" + red="\e[31m" + end="\e[0m" + + if [ -z "$1" ]; then + echo "Please provide a URL to check." + return 1 + fi + + url="$1" + + protocols=("https" "http") + + for protocol in "${protocols[@]}"; do + if curl --head --silent --show-error --fail --location "$protocol://$url"; then + echo -e "$protocol://$url is ${green}UP${end} and running." + return 0 + fi + done + + echo -e "Both https://$url and http://$url are ${red}DOWN${end}" + return 1 +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## + +# Network +# Description: network pings a DNS server in the following order: +# Internal DNS servers: Adguard Home and External: Quad9 DNS servers. +function network() { + GREEN="\e[32m" + RED="\e[31m" + END="\e[0m" + STAMP="$(date +'[%b %d, %Y - %H%M%S]')" + + function log_message() { + local message="$1" + echo -e "$STAMP $message" + } + + function check_ping() { + local host="$1" + if ping -c 1 "$host" >/dev/null; then + return 0 + else + return 1 + fi + } + + log_message "Checking primary DNS server (192.168.3.2)" + if check_ping "192.168.3.2"; then + log_message "Primary DNS server is ${GREEN}UP${END} and running." + else + log_message "Primary DNS server seem to be ${RED}DOWN${END}" + log_message "Checking secondary DNS server (192.168.3.3)" + if check_ping "192.168.3.3"; then + log_message "Secondary DNS server is ${GREEN}UP${END} and running." + else + log_message "Secondary DNS server seem to be ${RED}DOWN${END}" + fi + fi + + log_message "Checking internet connectivity (ping google.com)" + if check_ping "google.com"; then + log_message "Network is ${GREEN}UP${END} and running." + else + log_message "The network seem to be ${RED}DOWN${END}" + log_message "Checking external DNS servers..." + if check_ping "9.9.9.9"; then + log_message "ping to 9.9.9.9 works, we have a DNS failure." + else + log_message "ping to 9.9.9.9 failed, now ping to 149.112.112.112" + if check_ping "149.112.112.112"; then + log_message "ping to 149.112.112.112 also failed, the network has an issue!" + ifconfig >>"DNS failure interface ${STAMP}.txt" + fi + fi + fi +} + +######################################################################################################################## +######################################################################################################################## +######################################################################################################################## diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..5f36f2a --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,167 @@ +################################################################################ +# # +# ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ # +# ██╔══██╗██╔══██╗██╔════╝██║ ██║██╔══██╗██╔════╝ # +# ██████╔╝███████║███████╗███████║██████╔╝██║ # +# ╔██╔══██╗██╔══██║╚════██║██╔══██║██╔══██╗██║ # +# ██║██████╔╝██║ ██║███████║██║ ██║██║ ██║╚██████╗ # +# ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ # +# # +################################################################################ + +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in +*i*) ;; +*) return ;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# Set History format to include timestamps +HISTTIMEFORMAT="%d/%m/%y %T" + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# Set History stop +# set +o history + +# Don't put duplicate lines in the history and do not add lines that start with a space +export HISTCONTROL=erasedups:ignoredups:ignorespace + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in +xterm-color | *-256color) color_prompt=yes ;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + prompt_color='\[\033[1;31m\]' + user_color='\[\033[0m\]' + host_color='\[\033[1;94m\]' + symbol_color='\[\033[1;33m\]' + info_color='\[\033[1;33m\]' + prompt_symbol=@ + if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user + prompt_color='\[\033[1;32m\]' + info_color='\[\033[1;33m\]' + prompt_symbol=@ + fi + PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}('$info_color''$user_color'\u'$symbol_color'${prompt_symbol}'$host_color'\h'$prompt_color')-[\[\033[1;32m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] ' + # BackTrack red prompt + # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\# ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm* | rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) ;; + +esac + +# enable color support of ls, less and man, and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + + alias reload=". ~/.bashrc" + alias ..="cd .." + alias c="clear" + alias cp="cp --recursive --preserve=all --verbose" + alias mv="mv --no-clobber --verbose" + alias l="clear && ls --almost-all -C --ignore='lost+found'" + alias ll="clear && ls --almost-all -C --no-group -l --ignore='lost+found'" + alias ls="clear && ls --color=auto --human-readable --sort='extension' --ignore='lost+found'" + alias t="clear && tree -aAc" + alias tt="clear && tree -aAcDgpRu" + + # Less colors for man pages + export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink + export LESS_TERMCAP_md=$'\E[1;94m' # begin bold + export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink + export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video + export LESS_TERMCAP_se=$'\E[0m' # reset reverse video + export LESS_TERMCAP_us=$'\E[1;32m' # begin underline + export LESS_TERMCAP_ue=$'\E[0m' # reset underline + + # Take advantage of $LS_COLORS for completion as well + LS_COLORS="di=36:ln=35:so=31:pi=33:ex=32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43" + +fi + +# Enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# Exports definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_exports, instead of adding them here directly. +if [ -f ~/.bash_exports ]; then + . ~/.bash_exports +fi + +# Snippets definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_snippets, instead of adding them here directly. +if [ -f ~/.bash_snippets ]; then + . ~/.bash_snippets +fi diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig new file mode 100644 index 0000000..3037e44 --- /dev/null +++ b/dotfiles/.gitconfig @@ -0,0 +1,65 @@ +################################################################################ +# # +# ██████╗ ██╗████████╗ ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗ # +# ██╔════╝ ██║╚══██╔══╝██╔════╝██╔═══██╗████╗ ██║██╔════╝██║██╔════╝ # +# ╔██║ ███╗██║ ██║ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║██║ ███╗ # +# ║██║ ██║██║ ██║ ██║ ██║ ██║██║╚██╗██║██╔══╝ ██║██║ ██║ # +# ██║╚██████╔╝██║ ██║ ╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝ # +# ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ # +# # +################################################################################ + +[user] + name = your name + email = your@email.com + username = your username + # signingkey = + # author.name = + # author.email = + # committer.name = + # committer.email = + +[commit] + # gpgsign = true + +[core] + autocrlf = input + editor = nano + whitespace = fix + + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + +[alias] + br = branch + ch = checkout + co = commit + st = status + hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short + pushfwl = push --force-with-lease + +[credential] + helper = cache --timeout=3600 + +[push] + default = simple + +[color "branch"] + current = yellow reverse + local = yellow + remote = green + +[color "diff"] + frag = magenta bold + meta = yellow bold + new = green bold + old = red bold + +[color "status"] + added = yellow + changed = green + untracked = red + +[maintenance] diff --git a/dotfiles/.nanorc b/dotfiles/.nanorc new file mode 100644 index 0000000..9b56b7d --- /dev/null +++ b/dotfiles/.nanorc @@ -0,0 +1,342 @@ +################################################################################ +# # +# ███╗ ██╗ █████╗ ███╗ ██╗ ██████╗ ██████╗ ██████╗ # +# ████╗ ██║██╔══██╗████╗ ██║██╔═══██╗██╔══██╗██╔════╝ # +# ╔██╔██╗ ██║███████║██╔██╗ ██║██║ ██║██████╔╝██║ # +# ║██║╚██╗██║██╔══██║██║╚██╗██║██║ ██║██╔══██╗██║ # +# ██║██║ ╚████║██║ ██║██║ ╚████║╚██████╔╝██║ ██║╚██████╗ # +# ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ # +# # +################################################################################ + +## This is a system-wide configuration file for the nano editor. +## Each user can save his own configuration to ~/.nanorc +## See the nanorc(5) man page for details. + +## Sample initialization file for GNU nano. +## +## For the options that take parameters, the default value is shown. +## Other options are unset by default. To make sure that an option +## is disabled, you can use "unset