Skip to content

Instantly share code, notes, and snippets.

View JRGould's full-sized avatar
🤦

Jeff Gould JRGould

🤦
View GitHub Profile
@JRGould
JRGould / wpmdbpro-cli-remote-backup-script.sh
Last active October 29, 2022 00:09
WP Migrate DB Pro CLI Backup Script
#!/bin/bash
#
# Declare SITES as an associative array
declare -A SITES
# Format: SITES[WPMDB profile number]=backup_filename_base
SITES[1]=remote_backup_com
#SITES[2]=another_site_to_backup
#SITES[3]=my_other_blog
## These variables will be specific to the WordPress
@JRGould
JRGould / index.ios.js
Last active May 24, 2017 07:46
DeepThoughts React-Native App Starter Template
/**
* DeepThoughts Template
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@JRGould
JRGould / index.ios.js
Last active May 24, 2017 07:46
Deep Thoughts React-Native App v 0.1
/**
* DeepThoughts App v 0.1
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@JRGould
JRGould / index.ios.js
Last active August 29, 2015 14:25
Deep Thoughts React-Native App v 0.2
/**
* DeepThoughts App v 0.2
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@JRGould
JRGould / wp-migrate-db-pro-tweaks.php
Created August 5, 2015 19:19
WP Migrate DB Pro Tweaks - edited to allow utf8mb4 to utf8 migrations
<?php
/*
Plugin Name: WP Migrate DB Pro Tweaks
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
Description: Examples of using WP Migrate DB Pro's filters
Author: Delicious Brains
Version: 0.1
Author URI: http://deliciousbrains.com
*/
@JRGould
JRGould / index.ios.js
Last active August 31, 2015 16:13
Deep Thoughts React Native App v 0.3
/**
* DeepThoughts App v 0.3
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
@JRGould
JRGould / deep-thoughts-plugin.php
Created August 27, 2015 05:43
Deep Thoughts WordPress Functionality Plugin
<?php
/*
Plugin Name: Deep Thoughts Functionality
Description: API Modifications for my Deep Thoughts React Native app.
Author: Jeffrey Gould
Version: 0.1
Author URI: http://jrgould.com
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@JRGould
JRGould / index.html
Created November 26, 2015 02:16
Give it a rest html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Give it a REST</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="app.js"></script>
<style>
@JRGould
JRGould / app.js
Last active November 26, 2015 05:09
Give it a REST js using mock data
var posts_mockup = [
{ ID: 1, title: "First Post Title", permalink: 'http://example.com/1/', upvotes: 12, downvotes: 2 },
{ ID: 22, title: "Second Post Title", permalink: 'http://example.com/2/', upvotes: 1, downvotes: 22 },
{ ID: 33, title: "Third Post Title", permalink: 'http://example.com/3/', upvotes: 5, downvotes: 4 },
{ ID: 44, title: "Fourth Post Title", permalink: 'http://example.com/4/', upvotes: 2, downvotes: 2 },
{ ID: 55, title: "Fifth Post Title", permalink: 'http://example.com/5/', upvotes: 8, downvotes: 13 },
];
var $el;
var posts = {};
@JRGould
JRGould / app.js
Created November 26, 2015 05:15
Give it a REST app using data from give-it-a-rest.dev
var giar_settings = {
api_base: 'http://give-it-a-rest.dev/wp-json/give-it-a-rest/v1/',
endpoints: {
posts: { route: 'list-posts/', method: 'GET' },
vote: { route: 'vote/', method: 'POST' }
}
}
var $el;
var posts = {};