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
### Keybase proof | |
I hereby claim: | |
* I am stevegrunwell on github. | |
* I am stevegrunwell (https://keybase.io/stevegrunwell) on keybase. | |
* I have a public key whose fingerprint is 56A8 ED6A 4437 6DE0 0EE9 3D74 5435 2694 8DF1 91E1 | |
To claim this, I am signing this object: |
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
# Create a bare clone in ~/git_repositories/{slug}.git | |
# Before running this command ensure that the repo on Bitbucket has an appropriate deploy key. | |
# You'll also want to set a POST hook (e.g. http://{redmine}/github_hook?project_id={slug}) | |
# | |
# Usage: bitbucket-add-repository <slug> | |
function bitbucket-add-repository { | |
base=/home/redmine/git_repositories/ | |
if [ -n "$1" ]; then | |
path=$base$1.git |
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 | |
# | |
# Backup local databases to Amazon S3. | |
# | |
# This script takes a single argument: an S3 bucket name with optional path. | |
# | |
# Usage: | |
# database-backup.sh backup.example.com | |
# database-backup.sh backup.example.com/some/path | |
# |
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 bash | |
# | |
# Check a WordPress domain against CVE-2017-8295. | |
# https://exploitbox.io/vuln/WordPress-Exploit-4-7-Unauth-Password-Reset-0day-CVE-2017-8295.html | |
# | |
# Usage: | |
# ./wordpress-host-check <domain> <username> | |
# | |
# <domain> | |
# The WordPress domain you wish to check. For example, http://example.com. |
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: Airstory: Enable Updating of Published Posts | |
* Plugin URI: https://wordpress.org/support/topic/upload-to-wp-from-airstory-not-working-for-me/ | |
* Description: Enable Airstory to update the contents of posts of any post status, not just drafts. | |
* Version: 0.1.0 | |
* Author: Steve Grunwell | |
* Author URI: https://stevegrunwell.com | |
* | |
* @link https://wordpress.org/support/topic/upload-to-wp-from-airstory-not-working-for-me/ |
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 | |
/** | |
* Return an array of restricted shipping locations for WooCommerce | |
* | |
* Restricted locations include Alaska, American Samoa, Guam, Hawaii, North Mariana Islands, Puerto Rico, | |
* US Minor Outlying Islands, and the US Virgin Islands | |
* | |
* @return 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
<?php | |
/** | |
* Create a URL slug from a string | |
* | |
* @param string $str String to create slug from (str) | |
* @param mixed $limit Limit the number of characters returned (optional) | |
* @return string | |
* @author Steve Grunwell | |
*/ | |
function create_slug($str, $limit=64){ |
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 | |
/** | |
* Email the error log to Eric Mann every time a 404 error occurs. | |
* | |
* @param array $report The WP404 report. | |
* @return array The (untouched) WP404 report. | |
*/ | |
function mytheme_spam_eric_with_404s( $report ) { | |
wp_mail( |
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
/** | |
* Remove Contact Form 7's scripts and styles without having to add anything to wp-config.php (as described | |
* in the CF7 docs) by using the wpcf7_enqueue_styles and wpcf7_enqueue_scripts actions that Takayuki was | |
* nice enough to include in includes/controller.php | |
* @link http://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/ | |
*/ | |
add_action( 'wpcf7_enqueue_styles', function() { wp_deregister_style( 'contact-form-7' ); } ); | |
add_action( 'wpcf7_enqueue_scripts', function() { wp_deregister_script( 'jquery-form' ); } ); |
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: Limit Orders for WooCommerce - 15min Intervals | |
* Description: Add an "Every 15 minutes" option to Limit Orders for WooCommerce. | |
* Author: Nexcess | |
* Author URI: https://nexcess.net | |
*/ | |
/** | |
* Add "Every 15min" to the list of intervals. |