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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
// Check if a web page sniffs the user agent or not. | |
var page = require('webpage').create(), | |
sniffing, address; | |
page.onInitialized = function () { | |
page.evaluate(function () { | |
window.originalNavigator = window.navigator; |
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
node_modules | |
*.swp |
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
// @author: Vishal Telangre <[email protected]> | |
// Published under MIT license. | |
// | |
// Requires: jQuery | |
// | |
// Usage: | |
// | |
// ieInspector.isIe | |
// -- returns | |
// - true for IE browsers |
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 webdriver = require('selenium-webdriver'); | |
var fs = require('fs'); | |
var driver = new webdriver.Builder().build(); | |
webdriver.WebDriver.prototype.saveScreenshot = function(filename) { | |
return driver.takeScreenshot().then(function(data) { | |
fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) { | |
if(err) throw err; | |
}); |
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
/*global console */ | |
/* | |
* In this file, we do a search for two non-existent selectors | |
* However the failure of only one of them contains the error we actually want | |
*/ | |
(function() { | |
"use strict"; |
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 | |
set -e | |
if [ -e /.installed ]; then | |
echo 'Already installed.' | |
else | |
echo '' | |
echo 'INSTALLING' | |
echo '----------' |
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 AWS = require('aws-sdk'), | |
fs = require('fs'); | |
// For dev purposes only | |
AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); | |
// Read in the file, convert it to base64, store to S3 | |
fs.readFile('del.txt', function (err, data) { | |
if (err) { throw err; } |
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
(function (root, factory) { | |
if ( typeof define === 'function' && define.amd ) { | |
define([], factory(root)); | |
} else if ( typeof exports === 'object' ) { | |
module.exports = factory(root); | |
} else { | |
root.myPlugin = factory(root); | |
} | |
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
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
/** | |
* Merge defaults with user options | |
* @private | |
* @param {Object} defaults Default settings | |
* @param {Object} options User options | |
* @returns {Object} Merged values of defaults and options | |
*/ | |
var extend = function ( defaults, options ) { | |
var extended = {}; | |
var prop; |
OlderNewer