Skip to content

Instantly share code, notes, and snippets.

View DylanLacey's full-sized avatar

The Gentlehacker DylanLacey

View GitHub Profile
#!/usr/bin/env bash
defaults write /Users/chef/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist WebKitPreferences.tabFocusesLinks -bool true
@DylanLacey
DylanLacey / TestBase.js
Created February 20, 2020 03:23
TestNG WebDriver Session Cleanup Code
/**
* Simple TestNG test which demonstrates being instantiated via a DataProvider in order to supply multiple browser combinations.
*
* @authors Neil Manvar, Dylan Lacey
*/
public class TestBase {
// SNIP
/**
// This is how your screener config might look to start with
var Steps = require('screener-runner/src/steps');
module.exports = {
// full repository name for your project:
projectRepo: 'dylan/fake-screener',
// this example assumes Environment Variables listed below exist on your system:
apiKey: "some_key",
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData" /v "UserFilter" /d "411F00005308ADBA010000002C00000001000000010000000C0000008233A42AE9D7D4010100000007007500680063002E0063006F006D00" /t REG_BINARY /f
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData" /s /v "UserFilter"
@DylanLacey
DylanLacey / wdio.conf
Created March 4, 2019 01:53
WDIO Config for bug report
exports.config = {
//
// ====================
// Runner Configuration
// ====================
//
// WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or
// on a remote machine).
runner: 'local',
//
@DylanLacey
DylanLacey / capybara_driver.rb
Created October 20, 2018 00:29
A POC for redirecting traffic from one Sauce Connect proxy to multiple upstream proxies
Capybara.register_driver :remote do |app|
capabilities = {
browserName: "Chrome",
platform: "Windows 10",
version: "60"
}# {Put your Sauce Labs Desired Capabilities here as a hash}
capabilities[:name] = scenario.full_description # Give the Sauce Labs test a decent name
client = Selenium::WebDriver::Remote::Http::Default.new
client.open_timeout = 1500 # Optional; Deals with long session start times
@DylanLacey
DylanLacey / a_failing_test.js
Created September 25, 2018 07:18
Several Node Examples
const webdriver = require("selenium-webdriver");
username = process.env.SAUCE_USERNAME;
accessKey = process.env.SAUCE_ACCESS_KEY;
driver = new webdriver.Builder().withCapabilities({
'browserName': 'Chrome',
'platform': 'Windows 7',
'version': '68'
}).
usingServer("https://" + username + ":" + accessKey +
certutil.exe -urlcache -split -f %1 proxytest.py
echo fries
certutil.exe -urlcache -split -f "http://127.0.0.1:19876/pac.js" pac.js
c:\python27\python.exe proxytest.py
@DylanLacey
DylanLacey / prerun.sh
Last active September 18, 2018 06:07
#! /bin/bash
curl google.com
curl 223.134.5.106
#! python
# encoding: utf-8
import sys
import logging
import logging.handlers
import urllib
from urlparse import urlsplit, urlunsplit, urljoin