This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -i | |
set -euo pipefail | |
shopt -s extglob | |
# As cheap as bash logging gets (without hand-gulping each func to a single line) - relentlessly typed by hand in 7 minutes | |
# - by loopyd. You like this ascii vomit??? drop me some SOL: 7Y7hG3o7o1FDgCUQtiQkN6gDxumTh1QeM9CQKnCHCb2x | |
CSCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
C_RED="\033[31m" C_GREEN="\033[32m" C_YELLOW="\033[33m" C_BLUE="\033[34m" C_CYAN="\033[36m" C_MAGENTA="\033[35m" C_GREY="\033[90m" C_BOLD="\033[1m" C_RESET="\033[0m" | |
QUIET=${QUIET:-0} LOG_FILE=${LOG_FILE:-} LOG_LEVEL=${LOG_LEVEL:-INFO} | |
ENV_CMD="source ${NVM_DIR}/nvm.sh && nvm use 20.18.2 --save && conda activate the-gimp" | |
strip_ansi() { local _msg="$*"; sed -E 's/\x1B\[[0-9;]*[mK]//g; s/^[[:space:]]+//; s/[[:space:]]+$//' <<< "$_msg"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# breathmint.sh - "You need a breath mint!" | |
# [email protected] | |
# Get a fresh copy of a git repository in a specified folder, every time, and inject an .env file placed next to for config | |
# Checks | |
if [ "$EUID" -eq 0 ]; then | |
echo "This script must not be run as root" >&2 | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Block script from running as non-root user | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root" | |
exit 1 | |
fi | |
# Blacklist Nintendo Switch Pro Controller Driver | |
echo blacklist hid_nintendo | tee /etc/modprobe.d/notendo.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# config_ssh.sh - A script to set up your VPS SSH configuration | |
# Author: loopyd <[email protected]> 2024 | GPL3.0 Permassive License | |
# Run this script on your shiny new VPS to harden it and set up SSH keys and passwords. | |
# Note: If you are using a hosting proivder such as hostinger, you need to add the .pub keys in | |
# the dashbaord, as an overlayfs by the provider is used to overwrite the ssh configuration. | |
# | |
# If you experience errors trying to log in, try to add a ~/.ssh/config on your host with the following: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
shopt -s extglob dotglob | |
IMAGE_PATH=${IMAGE_PATH:-} | |
LOADER_PATH=${LOADER_PATH:-} | |
FLASH_OFFSET=${FLASH_OFFSET:-0} | |
ERASE_EMMC_SIZE=${ERASE_EMMC_SIZE:-0} | |
WAIT_DEVICE=${WAIT_DEVICE:-false} | |
WAIT_DEVICE_TIMEOUT=${WAIT_DEVICE_TIMEOUT:-30} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARGS=($*) | |
BOLD=$(tput bold) | |
RED=$(tput setaf 1) | |
GREEN=$(tput setaf 2) | |
BLUE=$(tput setaf 4) | |
RESET=$(tput sgr0) | |
function __run_cmd() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @file deicog/docker.sh | |
# @brief A shell script API to manage Docker resources. | |
# @description This script is a wrapping API used to manage Docker resources like networks, swarms, services, stacks, containers, images, and volumes. It can be sourced as a library, or used as a command-line tool. | |
# @author Robert Smith <[email protected]> | |
# @license MIT License | |
# @version 0.1 | |
# Shell configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# autoclean.sh | Version 0.0.1 | Author: @loopyd | |
# | |
# This script is used to clean up files and folders that are not needed on your linux system | |
# Directories to clean are stored in an associative array with the key being the directory and the value being: | |
# a comma separated list of file or folder names and types. These are compatible arguments for the | |
# find command. The script will search for these files and folders and remove them. | |
# | |
# DATA LOSS WARNING: This script will remove files and folders from your system. Please be careful with it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is used to fix the audio issues on HP Omen 15 laptop | |
# | |
# It installs the latest kernel, updates the sof firmware, removes old kernels, enables real-time audio support and disables mitigations for better performance, as well | |
# as applies additional tweaks to improve the overall system performance and stability on this laptop. | |
# Function to update sof firmware from sof project to the specified version | |
function update_sof() { | |
local sof_firmware_version="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make.sh: Build script for Apache Ant in jenv environment | DeityDurg (2024-01-17) | |
# | |
# This script will download the specified version of Apache Ant, | |
# build it, and install it into the specified jenv environment. | |
# This script will also update the PATH environment variable to | |
# include the ant binary, set the JAVA_HOME environment variable | |
# to the specified jenv environment, and set the ANT_HOME environment | |
# variable to the installed ant directory. |
NewerOlder