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: Attempt Basic Auth | |
Description: This plugin will fail to activate if it can't use basic authentication with httpbin.org. | |
*/ | |
register_activation_hook( plugin_basename( __FILE__ ), 'dkk_test_http_basic' ); | |
function dkk_test_http_basic() { | |
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 | |
/** | |
* Example WordPress hook to geocode Gravity Forms fields for Geo Mashup. | |
* | |
* This example uses a form ID of 2, replace _2 with your form ID, | |
* 'address' and 'zip' with your Gravity Forms field names, and prefix | |
* with your unique namespace prefix. | |
*/ | |
add_action( 'gform_after_submission_2' 'prefix_gform_after_submission_2', 10, 2 ); |
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
/** | |
* An example of applying custom styles to a Geo Mashup Google V3 map. | |
* | |
* There's a wizard for making your own style arrays at https://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html | |
**/ | |
GeoMashup.addAction( 'loadedMap', function( properties, map ) { | |
var google_map = map.getMap(); | |
var custom_styles = [ | |
{ | |
featureType: "landscape.natural", |
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
RedirectMatch 404 "(?:.*)/(?:\.git|file_or_dir)(?:/.*)?$" |
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/sh | |
git init \ | |
&& git config --bool receive.denyCurrentBranch false \ | |
&& git config --path core.worktree ../ |
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
--- | |
vagrantfile-local: | |
vm: | |
box: ubuntu-precise12042-x64-vbox43 | |
box_url: 'http://box.puphpet.com/ubuntu-precise12042-x64-vbox43.box' | |
hostname: null | |
network: | |
private_network: 192.168.56.101 | |
forwarded_port: | |
mAShhAzrESTM: |
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/sh | |
read oldrev newrev ref | |
echo "Deploying $ref..." | |
GIT_WORK_TREE=/path/to/app git checkout -f $ref |
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
tty -s && mesg n |
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 my_activation_check() { | |
$php = '5.3'; | |
if ( version_compare( PHP_VERSION, $php, '<' ) ) { | |
deactivate_plugins( basename( __FILE__ ) ); | |
wp_die( | |
'' . | |
sprintf( | |
__( 'My Awesome Plugin can not be activated because it requires a PHP version greater than %1$s. Your PHP version can be updated by your hosting company.', 'textdomain' ), |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteRule ^wp-content/uploads/(.*)$ http://x.staging.wpengine.com/wp-content/uploads/$1 [L,R=301] | |
</IfModule> | |