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
(shared_settings_static) { | |
encode zstd gzip | |
file_server { | |
precompressed zstd br gzip | |
} | |
import logging | |
header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" | |
header X-XSS-Protection "1; mode=block" | |
header X-Frame-Options DENY | |
header Content-Security-Policy "upgrade-insecure-requests;" |
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
(strip-www) { | |
@www.{args[0]} host www.{args[0]} | |
redir @www.{args[0]} {scheme}://{args[0]}{uri} 308 | |
} | |
(add-www) { | |
@{args[0]} host {args[0]} | |
redir @{args[0]} {scheme}://www.{args[0]}{uri} 308 | |
} |
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
(logins) { | |
franta $2a$14$Z7r89DNih.WfqMbw9K/vkuSfp7pQi10ws1MND4KsktZ1hbJtOCFNK | |
} |
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
(logging) { | |
log { | |
output file /var/log/caddy/access.log { | |
roll_size 1gb | |
roll_keep 1 | |
roll_keep_for 720h | |
} | |
} | |
} |
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 | |
if ! command -v curl; then apt -y install curl; fi | |
curl https://dl.cloudsmith.io/public/caddy/stable/gpg.key > /etc/apt/trusted.gpg.d/caddy.asc | |
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/caddy.asc] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main' >/etc/apt/sources.list.d/caddy.list | |
chmod 644 /etc/apt/{trusted.gpg.d/caddy.asc,sources.list.d/caddy.list} | |
apt update | |
apt install caddy -y | |
exit |
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 | |
MSSQL_HOST="localhost" | |
BACKUP_DIR="/data/mssql/backup/" | |
BACKUP_DAYS=4 | |
MSSQL_USER="sa" | |
MSSQL_PASS='' | |
MSSQL_EXEC="/opt/mssql-tools/bin/sqlcmd" | |
DATE="$(date +%Y%m%d)" | |
# Set Backup Parameters |
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 | |
optidir="$*" | |
fronta="$(mktemp)" | |
find "${optidir}/" -type f -iname *.jpg -exec du -a {} + | sort -n -r | cut -f 2 >"$fronta" | |
while read line | |
do | |
printf "%s\n" "$line" |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Do you need to setup new MySQL database? (y/n)" | |
read -e setupmysql | |
if [ "$setupmysql" == y ] ; then | |
echo "MySQL Admin User: " | |
read -e mysqluser |
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 is a modified file /etc/network/if-up.d/miredo, replace it there. | |
#prerequisites: miredo autostart enabled, curl installed. | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
ipv6=$(ip a | grep -s -i -o '200[1-2]\:[a-f0-9\.:]*' | head -n 1) | |
hostname="yourhostnameat.dynv6.net" | |
token="yourtokenatdynv6.net" |