Skip to content

Instantly share code, notes, and snippets.


Aaron Evans fijiaaron

View GitHub Profile
View gist:4092214
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverBackedSelenium;
import org.openqa.selenium.firefox.FirefoxDriver;
import com.thoughtworks.selenium.Selenium;
public class SeleniumCheckboxExample {
public static void main(String[] args)
fijiaaron / CreateBug.cs
Created Nov 20, 2012
Create a new bug in Quality Center using the OTA API
View CreateBug.cs
using TDAPIOLELib;
namespace oneshore.QCIntegration.Examples
public class CreateBug
public static void Main()
String qcUrl = "http://localhost:8080/qcbin";
String qcDomain = "oneshore";
fijiaaron / SASS.sublime-build
Last active Dec 14, 2015
Formatted CSS output in ../css folder from Sublime SASS Build
View SASS.sublime-build
"cmd": ["sass", "--update", "$file:${file_path}/../css/${file_base_name}.css", "--style", "expanded", "--stop-on-error", "--no-cache"],
"selector": "source.sass, source.scss",
"line_regex": "Line ([0-9]+):",
"path": "/usr/local/bin:$PATH"
fijiaaron /
Last active Dec 30, 2015
Using a mock payment processor
# this is really just an interface, but python doesn't really have interfaces
class PaymentProcessor():
def make_payment(self, payment_info, amount):
raise NotImplementedError()
#any other helper methods & properties
# this technically implements payment processor, but doesn't do anything -- used for testing
class MockPaymentProcessor(PaymentProcessor):
fijiaaron /
Created Mar 22, 2012
Utility for working with BigDecimal as money
import java.math.BigDecimal;
public class MoneyUtil {
public static int DECIMAL_PLACES = 2;
public static int ROUNDING = BigDecimal.ROUND_HALF_UP;
// convert
public static BigDecimal decimal(int value) {
fijiaaron / RunTestSet.cs
Created Nov 20, 2012
Run a TestSet in QualityCenter using the OTA API
View RunTestSet.cs
using System;
using TDAPIOLELib;
namespace oneshore.qcintegration.examples
class RunTestSet
public static void Main()
String qcUrl = "http://localhost:8080/qcbin";
View drag_and_drop_helper.js
(function( $ ) {
$.fn.simulateDragDrop = function(options) {
return this.each(function() {
new $.simulateDragDrop(this, options);
$.simulateDragDrop = function(elem, options) {
this.options = options;
this.simulateEvent(elem, options);
View powershell_rest_request_example_with_basic_auth.ps1
$username = $(Get-ChildItem Env:USERNAME).value
$password = $(Get-ChildItem Env:PASSWORD).value
$credentials = "$username`:$password"
$encodedCredentials = `
[System.Convert]::ToBase64String( `
Invoke-WebRequest `
-Uri `
fijiaaron /
Last active Oct 23, 2017
ways to map a map in java
import java.util.Map;
public class MapMap
Map<String, String> map;
public static void map(Object key, Object value)
System.out.println(key + ":" + value);
View foo.1.rb
class Foo
# initialize instance variables
def initialize(bar="bar", baz="baz")
@bar = bar
@baz = baz