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
<?php | |
/** | |
* Plugin Name: Clear PHP opcode caches | |
* Plugin URI: https://www.saotn.org/wordpress-plugin-flush-php-opcache/ | |
* Donate URI: https://www.paypal.me/jreilink | |
* Description: Purges various PHP opcode and user caches. Currently it tries to clear / purge / flush PHP OPcache and WinCache caches from your web server's memory. This should ease WordPress updates and plugin activation / deactivation. | |
* Network: True | |
* Version: 1.2 | |
* Author: Jan Reilink | |
* Author URI: https://www.saotn.org |
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
<httpCookies httpOnlyCookies="true" requireSSL="true" /> | |
<!-- With domain: <httpCookies domain="www.saotn.org" httpOnlyCookies="true" requireSSL="true" /> --> |
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
<machineKey | |
validationKey="AutoGenerate,IsolateApps" | |
decryptionKey="AutoGenerate,IsolateApps" | |
validation="AES" decryption="Auto" | |
/> |
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
<?php | |
/** | |
* Plugin Name: Make Read Only & Clear Read Only WordPress | |
* Plugin URI: https://www.saotn.org | |
* Description: Makes all WordPress files read-only after updates, and writable just before updates. This should ease WordPress updates when it's read-only on the file system. Please donate <a rel="nofollow" target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=J24FGGU96YSUY" title="donate to Sysadmins of the North in Dollars">$2.50 USD</a> (or <a rel="nofollow" target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QLX4RPPL3L8LY" title="donate to Sysadmins of the North in Euros">€ 2,50 Euro</a>) through PayPal to support me in my research time and hosting costs. | |
* Network: True | |
* Version: 1.0 | |
* Author: Jan Reilink | |
* Author URI: https://www.saotn.org | |
* License: GPLv2 |
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
--- cache_enabler_disk.class.php.org 2016-09-26 07:24:22.000000000 +0200 | |
+++ cache_enabler_disk.class.php 2016-10-24 16:33:54.145108306 +0200 | |
@@ -24,7 +24,9 @@ | |
*/ | |
const FILE_HTML = 'index.html'; | |
+ const FILE_HTML_MOBILE = 'index-mobile.html'; | |
const FILE_GZIP = 'index.html.gz'; | |
+ const FILE_GZIP_MOBILE = 'index-mobile.html.gz'; | |
const FILE_WEBP_HTML = 'index-webp.html'; |
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
<?php | |
/* | |
* https://www.saotn.org/enable-http-strict-transport-security-hsts-on-iis/ | |
* follow me on Twitter: @Jan_Reilink | |
*/ | |
add_action( 'send_headers', 'saotn_add_hsts_header' ); | |
function saotn_add_hsts_header() { | |
header( 'Strict-Transport-Security: max-age=31536000; includeSubDomains; preload' ); | |
} |
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
<?php | |
/** | |
* Disable PHP script execution for WordPress wp-content/uploads folder. | |
* - based off the WordPress permalinks rewrite code | |
* | |
* - https://www.saotn.org/secure-wordpress-uploads-folder-disable-php-execution/ | |
* - follow me on twitter: @Jan_Reilink | |
* | |
* don't allow this file to be loaded directly | |
*/ |
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
<?php | |
function saotn_post_prerender_prefetch() { | |
/* follow me on Twitter: @Jan_Reilink */ | |
$next_post = get_next_post(); | |
$prev_post = get_previous_post(); | |
if ( !empty( $next_post ) ) { | |
echo '<link rel="prefetch" href="'.get_permalink( $next_post->ID ).'" /> | |
<link rel="prerender" href="'.get_permalink( $next_post->ID ).'" />'; | |
} | |
if ( !empty( $prev_post ) ) { |
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
<?php | |
/* | |
* enqueue adsbygoogle.js in the footer & | |
* create a WordPress shortcode with your Google AdSense code | |
* follow me on Twitter: @Jan_Reilink | |
*/ | |
function saotn_loadAdsByGoogleJs() { | |
wp_register_script( 'google-adsense', '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', '', '', true ); | |
wp_enqueue_script( 'google-adsense' ); |
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
# blacklistcheck.ps1 - PowerShell script to check | |
# an IP address blacklist status | |
# | |
# Follow me on Twitter: @Jan_Reilink | |
# | |
# Steps: | |
# 1. IPv4 IP address input from the command-line: | |
# .\blacklistcheck.ps1 1.2.3.4 | |
# 2. reverse the IP address: 1.2.3.4 becomes 4.3.2.1 | |
# 3. append the blacklist zone, e.g .cbl.abuseat.org. |