Installing Supervisor on OS X is simple:
sudo pip install supervisor
This assumes you have pip. If you don't:
<?php | |
/** | |
* Plugin Name: WP Minions Post Pusher | |
* Description: Pushes all published posts to one blog using wp-minions | |
* Version: 1.0 | |
* Author: Thorsten ott | |
* Author URI: http://thorsten-ott.de/ | |
* License: GPLv2 or later | |
*/ |
check process rabbitmq-server matching "/usr/lib/erlang/erts-6.2/bin/beam" | |
group rabbitmq | |
start program = "/etc/init.d/rabbitmq-server start" | |
stop program = "/etc/init.d/rabbitmq-server stop" | |
if failed port 5672 type tcp then restart | |
if 3 restarts within 3 cycles then timeout |
Mercurial Commands
Commands | Description |
---|---|
hg pull | get latest changes like git pull use flags like -u IDK why yet |
hg add | only for new files |
hg commit | add changes to commit with -m for message just like git |
hg addremove | adds new files and removes file not in your file system |
hg incoming | see changes commited by others |
hg outgoing | see local commits |
<?php | |
// hide coupon field on cart page | |
function hide_coupon_field_on_cart( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; |
<?php | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
global $product; |
<?php // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3 | |
autostart=true | |
autorestart=true | |
user=forge | |
numprocs=8 | |
redirect_stderr=true | |
stdout_logfile=/home/forge/app.com/worker.log |
# 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 |
# 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 |