Skip to content

Instantly share code, notes, and snippets.

View danemacaulay's full-sized avatar

Dane Macaulay danemacaulay

View GitHub Profile
/*global module: true, require: true, __dirname: true */
module.exports = function(grunt) {
'use strict';
var scripts,
config;
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
@danemacaulay
danemacaulay / failing-post-parameters
Created September 17, 2014 19:58
failing-post-parameters
{
"account":{
"id":"e3fb5115-e010-e311-955e-005056a91854",
"company":{
"name":"Dell Inc.",
"address":{
"address1":"1 Dell Way",
"city":"Round Rock",
"state":"TX",
"postalCode":"78682",
@danemacaulay
danemacaulay / working one
Created September 17, 2014 19:58
working one
{
"account":{
"id":"8869c30d-a23e-e411-8632-005056a91854",
"ownerName":"Dane MacAulay",
"company":{
"name":"Kellog",
"address":{
"address1":"1 Kellogg Sq",
"city":"Battle Creek",
"state":"MI",
@danemacaulay
danemacaulay / index.js
Created October 28, 2014 22:08
famous with browserify
'use strict';
// load css
require('./styles');
// Load polyfills
require('famous-polyfills');
// import dependencies
var Engine = require('famous/core/Engine');
function passedThing () {
console.log('passedThing');
}
function anotherThing () {
console.log('anotherThing');
}
function changeThing () {
passedThing = anotherThing;
:host:www.gstatic.com
:method:GET
:path:/og/_/js/k=og.og2.en_US.5iiIdIiN4rc.O/rt=j/m=sy0,sy2,sy3,drt,sy4,sy9,def/rs=AItRSTO15owAcNqlvIuGBQd8SJPdBIe15w
:scheme:https
:version:HTTP/1.1
accept:*/*
accept-encoding:gzip,deflate,sdch
accept-language:en-US,en;q=0.8
cache-control:no-cache
pragma:no-cache
@danemacaulay
danemacaulay / helpers.js
Created November 8, 2014 18:03
console log shim for older browsers
(function () {
'use strict';
window.console = window.console || {};
if (typeof Envjs !== 'undefined') {
return;
}
var methodNames = [
'assert',
'clear',
function setAuthenticationHeaders(config, authService) {
// Is this a local URL? If so, add auth headers, but don't overwrite
// any that are not already set - this allows someone to pass in
// overrides if so desired.
//
// Note: we don't want to send out headers to URLs that will go out to
// the CDN. This would be very bad. This path check should be sufficient
// to that end.
if (config.url.indexOf('/DNB360UIAgent/') === 0) {
var authHeaders = authService.authHeaders();
@danemacaulay
danemacaulay / Vagrantfile
Created April 24, 2015 20:17
java6 vagrantfile
require 'rbconfig'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
'use strict';
var string = require('string');
var fs = require('fs');
var path = require('path');
var glob = require('glob');
var cheerio = require('cheerio');
glob('app/**/*.html', {}, function(er, files) {