• Nov 8, 2021 •LeifMessinger
0 likes • 1 view
#!/bin/bash #Installs the Vulkan library and other goodies. Works on Arch and Arch based distros. Needs pacman and makepkg installVulkan(){ #Tries installing every linux package in existence packages=( vulkan-tools libvulkan-dev vulkan-loader-devel vulkan-validation-layers spirv-tools mesa-vulkan-devel vulkan-validation-layers-devel ) for package in ${packages[*]}; do sudo pacman --noconfirm -S $package done } 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 #done sudo git clone https://aur.archlinux.org/glfw-git.git /tmp/glfw-git sudo chmod 777 /tmp/glfw-git cd /tmp/glfw-git makepkg -si sudo git clone https://aur.archlinux.org/glm-git.git /tmp/glm-git sudo chmod 777 /tmp/glm-git cd /tmp/glm-git makepkg -si } installShaderCompiler(){ #Basically installs glslc sudo pacman -S shaderc } while true; do select bruh in installVulkan installLibraries installShaderCompiler "exit"; do $bruh done done
• Nov 4, 2023 •LeifMessinger
0 likes • 7 views
#!/bin/bash git status echo "Do you want to add all changed files?" select yn in "Yes" "No"; do case $yn in Yes ) break;; No ) exit 1;; esac done git add -u git status echo "Does this look right?" select yn in "Yes" "No"; do case $yn in Yes ) break;; No ) exit 2;; esac done git commit echo "Do you want to push?" select yn in "Yes" "No"; do case $yn in Yes ) break;; No ) exit 2;; esac done git push
• Jul 29, 2024 •AustinLeath
for region in `aws ec2 describe-regions --output text | cut -f4` do echo -e "\nListing Instances in region:'$region'..." aws ec2 describe-instances --query 'Reservations[*].Instances[*].{Instance:InstanceId,Subnet:SubnetId}' --region $region done #This script is to be used with any AWS CLI configured environment, it will list any EC2 instances and their associated subnet network ID's in JSON format
• Nov 18, 2022 •AustinLeath
0 likes • 9 views
#for ssh abuse attempts action = %(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"
• Jul 8, 2024 •C S
0 likes • 17 views
#!/bin/bash # Set the directory to search DIRECTORY="src" # Set the output file OUTPUT_FILE="testids.txt" # Clear the output file > "$OUTPUT_FILE" # Find all .tsx files in the specified directory and its subdirectories find "$DIRECTORY" -type f -name "*.tsx" | while read -r FILE do # Search for instances of 'data-testid="testid"' and append them to the output file grep -o 'data-testid="[^"]*"' "$FILE" >> "$OUTPUT_FILE" # Search for instances of "'data-testid': 'testid'" and append them to the output file grep -o "'data-testid': '[^']*'" "$FILE" >> "$OUTPUT_FILE" done echo "Search complete. Test IDs written to $OUTPUT_FILE."
• Nov 19, 2022 •CodeCatch
name="John" echo ${name} echo ${name/J/j} #=> "john" (substitution) echo ${name:0:2} #=> "Jo" (slicing) echo ${name::2} #=> "Jo" (slicing) echo ${name::-1} #=> "Joh" (slicing) echo ${name:(-1)} #=> "n" (slicing from right) echo ${name:(-2):1} #=> "h" (slicing from right) echo ${food:-Cake} #=> $food or "Cake"