Skip to content

Instantly share code, notes, and snippets.

@NerdOfLinux
NerdOfLinux / aff-link.md
Created January 23, 2019 01:34
Affiliate Link Disclaimer: Feel Free to Use(embeddable in Medium)
@NerdOfLinux
NerdOfLinux / gist-embed-no-js.php
Created January 13, 2019 23:04
Embed gist in PHP no JS
// Your gist JS file is the src from the embed code
$gist = file_get_contents( "your_gist_js_file_here" );
echo stripcslashes( preg_replace( "/document.write\('(.*)'\)/", "$1", $gist ) );
@NerdOfLinux
NerdOfLinux / nginx-wpsc-mobile.conf
Last active November 12, 2020 04:21
WP Super Cache NGINX rules without changing the location block and with mobile support
# Based heavily off W3 Total Cache NGINX rules and WP Super Cache on https://codex.wordpress.org/Nginx
set $w3tc_rewrite 1;
if ($request_method = POST) {
set $w3tc_rewrite 0;
}
if ($query_string != "") {
set $w3tc_rewrite 0;
}
if ($request_uri !~ \/$) {
@NerdOfLinux
NerdOfLinux / nginx-wpsc.conf
Last active November 12, 2020 04:20
WP Super Cache NGINX rules without changing the location block
# Based heavily off W3 Total Cache NGINX rules and WP Super Cache on https://codex.wordpress.org/Nginx
set $w3tc_rewrite 1;
if ($request_method = POST) {
set $w3tc_rewrite 0;
}
if ($query_string != "") {
set $w3tc_rewrite 0;
}
if ($request_uri !~ \/$) {