Skip to content

Instantly share code, notes, and snippets.

Tommy Barker tbarker9

Block or report user

Report or block tbarker9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mdocBasics.groovy
import metridoc.core.Step
step(foo: "I am foo") {
println "I am from foo"
step(bar: "I am bar") {
depends "foo"
println "I am from foo"
tbarker9 / LdapExample.groovy
Last active Dec 19, 2015
A basic ldap example so I don't have to keep looking this up
View LdapExample.groovy
import javax.naming.Context
* Created with IntelliJ IDEA on 7/18/13
* @author Tommy Barker
def config = new ConfigSlurper().parse(new File("${System.getProperty("user.home")}/.metridoc/MetridocConfig.groovy").toURI().toURL())
tbarker9 / gist:5825298
Last active Dec 18, 2015
bintray generic upload gradle task. Stole directly from
View gist:5825298
class BintrayGenericUpload extends DefaultTask {
File artifactFile
String artifactUrl
def publish() {
tbarker9 / gist:5684208
Created May 31, 2013
upload to bintray gradle task. Probably should consider making this a gradle plugin
View gist:5684208
task uploadToBintray(dependsOn: ["prepareForBintrayUpload", "publishBintrayPackages"])
task prepareForBintrayUpload << {
if (version.contains("SNAPSHOT")) {
println "bintray does not support SNAPSHOTs, skipping upload to bintray"
uploadArchives.enabled = false
publishBintrayPackages.enabled = false
tbarker9 / gist:5629664
Created May 22, 2013
Convert xml to pojo to json using groovy
View gist:5629664
import groovy.json.JsonBuilder
//make sure you have installed groovy
//best way to install groovy:
def carRecords = '''
<car name='HSV Maloo' make='Holden' year='2006'>
You can’t perform that action at this time.