Skip to content

Instantly share code, notes, and snippets.

View stewartbryson's full-sized avatar

Stewart Bryson stewartbryson

View GitHub Profile
@stewartbryson
stewartbryson / config.yml
Created February 14, 2019 16:39
Workflow with conditions
version: 2
jobs:
checkout:
machine: true
working_directory: ~/workspace
steps:
- checkout
release:
machine: true
working_directory: ~/workspace
@stewartbryson
stewartbryson / T.java
Created August 11, 2014 16:48 — forked from kinow/T.java
/*
* The MIT License
*
* Copyright (c) <2012> <Bruno P. Kinoshita>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
/*
* Tis ugly, but you can get the gist from this
*/
println "Getting past test status from Jenkins"
/* Depth */
depth = 2
/* Project Name */
projectName = "junit-and-tap"
@Grab( 'com.bloidonia:groovy-common-extensions:0.5' )
def m = (1..10) .tap { println "original ${it}" }
.findAll { it % 2 == 0 } .tap { println "evens ${it}" }
.collect { it * it } .tap { println "squares ${it}" }
// prints:
// original [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
// evens [2, 4, 6, 8, 10]
// squares [4, 16, 36, 64, 100]