Skip to content

Instantly share code, notes, and snippets.

View willmot's full-sized avatar

Tom Willmot willmot

View GitHub Profile
@xentek
xentek / generate_update.sh
Created November 19, 2011 21:34
Generate the necessary sql statements to move a WordPress site from one environment to another
#!/usr/bin/env bash
echo "@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@@ @@@ @@@@@@@@ @@@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@! !@@ @@! @@!@!@@@ @@! @@! @@! !@@ "
echo "!@! @!! !@! !@!!@!@! !@! !@! !@! @!! "
echo " !@@!@! @!!!:! @!@ !!@! @!! @!!!:! @!@@!@! "
echo " @!!! !!!!!: !@! !!! !!! !!!!!: !!@!!! "
echo " !: :!! !!: !!: !!! !!: !!: !!: :!! "
echo ":!: !:! :!: :!: !:! :!: :!: :!: !:! "
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@joehoyle
joehoyle / gist:2569751
Created May 1, 2012 17:16
WP_Query advanced post_parent
<?php
/**
* Advanced parent querying with WP_Query
*
* This lets you do somethign like:
*/
$query = new WP_Query( array(
@willmot
willmot / termmeta.php
Last active May 6, 2016 22:32
Add termmeta support to WordPress including a termmeta table and all the standard WordPress metadata functions
<?php
/**
* Setup the termmeta table
*
* Use <code>add_theme_support( 'term-meta' );</code> to enable support for term meta
*/
function hm_add_term_meta_table() {
global $wpdb;