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
#!/usr/bin/env bash | |
# | |
######* Install and setup Docker ###### | |
if [ ! -f /usr/bin/docker ] || [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
# | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
# | |
echo \ |
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
.PHONY: start down destroy stop pull restart logs | |
.DEFAULT_GOAL := restart | |
start: | |
docker compose up -d --remove-orphans $(c) | |
down: | |
docker compose down $(c) | |
destroy: |
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
EMAIL= | |
DOMAIN0= | |
DOMAIN1= | |
API_EMAIL= | |
API_TOKEN= |
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
#!/usr/bin/env bash | |
read -p "Question (y/N)? " answer | |
case ${answer:-n} in | |
y|Y ) | |
echo Yes | |
;; | |
n|* ) | |
echo No | |
;; |
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 | |
#* Vars | |
CONTROLLER=*controller* | |
USERNAME=RAID | |
STATUS=`sudo tw_cli info "$CONTROLLER" | grep "RAID"` | |
OK=`echo "$STATUS" | grep "OK"` | |
HOOK_URL=https://hooks.slack.com/services/****/****/**** | |
# | |
function slackNotify() { | |
curl -X POST -H 'Content-type: application/json' --data '{"username": "'$USERNAME'", "attachments": [{"color": "'$COLOR'", "text": "```'"$MESSAGE"'```"}]}' "$HOOK_URL" |
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
#!/usr/bin/env bash | |
#Sudo check | |
if (( $EUID != 0 )); then | |
echo -e "\nPlease run as root or use sudo\n" | |
exit | |
fi | |
# OS checks | |
arch=$(uname -s) |
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
// All you need to do is add a font that has pretty good itlaics support i.e Fira, Operator, etc. and then add these two params to your existing User settings. | |
{ | |
"editor.fontFamily": "'Operator Mono', Menlo, Monaco, 'Courier New', monospace", | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": [ | |
"comment", | |
"keyword.control", |
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 | |
# | |
# This script automatically converts a directory of video files to H.265 HEVC with HandBrake and deletes the old files. | |
# | |
if [ -z "$1" ]; then | |
SRC="." | |
else | |
SRC="$HOME/$1" | |
fi | |
find "$SRC" -iregex '.*\.\(mkv\|avi\)$' -exec bash -c 'HandBrakeCLI -i "$1" -o "${1%\.*}".mp4 -e x265 -q 22 -E av_aac --custom-anamorphic --keep-display-aspect' __ {} \; && find "$SRC" -iregex '.*\.\(mkv\|avi\)$' -exec rm -r {} \; |
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
#!/usr/bin/env bash | |
# | |
## | |
### Fix file pemissions | |
### dirs 755 files 644 | |
## | |
# | |
CWD="$(pwd)" |
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
#!/usr/bin/env bash | |
# | |
# A script for monitoring Exim undelivered mail queue. | |
# intended to be used in conjunction with a cron job. | |
# | |
# Email recipient | |
alertEmail=#Add email here. | |
# Set the alert threshold here | |
queueThreshold=100 |