This file contains hidden or 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 hidden or 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
| { | |
| "meta": { | |
| "theme": "minyma" | |
| }, | |
| "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json", | |
| "basics": { | |
| "name": "Jeremy Pry", | |
| "label": "Senior Software Engineer", | |
| "email": "resume@jpry.com", | |
| "image": "https://0.gravatar.com/avatar/a076539d53678b43d19892f076eba148b5de43d5dac020ad9a4739962e55c4e2?size=512&d=initials", |
This file contains hidden or 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
| curl -H "Host: example.com" -I http://IP.ADD.RE.SS/path/to/file/or/folder/ |
This file contains hidden or 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: Allow Heartbeat on more pages | |
| * Plugin URI: https://gist.github.com/JPry/b1f6c55a5d5337557f97 | |
| * Description: Allow the Heartbeat API on more pages in the Dashboard | |
| * Version: 1.0 | |
| * Author: Jeremy Pry | |
| * Author URI: http://jeremypry.com/ | |
| * License: GPL2 | |
| */ |
This file contains hidden or 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_filter( 'wcs_default_retry_rules', 'jpry_limit_3_retries' ); | |
| /** | |
| * Limit the WooCommerce Subscriptions retry system to only 3 retries. | |
| * | |
| * This keeps the existing retry rules, but only the first 3. Everything thereafter | |
| * is discarded. | |
| * |
This file contains hidden or 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
| location ~* /(.*\.pdf) { | |
| types { application/octet-stream .pdf; } | |
| default_type application/octet-stream; | |
| } |
This file contains hidden or 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 wp_posts set post_content = replace(post_content,'’','\''); | |
| update wp_posts set post_title = replace(post_title,'’','\''); | |
| update wp_comments set comment_content = replace(comment_content,'’','\''); | |
| update wp_postmeta set meta_value = replace(meta_value,'’','\''); | |
| update wp_posts set post_content = replace(post_content,'…','...'); | |
| update wp_posts set post_title = replace(post_title,'…','...'); | |
| update wp_comments set comment_content = replace(comment_content,'…','...'); | |
| update wp_postmeta set meta_value = replace(meta_value,'…','...'); |
This file contains hidden or 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
| location ~* /(.*\.pdf) { | |
| types { application/octet-stream .pdf; } | |
| default_type application/octet-stream; | |
| } |
This file contains hidden or 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: Add "Create Scheduled Action" page | |
| * Plugin URI: https://gist.github.com/JPry/357ee26a46e3d8e2b68d1690f5bbbf75 | |
| * Description: Add a page to the Tools menu that allows for the manual creation of scheduled actions with Action | |
| * Scheduler. Version: 1.0.0 | |
| * Author: Jeremy Pry | |
| * Author URI: https://jeremypry.com/ | |
| * License: MIT | |
| */ |
This file contains hidden or 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: Example including a JS file into WordPress. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'jpry_example_include_scripts' ); | |
| function jpry_example_include_scripts() { | |
| wp_enqueue_script( | |
| 'jpry-example-script', // This is an arbitrary name to reference this particular script |
NewerOlder