TLC Transients lives here now: https://github.com/markjaquith/WP-TLC-Transients
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 gigaom_script_slug_swap( $pairs ) { | |
global $wpdb; | |
foreach ( $pairs as $pair ) { | |
$_temp_name = $pair[0] . '-gigaom-temp-123456789'; | |
$slugs = "'" . implode( "', '", $pair ) . "'"; | |
$ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_name IN( $slugs ) LIMIT 2" ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $_temp_name ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $pair[0] ) ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $pair[0] ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $pair[1] ) ); | |
$wpdb->update( $wpdb->posts, array( 'post_name' => $pair[1] ), array( 'post_status' => 'publish', 'post_type' => 'post', 'post_name' => $_temp_name ) ); |
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: Employee List | |
Description: Leverages an existing "employee" custom post type to create a shortcode for a list of employees | |
Version: 0.1 | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
function tampa_employee_list() { |
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
#!/bin/bash | |
# | |
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
# modified by mike@mikepearce.net | |
# modified by aconway@[redacted] - handle diffs that introduce new files | |
# modified by t.broyer@ltgt.net - fixes diffs that introduce new files | |
# modified by m@rkj.me - fix sed syntax issue in OS X | |
# | |
# Generate an SVN-compatible diff against the tip of the tracking branch |
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 | |
// Change /*CUSTOMIZE_THIS*/ to a unique name (two places). Go ahead, make it long. | |
// Like, your initials, and your full plugin name. | |
// e.g. MTJ_Some_Awesome_Plugin_Controller | |
/*CUSTOMIZE_THIS*/_Controller::init(); | |
class /*CUSTOMIZE_THIS*/_Controller { | |
function init() { |
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: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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: CWS Posts Per Page | |
Version: 0.1 | |
Description: Sets a custom number of posts to display per page, for specific types of views | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
class CWS_Posts_Per_Page_Plugin { |
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 | |
class FCC_Safe_Harbor_Indecency_Plugin { | |
static $instance; | |
private $seven_dirty = array( | |
'shit(s|ty|head)?' => '{BLEEP}$1', | |
'piss(es|ed|ing)?' => '{BLEEP}$1', | |
'fuck(s|er|ers|ing|ed)?' => '{BLEEP}$1', | |
'cunt([ys])?' => '{BLEEP}$1', | |
'cock(sucker[s]?)' => '{BLEEP}$1', |
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: Disable Comment Querying | |
Description: Disables comment queries | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
The following are useful queries that Apple's Siri has successfully answered, or tasks it has completed
- Where am I?
- Where is my wife?
- Show me {city, state}
- Show me {street address, city, state}
- Where is the closest {business name | business type}?
- Show me {business name | business type} in {city, state}
- Give me directions to {contact}'s {home | house | work}
OlderNewer