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 auto translation updates | |
Description: Prevents WordPress from automatically updating translation files in the global languages directory. | |
Author: Tim Whitlock | |
Version: 1.0 | |
*/ | |
/** |
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: Loco Standalone Loader | |
Description: Mimics Loco_hooks_LoadHelper without dependency on the main plugin | |
Author: Tim Whitlock | |
Version: 1.0 | |
*/ | |
new LocoStandaloneLoadHelper; |
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 REST API | |
* Version: 0 | |
*/ | |
// completely disable wp-json access | |
add_filter( 'rest_authentication_errors', function( $access ){ | |
return new WP_Error( 'rest_cannot_access', 'Bye', array( 'status' => 403 ) ); | |
} ); |
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
/** | |
* Searchable JavaScript dictionary. | |
* | |
* Usage: | |
* var dict = require('path/to/this').create(); | |
* dict.add( 'somedata', 'Text to index' ); | |
* var items = dict.find('text'); | |
*/ | |
exports.create = function(){ | |
return new Dict; |
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 | |
error_reporting(E_ALL); | |
$opts = getopt('f:d:rb:', ['ext:', 'php:', 'diff::']); | |
if ((int)isset($opts['d']) + (int)isset($opts['f']) !== 1) { | |
$self = basename(__FILE__); | |
echo <<<EOF | |
Usage: | |
php $self -f<php_script> [-b] [--php <path_to_php>] [ --diff [<file>]] |
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: No Widows | |
Plugin URI: http://timwhitlock.info/ | |
Description: Prevents typographical widows in titles and post body content | |
Author: Tim Whitlock | |
Version: 1.0 | |
Author URI: http://timwhitlock.info/ | |
*/ |
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 | |
// Client: Pings server, gets reply. Exits. | |
$zmq = new ZMQContext; | |
$sock = new ZMQSocket( $zmq, ZMQ::SOCKET_REQ ); | |
$sock->connect('tcp://localhost:5555'); | |
echo "Pinging..\n"; | |
$sock->send('Ping'); |
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
/* [twhitlock] define some configs before Wordpress can beat our plug-ins to it */ | |
define('WP_CDN_ROOT','http://cdn.timwhitlock.info/wordpress'); | |
define('WP_CONTENT_URL', WP_CDN_ROOT.'/wp-content'); | |
/** Sets up WordPress vars and included files. */ | |
require_once(ABSPATH . 'wp-settings.php'); |
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: CDN Tools | |
Plugin URI: http://web.2point1.com/tag/wp-cdn | |
Description: Simple tool for deploying Wordpress assets on a CDN | |
Version: 0 | |
Author: Tim Whitlock | |
Author URI: http://twitter.com/timwhitlock | |
*/ |
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 | |
# Rotates disk image backups inside working directory | |
# Maintains a rolling window of 4 hourly snapshots (uncompressed) | |
# Plus 7xdays and 6xmonths of older compressed archives | |
# config | |
HOURS=4 | |
DAYS=7 | |
MONTHS=6 |
NewerOlder