Skip to content

Instantly share code, notes, and snippets.

View MatthewEppelsheimer's full-sized avatar

Matthew Eppelsheimer MatthewEppelsheimer

View GitHub Profile
@MatthewEppelsheimer
MatthewEppelsheimer / boilerplate_register_taxonomy
Last active March 4, 2016 16:08
WordPress register_taxonomy() boilerplate
// Prepare post types to associate taxonomy with
// This will only return public post types (excluding for example attachments, revisions, and nav_menu_items)
$object_types = get_post_types( array( 'public' => true ), 'names' );
// Prepare args to register taxonomy
$args = array(
'label' => _x( 'Objects', 'object taxonomy label' ) // plural label
@attaboy
attaboy / gist:1346280
Created November 7, 2011 21:40
Destroy the localStorage copy of less.js client-side-generated CSS
// Destroys the localStorage copy of CSS that less.js creates
function destroyLessCache(pathToCss) { // e.g. '/css/' or '/stylesheets/'
if (!window.localStorage || !less || less.env !== 'development') {
return;
}
var host = window.location.host;
var protocol = window.location.protocol;
var keyPrefix = protocol + '//' + host + pathToCss;
@shaneog
shaneog / es.sh
Created September 6, 2011 17:04 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get install unzip
sudo apt-get install python-software-properties -y
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz