Skip to content

Instantly share code, notes, and snippets.

Stephen Harris stephenharris

Block or report user

Report or block stephenharris

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
stephenharris / currencyField.js
Last active Jul 17, 2018
Formats currency input and provides a method from extracting the amount (in fractional currency units - i.e. in cents/pennies)
View currencyField.js
$.widget( "nmk.currencyField", {
// Default options.
options: {
decimalPlaces: 2,
decimalSeperator: ".",
thousandSeperator: ",",
_create: function() {
stephenharris / import-venues.php
Created Mar 21, 2017
A WP-CLI command to import a CSV of venues
View import-venues.php
Plugin Name: Import Venues WP CLI command
Plugin URI:
Description: Adds `wp eo venue import <path-to-file>` command.
Author: Stephen Harris
Version: 0.1
// Exit if accessed directly
View oauth-single-access-token.php
* Plugin Name: OAuth 1.0a Single Access Token
* Description: Create Single Access Tokens
* Version: 0.1.0
* Allows you to create a 'single access token' for each consumer.

Running Behat on VVV


  • How to copy plugins into place
  1. Configure Behat.yml

    Here I've used the details for

    • Database: wordpress_trunk
stephenharris /
Last active Sep 9, 2019
Installing a particular version of firefox on Linux.

Installing a particular version of FireFox on Linux

  1. Does an existing version of firefox exist?

    firefox --version

    If not, skip to (3).

stephenharris /
Last active Jul 20, 2016
Can be used to flush the rewrite rules of all sites in a multisite network.
stephenharris /
Last active Jul 5, 2016
Event Organiser Rest API - Draft specification

Event Organiser Rest API - Draft specification

Version: 0.3.0


The endpoints listed below assume a base of <yoursite>/wp-json/wp/v2

stephenharris / wp-benchmark.php
Created Apr 19, 2016
Simple wp-cli based benchmark command
View wp-benchmark.php
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
* Implements example command.
class Benchmark_Command extends WP_CLI_Command {
stephenharris / copy-pre.css
Last active Jul 25, 2019
Adding a 'copy' button to <pre> content
View copy-pre.css
.pre-wrapper pre{
padding-top: 25px;
.pre-wrapper .copy-snippet {
border-radius: 0;
background: none repeat scroll 0 0 transparent;
stephenharris /
Last active Jul 5, 2018
How to set up CI with Jenkins on AWS EC2 (and some notes)
You can’t perform that action at this time.