Skip to content

Instantly share code, notes, and snippets.

View ddavison's full-sized avatar
🌐
Working Remotely

Dj ddavison

🌐
Working Remotely
View GitHub Profile
@ddavison
ddavison / doit.sh
Created April 24, 2015 16:53
Minimal setup for Selenium Grid
# Open 2 terminals.
# TERMINAL 1:
$ cd /path/to/selenium
$ ls
selenium-server-standalone.jar
$ java -jar selenium-server-standalone.jar -role hub
# TERMINAL 2:
$ cd /path/to/selenium
@ddavison
ddavison / gist:8deea7fcff0518a2ff98
Created April 16, 2015 22:35
Ron Swanson Government Quote
Government is a greedy piglet that suckles on a taxpayers teet until they have sore chapped nipples.
@ddavison
ddavison / .gitconfig
Last active August 29, 2015 14:17
Git Commit Signoff
[remote "origin"]
url = <repo>
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
@ddavison
ddavison / disable_java.py
Created March 20, 2015 13:58
firefox profile disable java selenium
import os
from selenium import webdriver
fp = webdriver.FirefoxProfile()
fp.set_preference("extensions.blocklist.enabled",False)
browser = webdriver.Firefox(firefox_profile=fp)
@ddavison
ddavison / test.java
Created March 19, 2015 12:46
WebElement caching?
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
/**
* @author ddavison
* @since Mar 18, 2015
*/
@ddavison
ddavison / server.go
Created March 4, 2015 19:29
a go http server
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"strconv"
)
function cake-new() {
if [[ $# -lt 1 ]]; then
echo "usage: $0 <app-name>"
else
app_name="$1"
cp -R "/Users/ddavison/workspace/cake-php-base" "/Users/ddavison/workspace/apache/$1"
ln -s /Users/ddavison/workspace/apache/$1/app/Console/cake /Users/ddavison/workspace/apache/$1/cake
chmod -R ugo+rw /Users/ddavison/workspace/apache/$1/app
echo "./cake" >> .gitignore
mv "/Users/ddavison/workspace/apache/$1/app/Config/database.php.default" "/Users/ddavison/workspace/apache/$1/app/Config/database.php"
@ddavison
ddavison / Linux32.sh
Last active February 24, 2022 17:31
Chromedriver Download Scripts
#!/bin/sh
####
# Author: ddavison
# Description: Download the Linux chromedriver into the current directory
####
function downloadchrome {
# latest=`curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
version="2.9"
download_location="http://chromedriver.storage.googleapis.com/$version/chromedriver_linux32.zip"
rm /tmp/chromedriver_linux32.zip
@ddavison
ddavison / download_chromedriver x32.sh
Last active August 29, 2015 14:07
Download Linux Chromedriver x32
#!/bin/sh
####
# Author: ddavison
# Description: Download the Linux chromedriver into the current directory
####
function downloadchrome {
latest=`curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
download_location="http://chromedriver.storage.googleapis.com/$latest/chromedriver_linux32.zip"
wget -P /tmp $download_location
unzip /tmp/chromedriver_linux32.zip -d .
@ddavison
ddavison / download_chromedriver.sh
Last active August 29, 2015 14:07
Download Mac Chromedriver
#!/bin/sh
####
# Author: ddavison
# Description: Download the Mac chromedriver into the current directory
####
function downloadchrome {
latest=`curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
download_location="http://chromedriver.storage.googleapis.com/$latest/chromedriver_mac32.zip"
wget -P /tmp $download_location
unzip /tmp/chromedriver_mac32.zip -d .