Skip to content

Instantly share code, notes, and snippets.

View spencercarnage's full-sized avatar

Spencer Carney spencercarnage

View GitHub Profile
alias glg='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset" --abbrev-commit --date=relative'
@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>
//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 / 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/',
@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 / webpack.config.js
Last active December 19, 2016 17:00
Webpack 2 Config
var path = require('path');
var merge = require('webpack-merge');
var webpack = require('webpack');
var ProgressPlugin = require('webpack/lib/ProgressPlugin');
var CleanPlugin = require('clean-webpack-plugin');
var webpackUtils = require('./webpackUtils'); // helper file for common tasks
var common;
var config;
common = {

Keybase proof

I hereby claim:

  • I am spencercarnage on github.
  • I am spencercarney (https://keybase.io/spencercarney) on keybase.
  • I have a public key ASA5uuLhRpHwpDAgUo-QIoHM4VQ-AbTX0br-612G95o1iAo

To claim this, I am signing this object: