Skip to content

Instantly share code, notes, and snippets.

View DylanLacey's full-sized avatar

The Gentlehacker DylanLacey

View GitHub Profile
@DylanLacey
DylanLacey / Gemfile
Last active January 4, 2016 06:00
Using Capybara and Minitest with Sauce Labs
# Add to your gemfile
# If you're using Rails, you might want to add to the :development and :test group
gem "sauce_whisk"
@DylanLacey
DylanLacey / enable_tls11.bat
Last active September 1, 2023 10:50
Enable TLS 1.1 and 1.2 in Windows
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" /v DisabledByDefault
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
@DylanLacey
DylanLacey / no_script_timeout.bat
Last active September 21, 2015 01:43
Disable IE's whining about script statements
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles" /v MaxScriptStatements /t REG_DWORD /d 10000000 /f
reg query "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles" /v MaxScriptStatements
@DylanLacey
DylanLacey / push.sh
Created August 13, 2015 02:27
Prerunpush
#!/bin/bash
/home/chef/android-sdk-linux/platform-tools/adb -s remount
/home/chef/android-sdk-linux/platform-tools/adb -s emulator-5554 push https://github.com/rwilkett/SauceScripts/blob/master/hosts /etc/hosts
@DylanLacey
DylanLacey / Gemfile
Created July 27, 2015 21:36
MYO Sauce Ruby integration
source "https://www.rubygems.org"
# All your other gems
gem "selenium-webdriver"
gem "sauce_whisk"
@DylanLacey
DylanLacey / google_spec.rb
Created July 17, 2015 00:08
Simple RSpec Selenium
require_relative "spec_helper"
describe "Google's Search Functionality" do
it "can find search results", :run_on_sauce => true do
@driver.manage.timeouts.implicit_wait = 10
@driver.navigate.to "http://www.google.com"
raise SystemError("Unable to load Google.") unless @driver.title.include? "Google"
query = @driver.find_element :name, "q"
@DylanLacey
DylanLacey / simple.rb
Last active August 29, 2015 14:25
Simple Selenium with Ruby and Sauce
require "selenium/webdriver"
sauce_endpoint = "http://USERNAME:[email protected]:80/wd/hub"
caps = {
:platform => "Mac OS X 10.9",
:browserName => "Chrome",
:version => "31"
}
@DylanLacey
DylanLacey / osx.sh
Last active August 29, 2015 14:20
Change Locale of browsers
#! /bin/bash
locale
defaults read -g AppleLocale
defaults write -g AppleLocale jp_JP
locale
@DylanLacey
DylanLacey / always_accept_cookies_ios7.sh
Created April 20, 2015 06:18
Always Accept Cookies, ios7
#! /bin/bash
/usr/libexec/PlistBuddy -c "Set NSHTTPAcceptCookies always" ~/Library/Application\ Support/iPhone\ Simulator/7.0.3/Library/Preferences/com.apple.WebFoundation.plist
@DylanLacey
DylanLacey / enable_all_cookies.sh
Last active February 12, 2016 09:30
Enable All Cookies for iOS 7.0
#!/bin/bash
# This works for iOS 8 Simulator; For 7 and 6 use prerun.sh
plist_command="Set NSHTTPAcceptCookies always"
echo "Running $plist_command against:"
for d in ~/Library/Developer/CoreSimulator/Devices/*/ ; do
web_plist=$d"data/Library/Preferences/com.apple.WebFoundation.plist"
echo " $web_plist"