Skip to content

Instantly share code, notes, and snippets.

@mdsauce
mdsauce / Howto
Last active December 16, 2020 00:48
HowTo file
# How to from ~/.howto
# Check the ulimit
ulimit -n
# Raise the ulimit to the recommended 8000
ulimit -n 8000
# Launch standard sauce connect
bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY
@mdsauce
mdsauce / basic-build-test.py
Created November 6, 2018 19:28
basic-build-test.py
from selenium import webdriver
from sauceclient import SauceClient
from random import randint
import os
username = os.environ.get('SAUCE_USERNAME')
access_key = os.environ.get('SAUCE_ACCESS_KEY')
sauce_client = SauceClient(username, access_key)
buildNum = randint(1,1000)
@mdsauce
mdsauce / .vimrc
Created November 25, 2018 22:09
Vimrc file and setting
syntax on
set background=light
set number
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
# losf -i :<portnumber in question>
lsof -i :8000
@mdsauce
mdsauce / nethelp-cli.txt
Last active January 16, 2019 23:52
nethelp CLI
Nethelp Proposal and Basic Usage Examples
Best Scenario
-------------
User has solid internet connection and can reach Sauce services
$ nethelp —proxy user:password
[x] connect to public website status.saucelabs.com
[x] connect to RDC US endpoint
[x] connect to RDC EU endpoint
@mdsauce
mdsauce / health-check.txt
Created January 16, 2019 23:55
Sauce Labs Health Check Suite and Docker Container
What pain is addressed?
-------------------------
Keep Support updated in near real time about failures.
Requirements
- Check if a SC tunnel can start
- Check if a SC tunnel can stay open for arbitrary amount of time
- VDC Check if every OS can start a test in the latest browser
- VDC Check if the latest simulators can start
- RDC Check if an Appium test can start
@mdsauce
mdsauce / python-failing-continues-sending.py
Created May 30, 2019 23:58
test fails yet continues sending commands
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from sauceclient import SauceClient
import os
username = os.environ.get('SAUCE_USERNAME')
@mdsauce
mdsauce / python-failing-exit-stop.py
Created May 30, 2019 23:59
test fails and then kills process, stopping future commands
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from sauceclient import SauceClient
import os
username = os.environ.get('SAUCE_USERNAME')
@mdsauce
mdsauce / pre-commit
Created August 14, 2019 21:47
Go pre-commit hook for `.git/hooks` snippet for keeping code formatted
#!/bin/sh
# Must be named 'pre-commit' with no extension
# run go fmt then exit
echo running go fmt tool
go fmt ./...
exit 0