Skip to content

Instantly share code, notes, and snippets.

View aaroncampbell's full-sized avatar

Aaron D. Campbell aaroncampbell

View GitHub Profile
markjaquith /
Created November 16, 2012 05:04 — forked from scribu/
Plugin deploy script
# args
MSG=${1-'deploy from git'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
tmtrademark / WidgetWithBehaviorScript.widget.php
Created August 25, 2011 23:15 — forked from westonruter/WidgetWithBehaviorScript.widget.php
Updtaed for 3.3, thanks xavisys || WidgetWithBehaviorScript: Template for a WordPress widget which enqueues an accompanying behavior script; script only output if widget is rendered.
class WidgetWithBehaviorScript extends WP_Widget {
function __construct() {
parent::__construct(__CLASS__, 'Widget with Accompanying Behavior Script', array(
'classname' => __CLASS__,
'description' => "This WordPress widget serves as a pattern for how to enqueue a script only if the widget is actually rendered."
markjaquith /
Created August 16, 2011 19:33
TLC Transients — On the fly WordPress transients with soft expiration and one-liner chained syntax.