Skip to content

Instantly share code, notes, and snippets.

@randomsync
randomsync / FastTest
Created January 6, 2012 22:50
Suite dependency/ordering in TestNG
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class FastTest {
ITestContext context;
@BeforeMethod
public void setup(ITestContext context) {
this.context = context;
@randomsync
randomsync / FastTest.java
Created January 17, 2012 22:16
TestNG bug: When running TestNG programmatically, child xml suites are not run (when added using setSuiteFIles())
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class FastTest {
ITestContext context;
@BeforeMethod
public void setup(ITestContext context) {
this.context = context;
@randomsync
randomsync / PrisonerPuzzler.java
Created January 18, 2012 22:24
Java code to demonstrate the solution to Prisoners & Hats puzzle (http://randomsync.net/2011/09/puzzler-prisoners-and-hats-and-jungle.html)
/*
* http://www.cartalk.com/content/puzzler/transcripts/201127/index.html
* http://www.cartalk.com/content/puzzler/transcripts/201127/answer.html
*/
import java.util.Random;
public class PrisonerPuzzler {
static int SIZE = 30;

Keybase proof

I hereby claim:

  • I am randomsync on github.
  • I am randomsync (https://keybase.io/randomsync) on keybase.
  • I have a public key ASDxEp192CrhQvEMXhKnPsMxc6W6128clvYmLoW_dvC0Ago

To claim this, I am signing this object:

BAMBOO_URL = "https://<bamboo host>/rest/api/latest"
DASHBOARD_URL = BAMBOO_URL + "/deploy/dashboard"
RESULTS_URL = BAMBOO_URL + "/deploy/environment/{}/results"
def get_weeks_since_friday_deploy(user, passwd):
weeks_since_friday_deploy = sys.maxint
r = requests.get(DASHBOARD_URL, auth=(user, passwd))
r.raise_for_status()
prod_env_ids = {}