Skip to content

Instantly share code, notes, and snippets.

Spencer Carney spencercarnage

Block or report user

Report or block spencercarnage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spencercarnage
spencercarnage / compass cli callback
Last active Jan 4, 2016
Execute commands from CLI to perform specfic Grunt task(s) after Compass compilation
View compass cli callback
# 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 Oct 1, 2013
Sample grunt config using browserify
View gist:6786259
module.exports = function(grunt) {
  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
browserify: {
pages: {
files: [
{
expand: true,
cwd: 'javascript/src/pages/',
View core.test.js
//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 Dec 14, 2015
require.js is loading the data-main script twice
View 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>
View glg
alias glg='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset" --abbrev-commit --date=relative'
View application.js
$(window).load(function(){
if (!Modernizr.input.placeholder){
$('input').supportPlaceHolder();
}
if (!Modernizr.textarea.placeholder){
$('textarea').supportPlaceHolder();
}
});
You can’t perform that action at this time.