Skip to content

Instantly share code, notes, and snippets.

View davidhemphill's full-sized avatar

Hemp davidhemphill

View GitHub Profile
(function() {
'use strict';
var gulp = require('gulp'),
gutil = require('gulp-util'),
dot = require('gulp-dot'),
less = require('gulp-less'),
sass = require('gulp-sass'),
rm = require('rimraf'),
reload = require('gulp-livereload'),
@davidhemphill
davidhemphill / KEmgk.markdown
Created May 12, 2014 21:03
A Pen by David Hemphill.
{
"name": "CourtneyIsACoolHead",
"version": "1.0.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.6.0",
"grunt-contrib-watch": "~0.5.3"
}
}
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options: {
livereload: true,
},
livereload: {
@davidhemphill
davidhemphill / SassMeister-input.scss
Created December 4, 2013 16:56 — forked from lunelson/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
@davidhemphill
davidhemphill / README.md
Last active December 29, 2015 10:59
Getting started with Sassc and Codekit

Getting Started With Sassc

1. Get libsass

  • clone libsass library repo
  • add export SASS_LIBSASS_PATH=/Users/username/path/libsass to ~/.bash_profile

2. Build Sassc

  • clone sassc repo
  • cd into sassc dir
  • cd sassc
@davidhemphill
davidhemphill / gist:7267059
Created November 1, 2013 15:24
Install Sass, Bourbon, and Neat
curl -L -s http://davehe.mp/zTLk | bash
@davidhemphill
davidhemphill / This is how you do rotators in Jonah CMS
Last active December 26, 2015 03:38
Jonah CMS: Setting up Rotators
This is how you do rotators in Jonah CMS
@davidhemphill
davidhemphill / jquery.schedule.js
Created September 26, 2013 19:49
jQuery Schedule Plugin - Schedule divs to show based on the timestamp in a data attribute
$.fn.timeBased = function ( options ) {
options = $.extend( {}, $.fn.timeBased.defaults, options );
return this.each( function ( i, el ) {
var $el = $( el );
var dStart = Date.parse( $el.data( "start" ) );
var dEnd = Date.parse( $el.data( "end" ) );
var state = "uninitialized";
@davidhemphill
davidhemphill / jquery.toggle.js
Created August 14, 2013 19:28
jQuery Plugin to add Toggle functionality back.
jQuery.fn.toggle = function( fn, fn2 ) {
// Don't mess with animation or css toggles
if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
return oldToggle.apply( this, arguments );
}
// migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
// Save reference to arguments for access in closure
var args = arguments,
guid = fn.guid || jQuery.guid++,
i = 0,