Skip to content

Instantly share code, notes, and snippets.

@temyers
temyers / properties_to_markdown.rb
Created December 7, 2016 01:57
This utility makes it easy to convert a properties file specified in the _file_to_update_ variable to Markdown table format
##
## This utility makes it easy to convert a properties file specified in the _file_to_update_ variable to Markdown table format
## Takes a properties file in the form:
## `key=value`
##
## It outputs each value in the form:
## `| key | value |`
##
## Optional properties, denoted by being commented out, are output as `<not set>`
@temyers
temyers / properties_to_confd.rb
Created December 7, 2016 01:41
Script to convert a properties file in `key=value` form to use confd properties, for use in Docker containers
##
## This utility makes it easy to convert a properties file specified in the _file_to_update_ variable to use confd properties.
## Takes a properties file in the form:
## `key=value`
##
## It reads the file in and creates a new file with _.new_ extension
## Every property key is converted to a confd path, the property value becomes the default value for the confd parameter
## Optional properties, denoted by being commented out, e.g. `# key=value`, are converted to optional confd properties.
##
## Example:
@temyers
temyers / DriverConfig.java
Last active August 11, 2019 11:20
Selenium FirefoxDriver with proxy configured profile
import static java.lang.String.format;
import java.net.URL;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;