http://james.padolsey.com/javascript/get-document-height-cross-browser/
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 shimConfig = (function (grunt) { | |
return function (property) { | |
var shim = {}; | |
var dir = grunt.file.readJSON('package.json').browserDependencies[property].dir; | |
grunt.file.readJSON('package.json').browserDependencies[property].files | |
.forEach(function (conf) { | |
var currentShim = shim[conf.require_by] = {}; | |
currentShim.path = dir + '/' + Object.keys(conf)[0]; | |
currentShim.exports = conf.exports; | |
if (conf.depends) { |
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
browserify: { | |
modern: { | |
src: ['client/js/init.js'], | |
dest: 'built/static/js/<%= pkg.name %>.js', | |
options: { | |
debug: true, | |
noParse: [], | |
transform: [ | |
'hbsfy' | |
] |
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
# python alphabetize-json test.json | |
import json | |
import sys | |
args = sys.argv[1:] | |
for json_file in args: | |
with open(json_file, 'r') as file: | |
alphabetized = json.loads(file.read()) | |
with open(json_file, 'w') as w: |
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
// Usage: | |
// var express = require('express') | |
// require('enableMultipleViewRoots')(express) | |
module.exports = function(express) { | |
var old = express.view.lookup; | |
function lookup(view, options) { | |
// If root is an array of paths, let's try each path until we find the view | |
if (options.root instanceof Array) { |
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
'use strict'; | |
var expect = require('chai').expect; | |
describe('Page testing', function () { | |
it('Page title test.', function (done) { | |
browser | |
.url('http://127.0.0.1:8000') | |
//.setValue('#js-command-bar-field', 'grunt-webdriver') |
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
TypeError: Property 'handle' of object #<Object> is not a function | |
at next_layer (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/route.js:97:11) | |
at Route.dispatch (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/route.js:98:5) | |
at c (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/index.js:196:24) | |
at Function.proto.process_params (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/index.js:255:12) | |
at next (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/index.js:190:19) | |
at next_layer (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/route.js:77:14) | |
at next_layer (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/route.js:81:14) | |
at Route.dispatch (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/router/route.js:98:5) | |
at c (/Users/Adminstrator/Desktop/node-startup/node_modules/express/lib/rout |
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 webdriverjs = require('../index'), | |
client = webdriverjs.remote({ | |
desiredCapabilities: { | |
browserName: 'chrome', | |
version: '27', | |
platform: 'XP', | |
tags: ['examples'], | |
name: 'This is an example test' | |
}, | |
host: 'ondemand.saucelabs.com', |
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
/*! d3.chart - v0.2.0 | |
* License: MIT Expat | |
* Date: 2014-02-21 | |
*/ | |
module.exports = function(D3) { | |
"use strict"; | |
/*jshint unused: false */ | |
var d3 = D3; | |
var hasOwnProp = Object.hasOwnProperty; |
OlderNewer