Skip to content

Instantly share code, notes, and snippets.

View y3rsh's full-sized avatar
😊
One moment at a time.

Josh McVey y3rsh

😊
One moment at a time.
View GitHub Profile
@y3rsh
y3rsh / requirements.txt
Created August 18, 2022 15:34
Arm mac python 3.7.13 as close as possible to the robot
aiohttp==3.4.4
aionotify==0.2.0
aiosqlite==0.17.0
anyio==3.3.0
asgiref==3.4.1
async-timeout==3.0.1
attrs==18.2.0
bleach==3.1.0
cchardet==2.1.4
certifi==2022.6.15
@y3rsh
y3rsh / venv.shell
Created August 18, 2022 15:23
venv
cd ~
mkdir robot_python
cd robot_python
pyenv local 3.7.13
python -m venv venv
source ./venv/bin/activate
pip install pip==10.0.1
pip install setuptools==44.0.0
pip install -r requirements.txt
@y3rsh
y3rsh / getchromedriver.py
Last active January 4, 2023 05:24
Python script to get and install latest chromedriver. Needs requests and Python 3 😊
import requests
import zipfile
import io
import re
import subprocess
from sys import platform
class GetChromedriver:
LATEST_URL = "http://chromedriver.storage.googleapis.com/LATEST_RELEASE"
@y3rsh
y3rsh / .gitconfig
Created September 20, 2017 14:02
On Mac make visual studio code git's editor
[core]
editor = 'code' --wait
/// <summary>
/// Highlight an element for a time
/// Useful in debugging/demos
/// </summary>
/// <param name="element">the element to highlight</param>
/// <param name="time">time to highlight before returning to normal</param>
public static void HighlightElement(IWebElement element, int highlightTimeMilliseconds = 5000)
{
IJavaScriptExecutor js = TestRunner.Driver as IJavaScriptExecutor;
String oldStyle = element.GetAttribute("style");
@y3rsh
y3rsh / FiddlerRulesCustomXML
Created March 23, 2012 22:06
Fiddler Custom XML building
import System;
import System.IO;
import System.Windows.Forms;
import Microsoft.VisualBasic;
import Fiddler;
// GLOBALIZATION NOTE:
// Be sure to save this file with UTF-8 Encoding if using any non-ASCII characters
// in strings, etc.
//
@y3rsh
y3rsh / FileBuilder.java
Created July 18, 2011 17:14
Java to build a file of a specific size
import java.io.*;
public class FileBuilder {
/**
* @param args
*/
public static void main(String[] args) {
try {
@y3rsh
y3rsh / CustomRules.js
Created June 29, 2011 17:12
Fiddler Custom Rules
import System;
import System.IO;
import System.Windows.Forms;
import Microsoft.VisualBasic;
import Fiddler;
// GLOBALIZATION NOTE:
// Be sure to save this file with UTF-8 Encoding if using any non-ASCII characters
// in strings, etc.
//