Skip to content

Instantly share code, notes, and snippets.

View JRGould's full-sized avatar
🤦

Jeff Gould JRGould

🤦
View GitHub Profile
@JRGould
JRGould / give-it-a-rest-plugin.php
Last active August 2, 2016 14:45
Give it a REST WordPress plugin component
<?php
/*
Plugin Name: Give It A REST API Plugin
Plugin URI: http://deliciousbrains.com/blog
Description: Enables the Give it a REST API
Author: Jeff Gould
Version: 0.1
Author URI: http://deliciousbrains.com
*/
<?php
/*
Plugin Name: WPMDB Pro Migration Complete Notifications
Plugin URI: http://deliciousbrains.com
Description: Get notified when a migration completes
Author: Delicious Brains
Version: 0.0
Author URI: http://deliciousbrains.com
*/
@JRGould
JRGould / SharedDataSingleton.swift
Last active April 19, 2017 15:05
Swift shared data singleton with data persistence and simple callback support
/**
Usage: var mySharedData = SharedData.instance
*/
class SharedData {
static let instance: SharedData = {
let instance = SharedData()
// Update instance.defaultsName if desired
if let defaults = NSUserDefaults.standardUserDefaults().objectForKey(instance.defaultsName) as? [String:AnyObject] {
<?php
/*
Plugin Name: WPMDB - Fix cURL Expect Header
Plugin URI: https://gist.github.com/JRGould/bd4e23a40111f5f3cd69b6913e05de00/
Description: Preempts automatic inclusion of "Expect: 100-continue" header by cURL which can cause null response from remote site, resulting in "cURL Error 52: Empty reply from server."
Author: Delicious Brains
Author URI: http://deliciousbrains.com
Version: 0.1
Network: True
*/
#!/bin/bash
export TERM=xterm;
clear;
echo " ";
echo "---------------------------------------------";
echo " START | "$(date +%m.%d.%Y-%H.%M.%S);
echo "---------------------------------------------";
#create db dump for all databases
@JRGould
JRGould / wp-parse-url-mu-plugin.php
Created November 28, 2017 20:41
Place this file in wp-content/mu-plugins/ to patch missing wp_parse_url() function
<?php
if( ! function_exists( 'wp_parse_url' ) ) {
function wp_parse_url( $url, $component = -1 ) {
$to_unset = array();
$url = strval( $url );
if ( '//' === substr( $url, 0, 2 ) ) {
$to_unset[] = 'scheme';
$url = 'placeholder:' . $url;
} elseif ( '/' === substr( $url, 0, 1 ) ) {
<?php
/*
Plugin Name: WP Migrate DB Pro Tweak: Skip Options
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
Description:
Author: Delicious Brains
Version: 1
Author URI: http://deliciousbrains.com
*/
<?php
/*
Plugin Name: WP Migrate DB Pro Tweak: Skip Serialized Refs in Options Table
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
Description: Skip unserializing / replacing data that contains serialized references as this can cause an infinite loop.
Author: Delicious Brains
Version: 1
Author URI: http://deliciousbrains.com
*/

Keybase proof

I hereby claim:

  • I am jrgould on github.
  • I am jrgould (https://keybase.io/jrgould) on keybase.
  • I have a public key whose fingerprint is 645F E088 E027 D8A5 18DA 3C93 FA2D 17A4 2714 613A

To claim this, I am signing this object: