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: feed-pseudo-widget | |
Plugin URI: http://wordpress.org/# | |
Description: feed-pseudo-widget | |
Author: Matt Martz | |
Version: 1.0 | |
Author URI: http://sivel.net/ | |
*/ |
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 | |
add_filter('wp_list_pages_excludes', 'remove_others_children'); | |
function remove_others_children($excludes = array()) { | |
$all_pages = get_pages(); | |
$all_children = (array) get_page_children(true, $all_pages); | |
foreach ( $all_children as $child ) | |
$excludes[] = $child->ID; | |
if ( ! is_page() ) | |
return $excludes; |
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 | |
$attachments = get_children('&post_type=attachment&post_mime_type=image&post_parent=true'); | |
foreach ( $attachments as $attach ) | |
echo "<a href='" . get_permalink($attach->post_parent) . "'><img src='" . wp_get_attachment_thumb_url($attach->ID) . "' alt='' /></a>"; | |
?> |
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: Sivel CDN | |
Plugin URI: http://sivel.net/ | |
Description: Points media urls at a CDN | |
Version: 1.0 | |
Author: Matt Martz | |
Author URI: http://sivel.net/ | |
*/ |
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 | |
/* | |
This PHP script will function as a URL Shortening endpoint for Google Apps | |
Short Links. | |
Copyright (C) 2010 Matt Martz <matt@sivel.net> (http://sivel.net/) | |
This program is released under the GNU General Public License version 2 | |
http://www.gnu.org/licenses/gpl-2.0.txt | |
This program is free software; you can redistribute it and/or |
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: Better Cache Bust | |
Plugin URI: http://sivel.net/ | |
Description: Moves the resource version in the URL path instead of as a query var | |
Version: 1.0 | |
Author: Matt Martz | |
Author URI: http://sivel.net/ | |
*/ |
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 | |
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) | |
add_action( 'wp_footer', 'the_queries' ); | |
function the_queries() { | |
global $wpdb; | |
if ( defined( 'LOGQUERIES' ) && LOGQUERIES ) { | |
foreach ( $wpdb->queries as $query ) | |
error_log( trim( $query[0] ) . "\n", 3, WP_CONTENT_DIR . '/debug.log' ); | |
} else { |
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
import re | |
import sys | |
import requests | |
DIFF_GIT_RE = re.compile(r'^(diff --git a/)([^ ]+ b/)([^ ]+)$', re.M) | |
STAT_RE = re.compile(r'^(\s+)([^ ]+\s+\|\s+\d+\s+[+-]+)$', re.M) | |
MINUS_PLUS_RE = re.compile(r'^((?:-|\+){3} [ab]/)(.+)$', re.M) |
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
E123 closing bracket does not match indentation of opening bracket's line | |
E124 closing bracket does not match visual indentation | |
E127 continuation line over-indented for visual indent | |
E128 continuation line under-indented for visual indent | |
E201 whitespace after '(' | |
E202 whitespace before '}' | |
E203 whitespace before ',' | |
E211 whitespace before '(' | |
E221 multiple spaces before operator | |
E222 multiple spaces after operator |
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
changed: [localhost3] | |
4 hosts remaining: localhost0, localhost1, localhost2, localhost4 | |
changed: [localhost2] | |
3 hosts remaining: localhost0, localhost1, localhost4 | |
changed: [localhost1] | |
2 hosts remaining: localhost0, localhost4 | |
changed: [localhost0] | |
1 hosts remaining: localhost4 | |
changed: [localhost4] | |
All hosts complete |