Skip to content

Instantly share code, notes, and snippets.

@geekdave
geekdave / start_sc.sh
Last active May 30, 2016 04:06 — forked from mehmetg/start_sc.sh
Starts 5 SC instances for round robin load balancing and 1 for command relay. Relies on https://gist.github.com/mehmetg/9cdc77269ddef72ebc84
#!/usr/bin/env bash
#This script is intended to be run from the root of the sauce connect package.
SCBIN="bin/sc"
uname=$1
akey=$2
uname=$SAUCE_USERNAME
akey=$SAUCE_ACCESS_KEY
export tunnelId=$SAUCE_TUNNEL_ID
LOGPREFIX="/tmp"
@geekdave
geekdave / gist:f2f482d2f1ac8db0cb7b
Created September 11, 2014 19:10
Nightwatch / SauceLabs Stats Updating
updateStats: function (client, allPassed, callback) {
var data = JSON.stringify({
"passed" : allPassed
});
var requestPath = '/rest/v1/'+ client.options.username +'/jobs/' + client.sessionId;
try {
console.log('Updaing saucelabs', requestPath);
var req = https.request({
@geekdave
geekdave / form.html
Created April 9, 2012 17:02
Knockback: 2-way Data Binding with Knockout and Backbone
Name: <input data-bind="value: name" type="text"/><br>
Age: <input data-bind="value: age" type="text"/><br>
Evil: <input type="checkbox" data-bind="checked: evil" /><br>​
@geekdave
geekdave / backbone.subroute.js
Created April 5, 2012 22:32
backbone.subroute extends the functionality of Backbone.Router such that each of an application's modules can define its own module-specific routes.
// improved backbone subrouting.
// based on tim branyan's gist: https://gist.github.com/1235317
if ( !this.Backbone ) {
throw new Error( 'Error: backbone.js must be included before this file' );
}
Backbone.SubRoute = Backbone.Router.extend( {
constructor:function ( prefix ) {
var routes = {};
@geekdave
geekdave / app.js
Created April 5, 2012 15:53 — forked from nagyv/app.js
backbone.js sub routing
var MyApp = {};
MyApp.Router = Backbone.Router.extend({
routes: {
// general routes for cross-app functionality
"" : "showGeneralHomepage",
"cart" : "showShoppingCart",
"account" : "showMyAccount",
// module-specific subroutes: