Skip to content

Instantly share code, notes, and snippets.

View gwpantazes's full-sized avatar

George Pantazes gwpantazes

View GitHub Profile
@gwpantazes
gwpantazes / SeleniumDriverUserAgentConfigurations.java
Last active January 26, 2023 14:37
Setting Selenium WebDriver useragents
import io.github.bonigarcia.wdm.WebDriverManager;
import java.io.IOException;
import java.util.Map;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
/*
@gwpantazes
gwpantazes / check-venv.sh
Created June 25, 2019 18:41
Check if you are in a Python Virtual Environment
# 100% surefire way to detect a virtual environment: Check for the real_prefix system attribute.
echo $(python <<EOF
import sys
if(hasattr(sys, 'real_prefix')):
print("Yes, you are in a virtual environment. (" + getattr(sys, 'real_prefix') + ")")
else:
print("No, you are not in a virtual environment.")
EOF
)
@gwpantazes
gwpantazes / # python - 2019-06-25_13-09-58.txt
Created June 25, 2019 20:37
python on macOS 10.14.5 - Homebrew build logs
Homebrew build logs for python on macOS 10.14.5
Build date: 2019-06-25 13:09:58
@gwpantazes
gwpantazes / SafariBugWorkaround.java
Last active April 14, 2021 13:47
SafariDriver can't clear cookies
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.safari.SafariDriver;
class SafariBugWorkaround {
/**
* Delete all the cookies for the current domain.
*
* <p>Should be used in-place of {@link WebDriver.Options#deleteAllCookies()} until <a
* href="">this {@code SafariDriver} bug</a> is fixed.
@gwpantazes
gwpantazes / MyStepDefs.java
Created September 12, 2019 22:05
Cucumber Scenario Outline and custom configured ParameterType aren't compatible for step highlighting/usage detection
package com.example.test;
import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class MyStepdefs {
@Given("that we're using a scenario outline")
@gwpantazes
gwpantazes / keybase.md
Created March 2, 2020 18:30
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@gwpantazes
gwpantazes / Incremental Steps to Running a Docker R Project.md
Last active June 26, 2020 15:17
Incremental Steps to Running a Docker R Project

Incremental Steps to Running a Docker R Project

This guide shows an incremental approach to running a full R project with docker, from docker installation to creating your own containerized R project.

About Docker

This guide isn't going to go in-depth on how Docker works. We'll only cover necessary concepts if it's relevant at a particular step. To learn more about Docker, see the Docker Getting Started Overview.

Diagram of Docker Overview

@gwpantazes
gwpantazes / getTypedStringEnumArray.ts
Last active September 9, 2020 21:56
Function to get typesafe Typescript enum member array
export function getTypesafeEnumArray<T>(enumType: T): T[keyof T][] {
return Object.keys(enumType)
.filter((key) => isNaN(Number(enumType[key as keyof typeof enumType])))
.map((key) => enumType[key as keyof typeof enumType]);
}
enum OrdinalEnum {
ONE,
TWO
}
@gwpantazes
gwpantazes / gist:a21a6d75ca14e347abb4f118adcfdc52
Created September 30, 2020 02:40 — forked from samnang/gist:1759336
Install Bash version 4 on MacOS X
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
tar xzf bash-4.2.tar.gz
cd bash-4.2
./configure --prefix=/usr/local/bin && make && sudo make install
# Add the new shell to the list of legit shells
@gwpantazes
gwpantazes / gist:801fbaca52f85eb9fcf7dd1db47a1cf4
Created January 20, 2022 18:30
Skyrim Vanilla+ Mod List for PS4/PS5 Skyrim Special/Anniversary Edition
# Skyrim Vanilla+ Mod List for PS4/PS5 Skyrim Special/Anniversary Edition
> Compatible with PS4/PS5 Anniversary Edition
Version: v.0.0.1 - Updated on Thu Jan 20 12:26:45 CST 2022
The goal of this mod list is to have an extremely stable vanilla experience with a few nice tweaks, such as patches, loading screens, lighting and graphics, etc.
## Mod List Load Order