Loading...
More Shell Posts
#!/bin/bashsudo apt install build-essential vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools libglfw3-dev libglm-dev libtinyobjloader-dev#The rest of this downloads the Vulkan Tutorial project and its dependencies.#Comment this out to keep goingexitsudo apt install git cmake cmake-guisudo mkdir /usr/lib/stbpushd /usr/lib/stbsudo wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.hpopdcd ~/Documentsgit clone https://github.com/Overv/VulkanTutorial.gitcd VulkanTutorial/codecmake -S . -B build -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -DSTB_INCLUDEDIR:PATH="/usr/lib/stb"cd buildmake
# Run "test" script on all packagesnpm run test --workspaces# Tip - this also works:npm run test -ws----------------------------------------------------# Runs "test" only on package-anpm run test --workspace package-a# Tip - this also works:npm run test -w package-a----------------------------------------------------# Install `lodash` on `package-a`npm install lodash --workspace package-a# Install `tap` on `package-b` as a dev dependencynpm install tap --workspace package-b --save-dev# Install `package-a` on `package-b`npm install package-a --workspace package-b# Install `eslint` in all packagesnpm install eslint --workspaces
#!/bin/bash#Installs the Vulkan library and other goodies. Works on Arch and Arch based distros. Needs pacman and makepkginstallVulkan(){#Tries installing every linux package in existencepackages=( vulkan-tools libvulkan-dev vulkan-loader-devel vulkan-validation-layers spirv-tools mesa-vulkan-devel vulkan-validation-layers-devel )for package in ${packages[*]}; dosudo pacman --noconfirm -S $packagedone}installLibraries(){#All of these packages don't exist, so we have to download and install the AUR packages#packages=( libglfw3-dev glfw-devel libglm glm-devel )#for package in ${packages[*]}; do# sudo pacman --noconfirm -S $package#donesudo git clone https://aur.archlinux.org/glfw-git.git /tmp/glfw-gitsudo chmod 777 /tmp/glfw-gitcd /tmp/glfw-gitmakepkg -sisudo git clone https://aur.archlinux.org/glm-git.git /tmp/glm-gitsudo chmod 777 /tmp/glm-gitcd /tmp/glm-gitmakepkg -si}installShaderCompiler(){#Basically installs glslcsudo pacman -S shaderc}while true; doselect bruh in installVulkan installLibraries installShaderCompiler "exit"; do$bruhdonedone
#!/bin/shBAT_LOW=15BAT_CRITICAL=5if [ "$1" = "--help" ]thenprintf "Usage:\tbattery_check.sh warning%% hibernate%%Description:\tA script for notifying the user via dunst and logging when\tthe battery is low and the system is going to hibernate.\tCan be supplied arguments for the battery low warning and\thibernation percentage thresholds as the first and second arguments.\t Default behavior is to warn at 15% and hibernate at 5%."exitfiif [[ -n "$1" && -n "$2" && $1 -gt $2 ]]thenBAT_LOW=$1BAT_CRITICAL=$2fiacpi -b | awk -F'[,:%]' '{print $2, $3}' | {read -r status capacityecho Low threshold: $BAT_LOW, Hibernate threshold: $BAT_CRITICALecho Status: $status, Capacity: $capacityif [ "$status" = Discharging -a "$capacity" -le $BAT_CRITICAL ]; thenecho Battery critical threshold.dunstify -u critical "Critical battery threshold, hibernating..."logger "Critical battery threshold, hibernating..."sleep .5systemctl hibernateexitfiif [ "$status" = Discharging -a "$capacity" -le $BAT_LOW ]; thenecho Battery low threshold.dunstify -u critical 'Battery low! System will hibernate at 5%.'logger 'Battery low! System will hibernate at 5%.'sleep .5light -S 15exitfi}
#for ssh abuse attemptsaction = %(action_)s%(action_abuseipdb)s[abuseipdb_apikey="", abuseipdb_category="18,22"]actionban = curl --fail --ciphers ecdhe_ecdsa_aes_256_sha --data 'key=<abuseipdb_apikey>' --data-urlencode 'comment=<matches>' --data 'ip=<ip>' --data 'category=<abuseipdb_category>' "https://www.abuseipdb.com/report/json"
## Austin Leath# checks for /Desktop symlink. Creates the symlink if it doesnt already exist##Fetch the target user if desired, otherwise use the currently logged in user.if [ "$4" != "" ]; thenTARGET_USER=$4elseTARGET_USER=$3fiif [ "$5" != "" ]; thenDIRECTORY_NAME=$5elseTARGET_USER="$3 Desktop"fi# FunctionsCHECK_SYMLINK() {if test -f "/Desktop"; thenecho "/Desktop exists"elseecho "/Desktop does not exist"fi}CHECK_SYNTHETIC_CONF() {if test -f "/etc/synthetic.conf"; thenecho "/etc/synthetic.conf exists"elseecho "/etc/synthetic.conf does not exist"fi}CREATE_SYMLINK() {if [[ $(CHECK_SYNTHETIC_CONF) != "/etc/synthetic.conf exists" ]]; thenecho "/etc/synthetic.conf does not exist. creating.."touch /etc/synthetic.confchown -R root:wheel /etc/synthetic.conffiif grep -q "$DIRECTORY_NAME" /etc/synthetic.conf; thenecho "$DIRECTORY_NAME already exists"exit 1elseecho "$DIRECTORY_NAME\t/Users/$TARGET_USER/Desktop" >> /etc/synthetic.conffiecho "/Desktop symbolic link created"}if [[ $(CHECK_SYMLINK) != "/Desktop exists" ]]; thenCREATE_SYMLINKfiexit 0