Skip to content

Instantly share code, notes, and snippets.

driver.manage().window().setSize(1280, 1280);
driver.get('http://wesleyhales.com').then(function() {
driver.wait(function () {
return driver.executeScript('' +
'if(performance.getEntriesByType("resource").length > 0){return performance.getEntriesByType("resource")}else{return false}' +
'').then(function (return_value) {
if(return_value){
console.log(return_value);
return true;
var capabilities = {
'applicationName' : 'sfo1-node'
};
var driver = new webdriver.Builder()
.withCapabilities(capabilities)
.forBrowser('chrome')
.setChromeOptions(options)
.usingServer('http://[your hub IP]:4444/wd/hub')
.build();
var exports = module.exports = {};
var webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
fs = require('fs');
var options = new chrome.Options();
var logging_prefs = new webdriver.logging.Preferences();
logging_prefs.setLevel(webdriver.logging.Type.PERFORMANCE,
webdriver.logging.Type.SERVER,
curl -O https://raw.githubusercontent.com/wesleyhales/speedgun/master/core/speedgun.js && \
phantomjs speedgun.js http://wesleyhales.com -o junit --screenshot
##before state
curl -Lk "http://speedgun.io/rest/performance/go?cached=false&email=&url=http:%2F%2Fwww.wesleyhales.com" | jq -r '.uuid' >> beforeUuids.txt
#!/bin/sh
args=("$@")
#SERVER_MODE=${args[0]}
#echo "running in $SERVER_MODE mode"
if $(curl -s --head --request GET http://localhost | grep "200 OK" > /dev/null); then
echo "site is up"
else
console: ----navigation
console: type 0
console: redirectCount 0
console: TYPE_BACK_FORWARD 2
console: TYPE_RELOAD 1
console: TYPE_NAVIGATE 0
console: TYPE_RESERVED 255
console: ----timing
console: connectStart 1407881521415
console: navigationStart 1407881521415
gem install travis
travis encrypt -r username/repo_name "GH_TOKEN=dfjdshfjksdhfjkshdjkfhdsjkfhjksdhk"
"id": 2126104,
"url": "https://api.github.com/authorizations/2126104",
"app": {
"name": "token for pushing from travis (API)",
"url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api"
},
"token": "dfjdshfjksdhfjkshdjkfhdsjkfhjksdhk",
"note": "token for pushing from travis",
"note_url": null,
@wesleyhales
wesleyhales / github-oauth.sh
Created March 30, 2013 00:05
generate oauth token for github access
curl -X POST -u <your_github_username> -H "Content-Type: application/json" -d "{\"scopes\":[\"public_repo\"],\"note\":\"token for pushing from travis\"}" https://api.github.com/authorizations