View backbone.fetch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'underscore'; | |
import Backbone from 'backbone'; | |
import {stringify} from 'qs'; | |
const backboneSync = Backbone.sync.bind(Backbone); | |
const MIME_TYPE_JSON = 'application/json'; | |
const MIME_TYPE_DEFAULT = 'application/x-www-form-urlencoded; charset=UTF-8'; | |
Backbone.sync = (method, model, options) => { |
View post-merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# noah grant | |
# quick script to call bower install and npm install automatically if | |
# bower.json or package.json are changed, respectively. | |
# add to .git/hooks/ | |
# this assumes one top-level file for each | |
changedfiles=( `git diff --name-only HEAD@{1}` ) |
View Dynamically loading tasks from useminPrepare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gruntfile.js | |
'use strict'; | |
var path = require('path'); | |
module.exports = function (grunt) { | |
// Load externally-defined tasks | |
grunt.loadTasks('tasks/grunt'); |
View gist:5044155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
request = require('request'), | |
util = require('util'), | |
jsdom = require('jsdom'), | |
jquery = require('jquery'), | |
xhr = require('xmlhttprequest'); | |
exports.test = function(req,res) { | |
request('http://www.lg.com/us/washers/all-washers', function(err, response, body) { |