Skip to content

Instantly share code, notes, and snippets.

View tmort's full-sized avatar

Tom Morton tmort

View GitHub Profile
map $uri $blogname{
~^(?P<blogpath>/[^/]+/)files/(.*) $blogpath ;
}
map $blogname $blogid{
default -999;
#Ref: http://wordpress.org/extend/plugins/nginx-helper/
#include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;
}
@tmort
tmort / wpsocialite.js
Created January 29, 2013 18:27
WPSocialite.js Modified to load the scrolling icons 100 px before window shows them.
jQuery(function($) {
Socialite.process(); //processing each instance before we take any action. Makes sure pinterest loads individually and not all together.
if ( $("body").hasClass("wpsocialite-scroll") ) { //If set to 'scroll'
var articles = $('.social-buttons'), socialised = { }, win = $(window), updateArticles, onUpdate, updateTimeout;
updateArticles = function()
{
// viewport bounds
@tmort
tmort / gist:4655945
Created January 28, 2013 14:30
Modify WP auto-logout duration
<?php
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return 31556926; // 1 year in seconds
}