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
docker run -d -p <PORT_OF_YOUR_CHOICE>:6379 redis |
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
sourcefile=$1 | |
destfile=$2 | |
# Overly simple validation | |
if [ ! -e "$sourcefile" ]; then | |
echo 'Please provide an existing input file.' | |
exit | |
fi | |
if [ "$destfile" == "" ]; then |
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
add_filter('wp_mail_from', function($email) { | |
return '[email protected]'; | |
}); | |
add_filter('wp_mail_from_name', function($name) { | |
return get_option('blogname'); | |
}); | |
class email_return_path { | |
function __construct() { |
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
add_filter('json_enabled', '__return_false'); | |
add_filter('json_jsonp_enabled', '__return_false'); | |
remove_action('wp_head', 'rest_output_link_wp_head', 10); | |
remove_action('template_redirect', 'rest_output_link_header', 11, 0); |
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
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'wp_shortlink_wp_head'); | |
remove_action('wp_head', 'feed_links', 2); | |
remove_action('wp_head', 'feed_links_extra', 3); |
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
add_action('template_redirect', 'bwp_template_redirect'); | |
function bwp_template_redirect() { | |
if (is_author()) { | |
wp_redirect(home_url()); | |
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
# 1. Install the requests module for python. | |
# pip install requests | |
# 2. Add script arguments in PlexPy. | |
# {user} {user_id} {ip_address} | |
import requests | |
import sys | |
user = sys.argv[1] | |
user_id = sys.argv[2] |
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
# Fail2Ban configuration file | |
# | |
[Definition] | |
# Notify on Startup | |
actionstart = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been started successfully." https://api.pushover.net/1/messages | |
# Notify on Shutdown | |
actionstop = /usr/bin/curl -s -F "token=<token>" -F "user=<user>" -F "title=[Fail2Ban] <name>" -F "message=Jail <name> has been stopped." https://api.pushover.net/1/messages |
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
# fail2ban filter configuration for nginx, by Sander | |
# 1) Catch WordPress related requests (we don't have WordPress on this server) | |
# 2) Catch requests for certain scripts we don't host | |
# 3) Catch script requests we don't host | |
# 4) Catch referer spam | |
[Definition] | |
failregex = ^<HOST> .* "(GET|POST|HEAD) /+(?i)(wp(-|/)|xmlrpc\.php|\?author=1) | |
^<HOST> .* "(GET|POST|HEAD|PROPFIND) /+(?i)(a2billing|admin|apache|axis|blog|cfide|cgi|cms|config|etc|\.git|hnap|inc|jenkins|jmx-|joomla|lib|linuxsucks|msd|muieblackcat|mysql|myadmin|n0w|owa-autodiscover|pbxip|php|pma|recordings|sap|sdk|script|service|shell|sqlite|vmskdl44rededd|vtigercrm|w00tw00t|webdav|websql|wordpress|xampp|xxbb) |
NewerOlder