A script to fix EDID problems on external monitors in Mac OS.
-
Connect the problem monitor.
-
Restart in rootless state with 'CMD R'.
-
Disable SIP. http://www.madrau.com/support/support/srx_1011.html
A script to fix EDID problems on external monitors in Mac OS.
Connect the problem monitor.
Restart in rootless state with 'CMD R'.
Disable SIP. http://www.madrau.com/support/support/srx_1011.html
I hereby claim:
To claim this, I am signing this object:
<?php | |
add_filter( 'get_user_metadata', 'mtkdocs_filter_user_metadata', 10, 4 ); | |
function mtkdocs_filter_user_metadata( $value, $object_id, $meta_key, $single ) { | |
// Check if it's one of the keys we want to filter | |
if ( in_array( $meta_key, array( '_money_spent', '_order_count' ) ) ) { | |
// Return 0 so WC doesn't try calculate it | |
return 0; | |
} | |
// Default |
// Google Fonts Loader Example | |
(function() { | |
// Configure font families | |
WebFontConfig = { | |
google: { | |
families: [ | |
'Roboto:400,400italic,700,700italic,900,900italic:latin', | |
'Merriweather:400,400italic,700,700italic,900,900italic:latin' |
# GET number of orders | |
select count(*)from wp_posts where post_type = 'shop_order'; | |
# DELETE ORDERS | |
delete from wp_postmeta where post_id in ( | |
select ID from wp_posts where post_type = 'shop_order'); | |
delete from wp_posts where post_type = 'shop_order'; | |
# DELETE order refunds |
## Delete duplicate WooCommerce products | |
## (Retains the lowest ID) | |
## Pro tip: Change to SELECT to test | |
DELETE bad_rows.* | |
from wp_posts as bad_rows | |
inner join ( | |
select post_title, MIN(id) as min_id | |
from wp_posts | |
where post_type = 'product' |
# First Attempt, seemed to have worked | |
SELECT DISTINCT(p.ID), p.post_title, p.post_content FROM `wp_posts` p | |
LEFT JOIN wp_posts im ON p.ID = im.post_parent AND im.post_type = "attachment" | |
WHERE p.post_status ='publish' | |
AND p.post_type = "product" | |
AND im.ID IS NULL | |
AND p.post_content NOT REGEXP 'src=".*"' | |
# This works well with woocommerce products. | |
# Fast |
/** | |
* USE AT YOUR OWN RISK! | |
* | |
* In no way do I guarantee the accuracy of these queries to do exactly what you want on your own server. | |
* I have written them down for my own personal record, and you are free to use at your own discretion, | |
* and provide corrections. | |
*/ | |
/** | |
* 1. Delete order and coupon meta data. |