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 / 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 / ZID Alias.txt
Last active April 21, 2021 12:57
Indianapolis ARTCC EuroScope Files
ALTIMETER SETTINGS
.acvg Cincinnati/Northern Kentucky altimeter is $altim(KCVG)
.aind Indianapolis altimeter is $altim(KIND)
.asdf Louisville altimeter is $altim(KSDF)
.acmh Port Columbus altimeter is $altim(KCMH)
.aevv Evansville altimeter is $altim(KEVV)
.acrw Charleston altimeter is $altim(KCRW)
.aday Dayton-Cox altimeter is $altim(KDAY)
.aluk Lunken altimeter is $altim(KLUK)
.aosu Ohio-State altimeter is $altim(KOSU)
@ddavison
ddavison / jekyll-site
Created February 22, 2016 00:38
Run a Jekyll site as an Ubuntu Service
#!/bin/sh -e
# ========================
# Start a Jekyll Server
# ========================
#
# Usage: /etc/init.d/jekyll-site {start|stop|force-reload|restart|status}
#
### BEGIN INIT INFO
# Provides: jekyll-site
import random
# simple guessing game
# We get the user input, if it's less than the right number, output. if it's greater than, same.
# If the number is matched. YOU WIN.
# You only have 10 tries.
# right number will be between 0 and 100
class GuessingGame:
def __init__(self):
dj@Daniels-MBP:~/downloads|⇒ java -jar selenium-server-standalone-3.0.0.jar -role node -remoteHost http://127.0.0.1:4444
Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -remoteHost
at com.beust.jcommander.JCommander.parseValues(JCommander.java:742)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.<init>(JCommander.java:210)
at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:257)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:147)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:73)
@ddavison
ddavison / TestFlipKart.java
Created October 30, 2013 15:06
Sample automation script to log in then log out of http://flipkart.com. Using the https://github.com/ddavison/getting-started-with-selenium framework.
@Config(url="http://flipkart.com", browser=Browser.FIREFOX)
public class TestFlipKart extends AutomationTest {
@Test
public void testLoginLogout() {
String username = "<username>";
String password = "<password>";
click(By.cssSelector("a[href*='/login']"))
.setText(By.cssSelector("input[name='email']"), username)
.setText(By.cssSelector("input[name='password']"), password)
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$(document).ready ->
$('#btn-submit-bundle').click (e) ->
e.preventDefault()
vals = []
$("select[name^='component_bundle'].select2-package").toArray().forEach((e) -> vals.append(e.value))
if vals.length < 1
Waiting xvfb...
20:25:26.952 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
20:25:26.953 INFO - Launching a Selenium Grid node
11/05/2017 20:25:27 passing arg to libvncserver: -rfbport
11/05/2017 20:25:27 passing arg to libvncserver: 5900
11/05/2017 20:25:27 -usepw: found /root/.vnc/passwd
11/05/2017 20:25:27 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 100
11/05/2017 20:25:27 Using X display :99.0
11/05/2017 20:25:27 rootwin: 0x25c reswin: 0x200001 dpy: 0x1f519b0
11/05/2017 20:25:27
@ddavison
ddavison / hub.sh
Last active April 3, 2017 14:42
Selenium Grid Workshop from Command Line
java -jar selenium-server-standalone-3.0.1.jar -role hub
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);
@-moz-document regexp("^https?://((raw[2-9]*|gist|guides|help|status|developer)\.)?github\.com.*") {
/***********************************************
* Github Dark Theme v1.8.7 (3/22/2014)
* https://github.com/StylishThemes/GitHub-Dark
* http://userstyles.org/styles/37035
* License: http://sam.zoy.org/wtfpl/
***********************************************/
body {