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
# fonts only: | |
location ~* \.(eot|ttf|woff|woff2)$ { | |
add_header Access-Control-Allow-Origin *; | |
} | |
# all crossed, just remove the POST Methods if you don't want writes on the resource: | |
location ~* { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; |
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/sh | |
WP_OWNER=lamedude # <-- wordpress owner (usually also ftp-username) | |
WP_GROUP=psaserv # <-- wordpress group | |
WP_ROOT=/var/www/vhosts/somesite.tld/httpdocs # <-- wordpress root directory, note it's the docroot here, not wp default | |
WS_GROUP=psacln # <-- webserver group | |
# reset to safe defaults | |
find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \; | |
find ${WP_ROOT} -type d -exec chmod 2755 {} \; |
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/sh | |
# backup files files from server to server using ssh/rsync | |
# encrypt heavily using openssl before transfer to less secure location | |
# create the files | |
tar -zcpf /somepath/etc.tar.gz -C / etc | |
# tar -cv --exclude='root/io'-f /somepath/root.tar -find /root ! -type l | |
mysqldump --dump-date -uwp_admin -pSomedbpass -h localhost wordprass > /somepath/zichtbaar.sql |
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/sh | |
# This script runs every other night at 04:56 CET on a webserver I maintain | |
# Results are always at: https://jult.net/block.txt ( or https://jult.net/block.txt.gz ) | |
# And much smaller, stripped of BS; https://jult.net/bloc.txt | |
# For use in Tixati IP filter: https://jult.net/bloc.txt.gz !!! | |
# And finally a txt file with just the bold IP-ranges: https://jult.net/bl.txt (or https://jult.net/bl.txt.gz ) | |
# Download open block-lists, unpack, filter: | |
curl -s https://www.iblocklist.com/lists.php | grep -A 2 Bluetack | xargs wget -qO - --limit-rate=500k | gunzip -f | egrep -v '^#' > /tmp/xbp |
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 | |
# We create a new /tmp/block file first, then append to it | |
# the 'sleep 1's are inserted because we suffered from slow/delayed disk cache writes | |
# which often caused this script to skip or not entirely finish pasting lists | |
wget -qO - --limit-rate=1500k https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt > /tmp/block | |
sleep 1 | |
wget -qO - --limit-rate=1500k https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts >> /tmp/block | |
sleep 1 |
NewerOlder