This file contains hidden or 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/sh | |
EXTENSIONS=/home/kyle/.vscode/extensions | |
find "$EXTENSIONS" -type f -iname "intelephense.js" -exec sh -c "\ | |
printf 'Patching intelephense activation...'; \ | |
sed -re 's/set activationResult\(e\)\s*\{[^\}]+\}/set activationResult(e){return true}/g' -i '{}';\ | |
sed -re 's/isActive\(\)\s*\{[^\}]+\}/isActive(){return true}/g' -i '{}';\ | |
sed -re 's/isRevoked\(\)\s*\{[^\}]+\}/isRevoked(){return false}/g' -i '{}';\ | |
sed -re 's/isExpired\(\)\s*\{[^\}]+\}/isExpired(){return false}/g' -i '{}';\ |
This file contains hidden or 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 | |
process() | |
{ | |
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit 1; | |
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent" | |
} | |
# if input is a file, perform on each line | |
if [ -f "$1" ]; then |
This file contains hidden or 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/sh | |
# mysqlbackup.sh | |
# performs full or diff backups of a mysql database | |
# The directory where backups live | |
DIR="/srv/media/.backup" | |
# The mysqldump command and parameters | |
MYSQL="/usr/bin/mysqldump --all-databases --single-transaction --events --routines --triggers" |
This file contains hidden or 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 | |
NUM=0; | |
EXTENSIONS='webm|jpg'; | |
if test -z "$1"; then | |
echo "no argument"; | |
exit 1; | |
fi |