• Jul 16, 2023 •LeifMessinger
0 likes • 6 views
#!/bin/bash sudo 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 going exit sudo apt install git cmake cmake-gui sudo mkdir /usr/lib/stb pushd /usr/lib/stb sudo wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.h popd cd ~/Documents git clone https://github.com/Overv/VulkanTutorial.git cd VulkanTutorial/code cmake -S . -B build -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -DSTB_INCLUDEDIR:PATH="/usr/lib/stb" cd build make
• 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"
• Mar 7, 2021 •LeifMessinger
0 likes • 10 views
#!/bin/bash #makefileMaker.sh by Leif Messinger #Needs getDependencies.sh CC="gcc" #I have no idea why it's called CXX when it's a c++ compiler #I know that cpp is c pre processor, but still, why X? CXX="g++" CXXFLAGS="-std=c++17 -O2" #CFLAGS="-std=c17" LIBRARIES="$@" #Vulkan Flags for me #LIBRARIES="-lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi" function compileAllFiles(){ #output: bruh.o yeet.o # CXX $CXXFLAGS bruh.o yeet.o -o output $LIBRARIES echo -n "output:" if compgen -G "*.cpp" &> /dev/null; then for f in *.cpp; do echo -n " ${f%.cpp}.o" done fi if compgen -G "*.c" &> /dev/null; then for f in *.c; do echo -n " ${f%.c}.o" done fi echo "" if compgen -G "*.cpp" &> /dev/null; then echo -e -n "\t$CXX $CXXFLAGS " else echo -e -n "\t$CC $CFLAGS " fi if compgen -G "*.cpp" &> /dev/null; then for f in *.cpp; do echo -n " ${f%.cpp}.o" done fi if compgen -G "*.c" &> /dev/null; then for f in *.c; do echo -n " ${f%.c}.o" done fi echo " -o output $LIBRARIES" echo "" } function compileAllObjectFiles(){ #bruh.o: bruh.cpp yeet.h # CXX $CXXFLAGS -c bruh.cpp $LIBRARIES if compgen -G "*.cpp" &> /dev/null; then for f in *.cpp; do echo -n "${f%.cpp}.o: $f" getDependencies.sh < $f echo "" echo -e "\t$CXX $CXXFLAGS -c $f" echo "" done fi #yeet.o: yeet.c # CC $CFLAGS -c yeet.c $LIBRARIES if compgen -G "*.c" &> /dev/null; then for f in *.c; do echo -n "${f%.c}.o: $f" getDependencies.sh < $f echo "" echo -e "\t$CC $CFLAGS -c $f" echo "" done fi } compileAllFiles compileAllObjectFiles #does not work on windows echo "clean:" echo -e "\trm -f -v *.o output" echo "" echo "run:" echo -e "\t./output" echo "" echo "debug:" if compgen -G "*.cpp" &> /dev/null; then echo -e -n "\t$CXX $CXXFLAGS -g " else echo -e -n "\t$CC $CFLAGS -g " fi if compgen -G "*.cpp" &> /dev/null; then for f in *.cpp; do echo -n " ${f}" done fi if compgen -G "*.c" &> /dev/null; then for f in *.c; do echo -n " ${f}" done fi echo " $LIBRARIES -o output" echo ""
• Nov 17, 2021 •LeifMessinger
#!/bin/bash #Takes command line arguments and pulls the header files. #Good for checking if the function you want is in the header or not. #cppToStdout.sh "time.h" while [ "$1" != "" ]; do echo "#include<$1>" | g++ -x c++ -E - shift done
• 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."
• Mar 10, 2023 •Helper
1 like • 6 views
#!/bin/bash for branch in $(git branch | cut -c 3-); do read -p "Delete local branch $branch? (y/n) " -n 1 -r echo "" if [[ $REPLY =~ ^[Yy]$ ]]; then git branch -D $branch fi done