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
ls -R | grep -o -P '.{0,11}\]' | cut -c 1-11 | sort -u | xargs -Iytid echo "youtube ytid" > .Downloaded |
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 | |
sudo apt install sqlite3 | |
echo "Please enter the path to your database, should look something like this" | |
echo "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/" | |
read -p "Full path to database [/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/]: " DB_LOC | |
DB_LOC=${DB_LOC:-/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/} | |
FULL_DB_LOC=${DB_LOC}com.plexapp.plugins.library.db | |
sudo cp "${FULL_DB_LOC}" "${FULL_DB_LOC}.backup" | |
sqlite3 "${FULL_DB_LOC}" 'SELECT id, name FROM accounts;' | |
read -p "User id to copy info FROM: " FROM_ID |
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 sure to run this script from where your docker-compose.yml is | |
docker volume ls | grep sonarqube | cut -d ' ' -f 6 | xargs docker volume inspect | grep Mountpoint | cut -d '"' -f 4 | xargs sudo zip -r sonarbk.zip | |
docker-compose down | |
docker-compose pull | |
docker-compose up -d --remove-orphans | |
docker image prune -f |
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
Credit to ninjaroach on reddit for this one (https://www.reddit.com/r/fortinet/comments/cn84v0/cant_remove_forticlient_6/) | |
Run the below command in a elevated command prompt | |
Note that it will restart without warning during this process | |
It took a little while until it looked alive, so don't be put off if it looks like it is hanging, just leave it running | |
wmic product where "name like 'Forti%%'" call uninstall /nointeractive |
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
find . -name "server.properties" | xargs cat | grep server-port | cut -f 2 -d "=" | xargs -n 1 -Ihere upnpc -r here here TCP | |
#Search current directory and subdirectories for minecraft servers and uses uPnP to automatically port forward them all | |
#Method | |
#find the server.properties files, search the with grep for the server-port field, then copy that into upnpc |
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
#Originally inspired by this script https://jc-lan.org/2020/02/05/script-to-automatically-rescan-and-mount-software-iscsi-datastores-on-startup-for-esxi/ | |
#This original script didn't work for me, as it didn't wait until the vm was confirmed on, so would boot loop if the vm didn't boot first time | |
#Designed to go in the ESXI host's local.sh file. This will mean vm autostart will not occur till after this script has executed | |
#Establish our timer | |
count=0 | |
#Power on the guest VM with the specified Vmid |
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 | |
#Conor Shore 2020 | |
#Basic Fan Control Script For Quanta D51B-2U Server via IPMI | |
#designed to be used in init.d | |
### BEGIN INIT INFO | |
# Provides: IPMI Fan Controller | |
# Required-Start: $all | |
# Required-Stop: |