Skip to content

Instantly share code, notes, and snippets.

View davidrhoderick's full-sized avatar

David Rhoderick davidrhoderick

View GitHub Profile
@iamphilrae
iamphilrae / phpMyAdmin Export Filename Template, Including Date and Time
Last active April 3, 2024 20:30
phpMyAdmin Export Filename Template, Including Date and Time
@DATABASE@__%Y-%m-%d_%H-%M-%S
@jesseeproductions
jesseeproductions / tickets-plus-disable-tax.php
Created March 2, 2016 13:51
Event Tickets Plus - Disable Taxes for Ticket Products
/**
* Event Tickets Plus - Disable Taxes for Ticket Products
*/
add_action( 'wootickets_after_save_ticket', 'tribe_disable_taxes_ticket_product' );
function tribe_disable_taxes_ticket_product( $ticket_id ) {
update_post_meta( $ticket_id, '_tax_status', 'none' );
update_post_meta( $ticket_id, '_tax_class', 'zero-rate' );
}
anonymous
anonymous / gist:7305387
Created November 4, 2013 16:40
$today = date("Y-m-d"); //today's date in MySQL format without the time. Used to compare start date custom field in events.
$wp_query = new WP_Query(
array(
'post_type' => array('tribe_events'),
'meta_query' => array(
array(
'key' => '_EventStartDate',
'value' => $today,
'compare' => '>=',
)
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh