To the elastic
config:
Remove:
expose:
<?php | |
require '../../../../wp-load.php'; | |
function post_type_mv( $post_type , $keys = array('post_id')){ | |
global $wpdb; | |
$post_meta_sql = "SELECT DISTINCT pm.meta_key | |
FROM wp_posts p | |
LEFT OUTER JOIN wp_postmeta pm ON pm.post_id = p.ID | |
WHERE p.post_type = '$post_type'"; | |
$post_meta = array_flip($wpdb->get_col($post_meta_sql)); | |
//error_log(print_r($post_meta, TRUE)); |
#Virtualbox, Ubuntu and Guest Additions often get cranky, here's how to fix them so you're bloody mouse works again. | |
sudo apt-get install -f | |
sudo apt-get clean | |
sudo apt-get update | |
sudo apt-get install linux-headers-$(uname -r) | |
#OR | |
sudo apt-get install --reinstall linux-headers-$(uname -r) | |
sudo /etc/init.d/vboxadd setup |
--- Date last logged in --- | |
SELECT u.ID, u.user_email | |
, MAX(CASE WHEN um.meta_key = 'first_name' then um.meta_value ELSE NULL END) as first_name | |
, MAX(CASE WHEN um.meta_key = 'last_name' then um.meta_value ELSE NULL END) as last_name | |
, MAX(CASE WHEN um.meta_key = '_last_login' then um.meta_value ELSE NULL END) as last_login | |
FROM wp_users u LEFT JOIN wp_usermeta um ON ( um.user_id = u.ID) | |
WHERE um.meta_key in ('first_name', 'last_name','_last_login') | |
GROUP BY u.ID | |
ORDER BY last_login DESC | |
LIMIT 1000 |
SELECT parent.name, t.name, COUNT( * ) | |
FROM wp_posts AS p | |
INNER JOIN wp_term_relationships AS tr ON p.ID = tr.object_id | |
INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id | |
INNER JOIN wp_terms AS t ON tt.term_id = t.term_id | |
LEFT OUTER JOIN wp_terms AS parent ON tt.parent = parent.term_id | |
WHERE p.post_type = 'clubfoot_patient' | |
AND tt.taxonomy = 'medrec_locations' | |
AND ( parent.name IN ( 'Rwanda', 'Ethiopia', 'India' ) OR t.name IN ( 'Rwanda', 'Ethiopia', 'India' ) ) | |
GROUP BY parent.name, t.name |
$(window).load(function () { | |
if (!this.cure || typeof this.cure !== 'object'){ | |
this.cure = {}; | |
} | |
this.cure.donate = (function () { | |
'use strict'; | |
var MyApp = new Backbone.Marionette.Application(); | |
MyApp.onStart = function () { | |
}; |
<?php | |
/* | |
* Still requires the nginx server_name to be set to one of these | |
* For names, still requires hosts file to be set | |
* Just updates one thing for you automatically so if your local ip changes you don't have to change so many things | |
* | |
*/ | |
$ip = $_SERVER['SERVER_ADDR']; | |
$identifiers = array( $_SERVER['HTTP_HOST'], $_SERVER['REMOTE_ADDR'], $_SERVER['SERVER_NAME'] ); | |
$aliases = array('local.site.org', $ip . '.xip.io', $ip, '127.0.0.1', '127.0.0.1.xip.io'); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
customer.created | |
customer.deleted | |
customer.updated | |
customer.source.created | |
customer.source.deleted | |
customer.source.updated | |
customer.subscription.deleted | |
customer.subscription.created | |
customer.subscription.updated | |
charge.captured |
#!/usr/bin/env bash | |
BASE="git@github.com:newrelic" | |
declare -a arr=( | |
"nr1-bigeventui" | |
"nr1-bootstrap-theme" | |
"nr1-browser-analyzer" | |
"nr1-cloud-optimize" | |
"nr1-community" |