Skip to content

Instantly share code, notes, and snippets.

View spencercarnage's full-sized avatar

Spencer Carney spencercarnage

View GitHub Profile
@spencercarnage
spencercarnage / gist:5abc4fd174ee4fb374e8
Created July 9, 2014 19:53
config update action timeout
{
message: "action:timeout",
action_id: "4dafb356-461b-48d5-bd19-49533cb504cc91"
}
@spencercarnage
spencercarnage / compass cli callback
Last active January 4, 2016 01:09
Execute commands from CLI to perform specfic Grunt task(s) after Compass compilation
# Add this to your Compass config.rb to perform a Grunt-specific task after Compass
# compiles your Sass.
# see if a shell command exists
def which(cmd)
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
exts.each { |ext|
exe = File.join(path, "#{cmd}#{ext}")
return exe if File.executable? exe
@spencercarnage
spencercarnage / gist:6786259
Created October 1, 2013 22:30
Sample grunt config using browserify
module.exports = function(grunt) {
  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
browserify: {
pages: {
files: [
{
expand: true,
cwd: 'javascript/src/pages/',
//Wait for relevant code bits to load before starting any tests
define(['core.js'], function( core ) {
module("Core Tests");
test("Test core methods", function(){
expect(2);
equals( 1, 1, "A trivial test");
ok( true, "Another trivial test");
});
@spencercarnage
spencercarnage / require.js is loading the data-main script twice
Last active December 14, 2015 11:19
require.js is loading the data-main script twice
<!DOCTYPE doctype 5>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title></title>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<script data-main="js/test" src="/js/libs/require-2.1.4.js"></script>
</head>
alias glg='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset" --abbrev-commit --date=relative'
$(window).load(function(){
if (!Modernizr.input.placeholder){
$('input').supportPlaceHolder();
}
if (!Modernizr.textarea.placeholder){
$('textarea').supportPlaceHolder();
}
});