Skip to content

Instantly share code, notes, and snippets.

View jsdevel's full-sized avatar

Joe Spencer jsdevel

View GitHub Profile
@jsdevel
jsdevel / mithro-chrome-setup-for-travis.bash
Last active August 29, 2015 14:01
@mitrho's travis setup script for Chrome.
#! /bin/bash
set -x
set -e
# Make sure /dev/shm has correct permissions.
ls -l /dev/shm
sudo chmod 1777 /dev/shm
ls -l /dev/shm
@jsdevel
jsdevel / gist:99a5d736fbdd6c86d455
Last active August 29, 2015 14:01
WebDriverWait example with webdriver-sync
var byLocator = By.cssSelector('.some.selector');
var timeout = 5;//seconds
var element = (new WebDriverWait(driver, timeout))
.until(ExpectedConditions.visibilityOfElementLocated(byLocator));
console.log(element.getText());
name="global";
var a = {
name:"a",
prop:Func,
b:{
name:"b",
prop:Func
}
};
@jsdevel
jsdevel / JSStateWithBitFlags.js
Created September 20, 2013 18:07
bit masking fun with javascript.
/**
* A map of bit masks that correlate to a person's status.
* @type {Object}
*/
var personStatus=(function(){
var i=0.5;
return {
CODING:(i*=2),
EATING:(i*=2),
READING:(i*=2),