One-time Dependency Setup/Configuration
wget https://getcomposer.org/download/1.1.0/composer.phar && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ |
<?php | |
if ( ! function_exists('__return') ) : | |
/** | |
* Simple return callback generator | |
* | |
* @param null $return | |
* @return Closure | |
*/ | |
function __return($return = null) { | |
return function() use ($return) { |
SET GROUP_CONCAT_MAX_LEN=10000; | |
SET FOREIGN_KEY_CHECKS = 0; | |
SET @tbls = (SELECT GROUP_CONCAT(CONCAT('`', TABLE_NAME, '`')) | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'tablename_goes_here' | |
AND TABLE_NAME LIKE 'thetableprefix_%'); | |
SET @delStmt = CONCAT('DROP TABLE ', @tbls); | |
-- SELECT @delStmt; | |
PREPARE stmt FROM @delStmt; | |
EXECUTE stmt; |
require: | |
- vendor/autoload.php |
<?php | |
/** | |
* For use with Amazon S3 and CloudFront by Delicious Brains | |
* | |
* Upload this file to your installation and trigger it with WP-CLI: | |
* wp eval-file as3cf-upload-missing-media-library-items-to-s3.php | |
*/ | |
global $as3cf; |
<?php | |
if ( ! function_exists('call_shortcode') ) : | |
/** | |
* Helper function for calling a shortcode directly | |
* | |
* Rather than `echo do_shortcode('[foo bar=the]')` ... | |
* | |
* echo call_shortcode('foo', ['bar' => 'the']); |
<?php | |
if ( file_exists( WPMU_PLUGIN_DIR . '/dev-debug/dev-debug.php' ) ) | |
require_once ( WPMU_PLUGIN_DIR . '/dev-debug/dev-debug.php' ); |
pagelines_before_html | |
<html> | |
<head> | |
pagelines_head | |
wp_head | |
pagelines_head_last | |
</head> | |
<body> | |
pagelines_before_site | |
<div id="site"> |
<?php | |
/** | |
* Plugin Name: Soft disable all WP plugins | |
* Author: Evan Mattson (@aaemnnosttv) | |
* Description: Allows all plugins to be softly disabled and re-enabled using a single constant. | |
* Version: 1.0 | |
* | |
* Usage: Install this under mu-plugins/, and define('SOFT_DISABLE_PLUGINS', true) to soft disable all plugins. | |
* Delete/comment-out the constant definition or set to false to restore all plugins to their previous active states. | |
* |