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 pmc_dev_cachebuster( $src ) { | |
return add_query_arg( 'ver', time(), $src ); | |
} | |
add_filter( 'style_loader_src', 'pmc_dev_cachebuster' ); | |
add_filter( 'script_loader_src', 'pmc_dev_cachebuster' ); |
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 | |
path="/var/www/sites/htdocs/wp-content/themes/vip/"; | |
git_path="https://username:password@bitbucket.org/penskemediacorp/"; | |
git_array=( plugins pmc-variety pmc-plugins ); | |
git_path_array=("${git_array[@]}") |
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 ls to be colourful | |
export CLICOLOR=1 | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' | |
# Solarized colors | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then TERM=gnome-256color; fi | |
if tput setaf 1 &> /dev/null; then | |
tput sgr0 |
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 innocent_function() { | |
global $foo; | |
$foo = new Foobar($foo); | |
} | |
class Foobar { | |
public function __construct($original_value) { | |
echo 'I just did something evil.' . PHP_EOL; |
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 | |
$GLOBALS['pmc_required_plugins'] = array( | |
'debug-bar-console/debug-bar-console.php', | |
'debug-bar-cron/debug-bar-cron.php', | |
'debug-bar-extender/debug-bar-extender.php', | |
'debug-bar-super-globals/debug-bar-super-globals.php', | |
'debug-bar/debug-bar.php', | |
'developer/developer.php', | |
'jetpack/jetpack.php', | |
'log-deprecated-notices/log-deprecated-notices.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
#! /bin/bash | |
ETHERNET="en0" | |
WIRELESS="en1" | |
NGINX_CONFIGS_PATH="" | |
VRDEPORT=3389 | |
VRDEAUTHTYPE="external" | |
VRDEENABLED="off" | |
if [ -z $2 ]; then | |
VMNAME="dev-local" |
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 | |
MYSQL="/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper" | |
NGINX="/opt/local/sbin/nginx" | |
PHPFPM="/opt/local/sbin/php-fpm" | |
PIDPATH="/opt/local/var/run" | |
MEMCACHED="/opt/local/bin/memcached -m 24 -P /opt/local/var/run/memcached.pid -u root" | |
if [ $1 = "start" ]; then | |
sudo $MYSQL start | |
echo "Starting php-fpm ..." |
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 | |
$server_url = 'http://example.com/endpoint/?ts=' . time(); | |
$shared_secret = 'random string of text'; // This is the same in server and client | |
$public_key = 'hello world'; // Each client has its own allowed key, this key is the same in the server and client | |
$headers = array( | |
'x-pmc-key: ' . $public_key, | |
'x-pmc-signature: ' . md5( $public_key . $shared_secret ), | |
); |
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
jQuery(':button, :submit, #post-preview, .submitdelete', '#submitpost').each(function(){ | |
var t = jQuery(this); | |
if ( t.hasClass('button-primary') ) | |
t.addClass('button-primary-disabled'); | |
else | |
t.addClass('button-disabled'); | |
t.prop('disabled', true); | |
t.on('click', function() { |
NewerOlder