Skip to content

Instantly share code, notes, and snippets.

View leonard84's full-sized avatar
💭
I may be slow to respond.

Leonard Brünings leonard84

💭
I may be slow to respond.
  • Gradle Inc.
View GitHub Profile
@leonard84
leonard84 / gist:6090943
Created July 26, 2013 18:08
Move unmatched files
Index: amc.groovy
===================================================================
--- amc.groovy (revision 1674)
+++ amc.groovy (working copy)
@@ -24,6 +24,7 @@
def backdrops = tryQuietly{ backdrops.toBoolean() }
def clean = tryQuietly{ clean.toBoolean() }
def exec = tryQuietly{ exec.toString() }
+def unmatched = tryQuietly{ unmatched.toString() }
@leonard84
leonard84 / msysgit2unix-socket.py
Created January 17, 2017 10:33 — forked from kevinvalk/msysgit2unix-socket.py
Updated to better survive crashes and other unexpected behavior.
#!/usr/bin/python
"""
msysGit to Unix socket proxy
============================
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows).
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other
/*******************************************************************************
* Copyright 2017 The MITRE Corporation
* and the MIT Internet Trust Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@leonard84
leonard84 / spock-log.json
Last active May 18, 2017 16:57
Example Spock logformat
[{
"package": "org.spockframework.report.sample",
"name": "Fight or Flight (Spec Style)",
"start": 1494944477470,
"tags": [
{
"name": "SPOCK-260",
"key": "issue",
"value": "260",
"url": "http:\/\/issues.spockframework.org\/detail?id=260"
Condition not satisfied:
1 == 2
|
false
Expected :2
Actual :1
@org.spockframework.runtime.model.SpecMetadata(filename = 'script1497193799260.groovy', line = 1)
public class VerifyTest implements groovy.lang.GroovyObject extends spock.lang.Specification {
private static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo
public static transient boolean __$stMC
private transient groovy.lang.MetaClass metaClass
public VerifyTest() {
metaClass = /*BytecodeExpression*/
}
public class org/spockframework/verifyall/VerifyTest extends spock/lang/Specification implements groovy/lang/GroovyObject {
private synthetic static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo;
public synthetic static transient boolean __$stMC;
private synthetic transient groovy.lang.MetaClass metaClass;
private synthetic static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo$;
private synthetic static java.lang.ref.SoftReference $callSiteArray;
public VerifyTest() { // <init> //()V
<localVar:index=0 , name=this , desc=Lorg/spockframework/verifyall/VerifyTest;, sig=null, start=L1, end=L2>
public class org/spockframework/verifyall/VerifyTest extends spock/lang/Specification implements groovy/lang/GroovyObject {
private synthetic static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo;
public synthetic static transient boolean __$stMC;
private synthetic transient groovy.lang.MetaClass metaClass;
private synthetic static org.codehaus.groovy.reflection.ClassInfo $staticClassInfo$;
private synthetic static java.lang.ref.SoftReference $callSiteArray;
public VerifyTest() { // <init> //()V
<localVar:index=0 , name=this , desc=Lorg/spockframework/verifyall/VerifyTest;, sig=null, start=L1, end=L2>
@leonard84
leonard84 / groovy-2.4.10-Result
Created June 13, 2017 16:14
TryCatchProblem - Results
java.lang.AssertionError: a
at org.junit.Assert.fail(Assert.java:88)
at TryCatchProblem$_test_closure1.doCall(TryCatchProblem.groovy:15)
at TryCatchProblem$_test_closure1.call(TryCatchProblem.groovy)
at TryCatchProblem.test(TryCatchProblem.groovy:33)
...
java.lang.AssertionError: b
public doCall(java.lang.Object arg0) { //(Ljava/lang/Object;)Ljava/lang/Object;
<localVar:index=0 , name=this , desc=LTryCatchProblem$_test_closure1;, sig=null, start=L1, end=L2>
<localVar:index=1 , name=it , desc=Ljava/lang/Object;, sig=null, start=L1, end=L2>
<localVar:index=2 , name=collector , desc=LErrorCollector;, sig=null, start=L3, end=L2>
<localVar:index=3 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L4, end=L5>
<localVar:index=5 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L6, end=L7>
<localVar:index=8 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L8, end=L9>
TryCatch: L10 to L11 handled by L11: java/lang/Throwable
TryCatch: L10 to L11 handled by L12: Type is null.