This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.transform.* | |
class Event { | |
int version | |
} | |
@Immutable class ItemActivated extends Event { | |
int id | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.gperfutils', module='gbench', version='0.4.2-groovy-2.1') | |
import java.lang.String | |
trait NoStackTrace { | |
Throwable fillInStackTrace() { | |
return this | |
} | |
} | |
class ExpensiveException extends RuntimeException { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group = "org.twitter4j", module = "twitter4j-core", version = "4.0.2") | |
import twitter4j.* | |
Twitter twitter = new TwitterFactory().instance | |
def user = twitter.verifyCredentials() | |
println "Nb followers de ${user.name} (alias ${user.screenName}) : ${user.followersCount}" | |
long cursor = -1 | |
def followers = twitter.getFollowersList(user.screenName, cursor, 200) | |
followers.each {println "${it.screenName} - ${it.name}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void "test filter with find on name"() { | |
setup: | |
new Conference( | |
name: 'test', | |
startdate: new Date() | |
).save(flush: true) | |
expect: | |
service.filterConferences(new FilterCommand(name: name)).size() == expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.gperfutils', module='gbench', version='0.4.2-groovy-2.1') | |
import java.lang.String | |
trait NoStackTrace { | |
Throwable fillInStackTrace() { | |
return this | |
} | |
} | |
class ExpensiveException extends RuntimeException { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class Main { | |
public static void main(String[] args) throws IOException, ScriptException { | |
ScriptEngineManager manager = new ScriptEngineManager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
tasks.withType(AbstractArchiveTask) { task -> | |
outputs.upToDateWhen { false } | |
task.doLast { | |
println "\nOutput location: ${archiveName}\n" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def artifacts = [] | |
addListener(new TaskExecutionAdapter() { | |
void afterExecute(Task task, TaskState state) { | |
if(task in AbstractArchiveTask) { | |
artifacts << task.outputs.files.singleFile | |
} | |
} | |
}) |
OlderNewer