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
sites | |
|__ ms.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable | |
| |__ wp-config.php | |
|__ one.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable |
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 | |
$path = str_replace( $_SERVER['DOCUMENT_ROOT'], '', dirname( $_SERVER['SCRIPT_FILENAME'] ) ); | |
$path_parts = explode( '/', $path ); | |
while ( count( $path_parts ) > 0 ) { | |
$path = $_SERVER['DOCUMENT_ROOT'] . implode( '/', $path_parts ) . '/wp-config.php'; | |
if ( file_exists( $path ) ) { | |
include( $path ); | |
break; | |
} else { | |
array_pop( $path_parts ); |
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
tell application "App Tamer" | |
wake "Dropbox" | |
delay 60 | |
# Hack to get App Tamer to sleep Dropbox again | |
# There is no "sleep" verb ಠ_ಠ | |
autostop false | |
autostop true | |
end tell |
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 CWS_Jetpack_Modules { | |
function __construct() { | |
add_filter( 'option_jetpack_active_modules', array( $this, 'active_modules' ) ); | |
} | |
function active_modules( $modules ) { | |
$allowed_modules = array( | |
'enhanced-distribution', |
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( 'template_include', 'ja_template_check' ); | |
function ja_template_check( $template ) { | |
if ( is_category() ){ | |
// Get category information | |
$cat = get_query_var( 'cat' ); | |
$category_info = get_category( $cat ); | |
// News sub-categories, where 7 is the ID for News |
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 ( !class_exists( 'WP_Smart_Cache_v1' ) ) : | |
Class WP_Smart_Cache_v1 { | |
static $instances = array(); | |
public function __construct() { | |
if ( function_exists( 'wp_cache_add_global_groups' ) ) | |
wp_cache_add_global_groups( array( 'wp_smart_cache_global' ) ); | |
} |
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
function subl() { | |
if [[ ! -p /dev/stdin ]]; then | |
command subl > /dev/null 2>&1 | |
fi | |
command subl "$@" | |
} |
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
<!-- | |
`-/+osssssssssssso+/-` | |
./oys+:.` `.:+syo/. | |
.+ys:. .:/osyyhhhhyyso/:. ./sy+. | |
/ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/ | |
/h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/ | |
:ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh: | |
`sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys` | |
.ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh. |
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
#!/usr/bin/ruby | |
multisitism = [ | |
:single_site, | |
:multisite_subdirs, | |
:multisite_subdomains | |
] | |
permalinks = [ | |
:default_permalinks, |
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: Sane Adjacent Images queries | |
Description: Makes adjacent image queries saner if you have a huge number of images attached to a post. | |
Version: 0.2 | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ | |
class CWS_Sane_Adjacent_Images { |