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 | |
knife search node "*:*" -a ec2.public_ipv4 | awk -f knife-output.awk |
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
HTML5 U.S. Zip Code/Canadian Postal code Validation | |
<input class="lead-zip full-wide" title="U.S. or Canadian Zip or Postal code is required" pattern="(\d{5}([\-]\d{4})?)|[A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9]" type="text" name="lead-zip" placeholder="Zip Code *" required /> |
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_action( 'init', 'x_maintenance_mode' ); | |
function x_maintenance_mode() { | |
if ( defined( 'X_MAINTENANCE_MODE' ) && true === X_MAINTENANCE_MODE ) { | |
if ( is_super_admin() && is_admin() ) | |
return; | |
die( 'Site is currently under maintenance' ); |
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 | |
// Remove all evidence of WP Engine from the Dashboard, unless the logged in user is "wpengine" | |
$user = wp_get_current_user(); | |
if ( $user->user_login != 'wpengine' ) { | |
add_action( 'admin_init', 'jpry_remove_menu_pages' ); | |
add_action( 'admin_bar_menu', 'jpry_remove_admin_bar_links', 999 ); | |
} | |
/** |
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/python | |
# | |
# Just change the three variables below and you are all set! | |
# @author Matthew A. Johnston (WarmWaffles) | |
# your user name | |
API_USERNAME = "username" | |
# your api key | |
API_KEY = "api-key" | |
# Load balancer Region |
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 | |
// Note: CA state law says no robocalls before 9AM, so wait until 12PM EST. | |
$sid = 'Your SID'; | |
$token = 'Your Token'; | |
$telephoneNumber = 'Your Telephone Number, the one that Twilio gives you.'; | |
$client = new Services_Twilio($sid, $token); |
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/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
[color "diff"] | |
meta = yellow | |
frag = magenta bold |