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
<!-- | |
This is the standard Javascript embed code for a WuFoo form with an | |
added var (iamnotscrolling) that delays a scroll to the top of the form | |
on submit or error. | |
We are hijacking the resizeDone function which fires after the form is | |
modified (this may have unintended consequences). | |
--> |
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
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-22762790-1']); | |
// DELAY _gaq.push(['_trackPageview']); | |
(function () { | |
var ga = document.createElement('script'); | |
ga.type = 'text/javascript'; | |
ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; |
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
function rollback_jquery() { | |
wp_deregister_script('jquery'); | |
wp_enqueue_script('jquery-1.7.2','http://code.jquery.com/jquery-1.7.2.min.js'); | |
} | |
add_action('wp_enqueue_scripts','rollback_jquery',100); |
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
// Replace existing definition in your wp-config.php | |
// define('WP_DEBUG',false); | |
if( !isset($_COOKIE['likeaboss']) and isset($_GET['likeaboss']) ) | |
setcookie('likeaboss',($_GET['likeaboss']=='fosho'?'fosho':false), time()+3600); | |
define('WP_DEBUG',((isset($_COOKIE['likeaboss']) and $_COOKIE['likeaboss']=='fosho')?true:false)); | |
// Drop ?likeaboss=fosho on your URL to enable WP_DEBUG for a bit | |
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
$(document).on('pagechange',function(e,ui){ | |
$('a[href^="#"]',ui.toPage).on('click',function(){ | |
var selector = 'a[name="'+($(this).attr('href').substring(1))+'"]', | |
target = $(selector).get(0).offsetTop; | |
$.mobile.silentScroll(target) | |
return false; | |
}); | |
}); |
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 | |
global $post; | |
$which_parent = empty($post->post_parent) ? get_the_ID() : $post->post_parent; | |
if( is_page() and get_children('post_status=publish&post_type=page&numberposts=1&post_parent='.$which_parent) ): | |
?> | |
<li id="widget-child-nav" class="widget"> | |
<a href="<?php echo get_permalink($which_parent); ?>"> | |
<h2 class="widgettitle"><?php echo get_the_title($which_parent); ?> Menu</h2> | |
</a> | |
<ul> |
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: MU Clear Permalinks | |
Plugin URI: https://gist.github.com/dalethedeveloper/5492196 | |
Description: Clear all site permalinks when Update Network is used | |
Author: dalethedeveloper | |
Version: 0.1 | |
*/ | |
if( ! function_exists('rhplive_clear_permalinks') ): |
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
#/!/bin/bash | |
# Most of the tweaks here are wrapped up in gmailmig | |
# https://code.google.com/p/gmailmig/ | |
# | |
# Props to brave folks who figured this out before me | |
# http://imapsync.lamiral.info/FAQ | |
# http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration | |
# http://seagrief.co.uk/2010/12/moving-to-google-apps-with-imapsync/ | |
# http://blog.mcfang.com/tag/imapsync/ | |
# |
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 | |
/* | |
If you don't know a user_id of an admin, find one with $wpdb->query(): | |
SELECT user_id,meta_value FROM {$wpdb->prefix}usermeta WHERE meta_key = 'nickname' | |
AND user_id IN | |
(SELECT user_id FROM {$wpdb->prefix}usermeta WHERE meta_value LIKE '%administrator%'); | |
+---------+------------+ | |
| user_id | meta_value | |
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
<!DOCTYPE html> | |
<head> | |
<style> | |
.event_wrap {border: 1px solid #ddd; padding: 10px;margin: 20px} | |
span.clear-filter {text-decoration:underline;background-color:blue;cursor:pointer;color:white;margin-left:5px} | |
.current-tax {font-weight:bold} | |
</style> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.0.js"></script> | |
<script> | |
(function ($) { |