Skip to content

Instantly share code, notes, and snippets.

View carldanley's full-sized avatar

Carl Danley carldanley

View GitHub Profile
@carldanley
carldanley / .jshintignore
Last active December 21, 2015 23:48 — forked from haschek/.jshintrc
// --------------------------------------------------------------------
// WordPress JSHint Ignored
// --------------------------------------------------------------------
wp-admin/js/farbtastic.js
wp-admin/js/iris.min.js
wp-includes/js/crop/*
wp-includes/js/imgareaselect/*
wp-includes/js/jcrop/*
wp-includes/js/jquery/*
wp-includes/js/mediaelement/*
<?php
/**
* Class WP_Stripe
* Author: Carl Danley
*
* This class handles processing any Stripe actions by letting the WP HTTP API do all of the heavy lifting.
*
*/
@carldanley
carldanley / dom-ready.js
Created September 5, 2012 16:35
Simple DOM ready() detection without jQuery
var DOM = new function(){
var IS_READY = false;
var CALLBACKS = [];
var SELF = this;
SELF.ready = function( callback ){
//check to see if we're already finished
if( IS_READY === true && typeof callback === 'function' ){
callback();
return;
@carldanley
carldanley / tour.js
Created September 1, 2012 05:13
tour.js Beta Code
var myTour = tours.createTour( 'my-awesome-tour' );
//feature the menu now
myTour.disableScrolling()
.createBackground( '#000', 0.00 )
.fadeBackground( 0.4, 500 )
.scrollTo( 'body', 1000 )
.wait( 500 )
.showCursor( )
.trackProgress( true )
@carldanley
carldanley / cd-twitter.php
Created August 29, 2012 14:13
CD Twitter Caching
<?php
//------------------------------------------------------------------------------
class CD_Twitter{
protected $_base_twitter_url = 'https://api.twitter.com/1/statuses/user_timeline.json?';
protected $_default_options = array(
'include_entities' => true,
'include_rts' => true,
'screen_name' => 'carldanley',
'count' => 10
);
@carldanley
carldanley / box-example.js
Created August 28, 2012 21:04
Box Example
function createBoxes(){
var html = '';
var boxesToCreate = 50;
//create the container node
var container = document.createElement( 'div' );
container.className = 'container';
//create the boxes and add them to the container
for( var i = 0; i < boxesToCreate; i++ ){