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 | |
# ----------- SET COLORS ----------- | |
COLOR_RED=$'\e[31m' | |
COLOR_CYAN=$'\e[36m' | |
COLOR_YELLOW=$'\e[33m' | |
COLOR_GREEN=$'\e[32m' | |
COLOR_RESET=$'\e[0m' | |
COLOR_HIGHLIGHT_FOUND=$'\e[0;30;42m' | |
#DOMAIN=https://www.efficiencyofmovement.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
// parse a Link header | |
// | |
// Link:<https://example.org/.meta>; rel=meta | |
// | |
// var r = parseLinkHeader(xhr.getResponseHeader('Link'); | |
// r['meta'] outputs https://example.org/.meta | |
// | |
function parseLinkHeader(header) { | |
var linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g; | |
var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g; |
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
/** | |
* Utility function to check if a gravatar exists for a given email or id | |
* @param int|string|object $id_or_email A user ID, email address, or comment object | |
* @return bool if the gravatar exists or not | |
*/ | |
function validate_gravatar($id_or_email) { | |
//id or email code borrowed from wp-includes/pluggable.php | |
$email = ''; |
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 | |
/** | |
* Function to get terms only if they have posts by post type | |
* @param $taxonomy (string) taxonomy name eg: 'post_tag','category'(default),'custom taxonomy' | |
* @param $post_type (string) post type name eg: 'post'(default),'page','custom post type' | |
* | |
* | |
* Usage: | |
* list_terms_by_post_type('post_tag','custom_post_type_name'); |
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
# Technical Speaking | |
## Basics: | |
### ( ) Introduce yourself | |
Proportional to the talk | |
### ( ) Longer full-feature talk === more intro | |
### ( ) Lighting talks === more succinct intro | |
- ( ) Name | |
- ( ) Where you work | |
- ( ) How long have you been doing this |
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 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 | |
*/ |
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
# ----------------------------------------------------------------- | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/joshsmith01/8e20edbf910d909415b6/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. | |
# | |
# To ignore uncommitted changes in a file that is already tracked, use | |
# git update-index --assume-unchanged |