Skip to content

Instantly share code, notes, and snippets.

View rjmcdonald83's full-sized avatar

Ryan McDonald rjmcdonald83

  • Freelance Responder Advocate
  • Boulder
View GitHub Profile
var arr = [1,2,3,4];
for (var i = 0, len = arr.length; i < len; i++) {
var el = arr[i];
setTimeout(function () {
console.log(el);
}, 10);
}
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
var connect = require('connect')
, exec = require('child_process').execFile
var app = connect()
.use(connect.json())
.use(function(req, res) {
if (!!~ req.body.ref.indexOf('gh-pages'))
return res.end("OK");
console.log("DEPLOYING...")