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 | |
DIR="$1" | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 {WP install dir path}" | |
exit 1 | |
fi |
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 | |
lint=$(./node_modules/eslint/bin/eslint.js src/**.js $a) | |
echo $lint | |
if [[ "$lint" != *""* ]]; then | |
echo "ERROR: ESLint failed, check hints" | |
exit 1 # reject | |
fi |
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: Annoying Plugin | |
Plugin URI: | |
Description: This is not a plugin | |
Author: Pete T | |
Version: 1.0 | |
Author URI: | |
*/ |
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 | |
DIR="$1" | |
COUNT="$2" | |
WP_DIR="$3" | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] | |
then | |
echo "Usage: $0 {photos folder dir path} $1 {number of photos} $2 {Absolute directory where WordPress is installed}" | |
exit 1 |
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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
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: WPMDB - List all subsites | |
Plugin URI: https://gist.github.com/ptasker/3beaa16a5d0333cf49b0e202eaf40849 | |
Description: Fixes get_sites() calls used in WP Migrate DB Pro to return a list of all sites | |
Author: Delicious Brains | |
Author URI: http://deliciousbrains.com | |
Version: 0.1 | |
Network: True | |
*/ |
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 | |
/** | |
* | |
* Filter to not migrate the 'jetpack_options' value | |
* | |
* @param $options | |
* | |
* @return array | |
* | |
* From the tweaks plugin: |
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
//All the contact forms from Jetpack have the .contact-form class. This _should_ match all of them on a page and work correctly. | |
$(".contact-form").on('submit', function (e) { | |
//Wrapper for our form fields to submit via ajax | |
var formData = {}; | |
var contact_form_id = $(this).find('input[name=contact-form-id]').val(); | |
//Get our form fields here. New fields can be added here as well. | |
formData['g' + contact_form_id + '-name'] = $('input[name=g' + contact_form_id + '-name]').val(); |
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
//Do this first! | |
window.open("about:blank", "sharer"); | |
var params = {...} | |
ajaxFunction(function (data) { | |
var url = 'http://google.ca'; | |
//Refer to the original window here... | |
var w = window.open(url, 'sharer'); |
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
var monthArray = []; | |
for(var i in monthly){ | |
var month = monthly[i].split('-')[1]; | |
monthArray.push(months[month]); | |
} | |
currStartMonth = monthly[0]; |