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 | |
// Dynamically Set Environment Variables | |
$server[] = $_SERVER['HTTP_HOST']; | |
$server[] = $_SERVER['LOCAL_NAME']; | |
$environment->local[] = 'example.dev'; | |
$environment->staging[] = 'staging.example.com'; | |
if ( array_intersect( $environment->local, $server ) ) { |
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 | |
// Define Environment Variables | |
$environment = new stdClass(); | |
$environment->local = '/wp-config-local.php'; | |
$environment->staging = '/wp-config-staging.php'; | |
$environment->testing = '/wp-config-testing.php'; | |
// Dynamically Set Environment Constants | |
define( 'WP_ENV_LOCAL', file_exists( ABSPATH . $environment->local ) ); | |
define( 'WP_ENV_STAGING', file_exists( ABSPATH . $environment->staging ) ); |
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(get_field('slideshow')): ?> | |
<script src="<?php bloginfo('template_directory') ?>/js/jquery.vegas-1.2.min.js"></script> | |
<script> | |
jQuery(document).ready(function ($) { | |
$.vegas('slideshow', { | |
step: 0, | |
delay: 5000, | |
backgrounds: [ | |
<?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
## Update Homebrew Formula(s) | |
$ brew update | |
$ brew tap homebrew/dupes | |
$ brew tap homebrew/versions | |
$ brew tap homebrew/php | |
## Install Drush | |
$ brew install drush |
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 Plugins in Local Environment | |
* Plugin URI: | |
* Description: Blacklist of Plugins to Disable When Working Locally | |
* Version: 0.1 | |
* Author: Ryan J. Bonnell | |
* Author URI: https://gist.github.com/ryanjbonnell/ | |
* License: WTFPL |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.postfix.master</string> | |
<key>Program</key> | |
<string>/usr/libexec/postfix/master</string> | |
<key>ProgramArguments</key> | |
<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
# Install SassC Interpreter | |
$ cd /usr/local/src | |
$ curl -kL https://github.com/hcatlin/libsass/archive/master.zip > libsass.zip | |
$ unzip libsass.zip | |
# Install LibSass Library | |
$ cd /usr/local/src | |
$ curl -kL https://github.com/sass/sassc/archive/master.zip > sassc.zip | |
$ unzip sassc.zip |
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 | |
/** | |
* Display MySQL Query Count and Page Generation Time for Performance Profiling | |
* ------------------------------------------------------------------------------ | |
*/ | |
if ( ! function_exists( 'show_page_generation_stats' ) ) { | |
function show_page_generation_stats() { | |
if ( WP_DEBUG === true && current_user_can('administrator') ) { | |
global $wpdb; |
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
cd /usr/local/src | |
curl -O http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz | |
tar -xzvf lynx2.8.7.tar.gz | |
cd lynx2-8-7 | |
./configure --mandir=/usr/share/man | |
make | |
sudo make install |
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
# Install PEAR (PHP Extension and Application Repository) | |
$ sudo php /usr/lib/php/install-pear-nozlib.phar | |
$ sudo pear upgrade-all | |
$ sudo pear install --alldeps PHP_CodeSniffer | |
# Add PEAR to `php.ini` Include Path | |
$ nano /etc/php.ini | |
;include_path = ".:/php/includes" | |
include_path = ".:/php/includes:/usr/lib/php/pear" |