Skip to content

Instantly share code, notes, and snippets.

🥓
Need more bacon!

Ryan Hoover ryanshoover

🥓
Need more bacon!
Block or report user

Report or block ryanshoover

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryanshoover
ryanshoover / Before In Location
Created Aug 5, 2019
Server-side A/B testing with NGINX & Varnish (WP Engine)
View Before In Location
add_header Set-Cookie "my_test_group=$test_group;Domain=.mydomain.com;Path=/;Max-Age=604800";
@ryanshoover
ryanshoover / tiles.html
Created Jun 21, 2019
Tile testing html
View tiles.html
<div class="tiles tiles--two-per-row">
<div class="tile">
<div class="tile__photo">
<img src="https://picsum.photos/id/344/1440/900" class="tile__photo__image">
</div>
<h3 class="tile__title tile_title--small">Beef enim hamburger, doner</h3>
<p class="tile__description">
salami cupidatat ipsum deserunt. Corned beef prosciutto esse eiusmod short loin sausage ut jowl ipsum
cupidatat. Flank meatball pariatur fugiat meatloaf beef. Pork chop turkey jerky, in nostrud in non
consectetur turducken shoulder pig esse cow eu.
View wpengine-stop-htaccess-rewrites.php
<?php
/**
* Stop htaccess rewrites
*
* @package wpengine-stop-htaccess-rewrites
* @author wpengine
* @license Proprietary
*
* @wordpress-muplugin
* Plugin Name: Stop htaccess rewrites
View 30180.1.diff
diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php
index 9460c80ca6..dd7306e1c2 100644
--- a/wp-admin/custom-header.php
+++ b/wp-admin/custom-header.php
@@ -1461,12 +1461,10 @@ endif;
public function get_uploaded_header_images() {
$header_images = get_uploaded_header_images();
$timestamp_key = '_wp_attachment_custom_header_last_used_' . get_stylesheet();
- $alt_text_key = '_wp_attachment_image_alt';
@ryanshoover
ryanshoover / bill-wizard-trailing-slash.php
Created Aug 28, 2018
WP Plugin - stop removing trailing slash
View bill-wizard-trailing-slash.php
<?php
/**
* The Bill Wizard Trailing Slash Fix
*
* @package bill-wizard-trailing-slash
* @author wpengine
* @license Proprietary
*
* @wordpress-plugin
* Plugin Name: The Bill Wizard Trailing Slash Fix
@ryanshoover
ryanshoover / show-templates.php
Created Aug 16, 2018
Plugin to add the page template to the Pages admin
View show-templates.php
<?php
/**
* Show Page Templates
*
* @package show-page-templates
* @author ryanshoover
* @license Proprietary
*
* @wordpress-plugin
* Plugin Name: Show Page Templates
View keybase.md

Keybase proof

I hereby claim:

  • I am ryanshoover on github.
  • I am ryanshoover (https://keybase.io/ryanshoover) on keybase.
  • I have a public key ASAk-byUVD79TFYZjWC5VHJYjQK3xCAXqTHToUeWXW_SCgo

To claim this, I am signing this object:

@ryanshoover
ryanshoover / calc-revenue-diff.php
Created Apr 9, 2018
Calculate revenue difference for a faster site
View calc-revenue-diff.php
<?php
/**
* Calculate the difference in revenue I should experience
* if my load time changes.
*
* Based on the assumption that every second of page load
* causes a 7% drop in conversions.
*
* Formula in LaTex: [ R = \frac{ R_p }{ {e}^{\ln(0.93) T_p} }\ e^{\ln(0.93) T_c} - R_p ]
*
@ryanshoover
ryanshoover / functions.php
Created Feb 2, 2018
WP Engine GeoIP - Remove slashed apostrophes
View functions.php
<?php
/**
* Filters the WP Engine GeoIP location names.
* Removes any slashes in the names.
*
* @param array $geos GeoIP-identified location names.
* @return array GeoIP-identified location names without slashes.
*/
function myprefix_remove_geoip_slashes( $geos ) {
return wp_unslash( $geos );
@ryanshoover
ryanshoover / woocommerce-shayda.php
Created Jan 2, 2018
Shayda's WooCommerce Tweaks
View woocommerce-shayda.php
<?php
/**
* Plugin Name: Shayda's WooCommerce Tweaks
* Plugin URI: http://dinewithshayda.com
* Description: Makes WooCommerce do what Shayda demands it should do.
* Version: 1.0
* Author: shayda
* Author URI: http://dinewithshayda.com
*
* @package woocommerce-shayda
You can’t perform that action at this time.