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
// For Reference | |
const states = [] | |
let calls = -1 | |
function useState(value) { | |
const call = ++calls | |
if (states[call]) { | |
return states[call] |
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/bash | |
############################################################ | |
##### Easy setup script for Mac OSX Yosemite or Higher ##### | |
##### Sets up apps and tools useful to SDETs on Mac. ##### | |
##### ##### | |
##### Note: you may be prompted to enter your password ##### | |
##### At certain times during the install ##### | |
############################################################ |
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
ax_peak = 0; | |
ax_avg = 0; | |
ax_count = 0; | |
setInterval(function() { | |
rps = parseFloat($("#total_rps").text()) | |
ax_avg = (ax_avg * ax_count + rps) / (++ax_count); | |
if(rps > ax_peak) { | |
ax_peak = rps; |
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
############################################################################################## | |
# Powershell script for installing Selenium Grid Extras in Hub Mode | |
# Navigate with internet explorer to: | |
# http://boxstarter.org/package/nr/url? + raw gist url | |
# | |
############################################################################################## | |
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? |
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
cinst GoogleChrome | |
cinst Firefox | |
cinst SeleniumServer | |
cinst SeleniumChromeDriver2 | |
cinst SeleniumIEDriver | |
cinst fiddler4 | |
cinst phantomjs |
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
''' | |
Created on Nov 15, 2013 | |
@author: "David Lai" | |
''' | |
import shlex, subprocess | |
if __name__ == '__main__': |
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
# Product model | |
App.Product = DS.Model.extend( | |
descripton: DS.attr('string') | |
expirationDate: DS.attr('date') | |
imageUrl: DS.attr('string') | |
location: DS.attr('string') | |
quantity: DS.attr('number') | |
quantityUnit: DS.attr('string') | |
type: DS.attr('string') | |
profile: DS.belongsTo('profile') |
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
YAHOO.util.Connect.asyncRequest("GET", | |
"/services/library/json/?action=getLibraryFiles&status=P", | |
{ success: function(o) { | |
var response = JSON.parse( o.responseText); | |
var fileList = response.list.filter( function(item) { | |
return item.batch == "N"; | |
}); | |
var fileEntry = fileList.filter( function(item) { | |
return item.fileName == "2013-08-06_11.50.39_testfile_vuPk.txt"; | |
})[0]; |
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
def show_clapper(text, webdriver=None): | |
""" | |
Place a visibile line of logging text into the sauce logs. | |
@param driver: Selenium webdriver (should be a instance of Remote webdriver. | |
@param text: Text to log. | |
""" | |
print "Logging in remote webdriver: ", text | |
if webdriver is None: |
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
App = Ember.Application.create(); | |
App.Router.map(function() { | |
// put your routes here | |
}); | |
App.Store = DS.Store.extend({ | |
adapter: DS.FixtureAdapter.create() | |
}); |
NewerOlder