Skip to content

Instantly share code, notes, and snippets.


George Pantazes gwpantazes

View GitHub Profile
gwpantazes / gist:a21a6d75ca14e347abb4f118adcfdc52
Created Sep 30, 2020 — forked from samnang/gist:1759336
Install Bash version 4 on MacOS X
View gist:a21a6d75ca14e347abb4f118adcfdc52
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O
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 / getTypedStringEnumArray.ts
Last active Sep 9, 2020
Function to get typesafe Typescript enum member array
View getTypedStringEnumArray.ts
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 {
gwpantazes / Incremental Steps to Running a Docker R
Last active Jun 26, 2020
Incremental Steps to Running a Docker R Project
View Incremental Steps to Running a Docker R

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


Keybase proof

I hereby claim:

To claim this, I am signing this object:

gwpantazes /
Created Sep 12, 2019
Cucumber Scenario Outline and custom configured ParameterType aren't compatible for step highlighting/usage detection
package com.example.test;
public class MyStepdefs {
@Given("that we're using a scenario outline")
gwpantazes /
Last active Apr 14, 2021
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 / # python - 2019-06-25_13-09-58.txt
Created Jun 25, 2019
python on macOS 10.14.5 - Homebrew build logs
View # python - 2019-06-25_13-09-58.txt
Homebrew build logs for python on macOS 10.14.5
Build date: 2019-06-25 13:09:58
gwpantazes /
Created Jun 25, 2019
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') + ")")
print("No, you are not in a virtual environment.")
gwpantazes /
Last active Jun 6, 2019
Setting Selenium WebDriver useragents
import io.github.bonigarcia.wdm.WebDriverManager;
import java.util.Map;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
gwpantazes / .bash_profile
Last active Jun 5, 2020
.bash_profile Java/jenv configuration which sets JAVA_HOME dynamically from jenv
View .bash_profile
# Java Configuration: jenv, JAVA_HOME, utilities and aliases, etc...
if which jenv > /dev/null
export JENV_ROOT="$HOME/.jenv"
export PATH="$JENV_ROOT/bin:$PATH"
# Enable shims and autocompletion.
# WARNING jenv init wipes out any previously set JAVA_HOME variable.
eval "$(jenv init -)"