This file contains hidden or 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
<head> | |
<esi:include src="/wp-content/themes/random/header-esi.php"/> | |
</head> |
This file contains hidden or 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
sub vcl_fetch { | |
set beresp.do_esi = true; | |
if (req.url ~ "header-esi.php"){ | |
std.log("ESI found, don't cache, pass to nginx"); | |
set client.identity = clusternginx; | |
return(hit_for_pass); | |
} |
This file contains hidden or 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 require_once('/var/www/wordpress/wp-load.php'); ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
jQuery('header.top-head').css('background-image', 'url(<?php header_image(); ?>)'); | |
}); | |
</script> |
This file contains hidden or 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
set $posting 0; # Make sure to declare it first to stop any warnings | |
if ($request_method = POST) { # Check if request method is POST | |
set $posting N; # Initially set the $posting variable as N | |
} | |
if ($geoip_country_code ~ (BR|CN|KR|RU|UA) ) { # Here we're using the Nginx GeoIP module to block some spammy countries | |
set $posting "${posting}O"; # Set the $posting variable to itself plus the letter O | |
} |
This file contains hidden or 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
.user-select(@user-select) { | |
-webkit-touch-callout: @user-select; | |
-webkit-user-select: @user-select; | |
-khtml-user-select: @user-select; | |
-moz-user-select: @user-select; | |
-ms-user-select: @user-select; | |
user-select: @user-select; | |
} |
This file contains hidden or 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
# The final "error" text at the end of the next line is crucial | |
# You can also use any of the following in it's place: | |
# "debug | info | notice | warn | error | crit | alert | emerg" | |
error_log /dir/to/your/nginx/site.log error; |
This file contains hidden or 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 to get a blog/site's domain mapped url. | |
// | |
// You need to call it with a blog ID | |
// | |
// Example: | |
// $custom_blog_id = '14'; | |
// echo get_domain_mapped_url( $custom_blog_id ); | |
// |
This file contains hidden or 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: WPMU Power Tools | |
* Plugin URI: http://plugins.paidtoblog.com/wpmu-power-tools/ | |
* Description: A few powerfull tools that every WPMU Admin should have. | |
* Author: Brian Freeman (aka MrBrian) | |
* Version: 0.7 | |
*/ | |
/* Some sample snippet codes for PHP Executor (feel free to send in yours) |
This file contains hidden or 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
hdiutil makehybrid -o ~/Downloads/Win8.iso ~/Downloads/SW_DVD5_Win_Pro_8_64BIT_English_MLF_X18-16134/ -iso -joliet |
This file contains hidden or 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
jQuery('a:not([href^=mailto]):not(".bsub")').click(function() { | |
var location = jQuery(this).attr('href'); | |
jQuery('#content').animate({ | |
opacity: 0 | |
}, 250); | |
jQuery('.bounce').animate({ | |
left: -500 | |
}, 300, function() { | |
document.location = location; | |
}); |