This file contains hidden or 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
| Start elastic search | |
| ./bin/elasticsearch -f | |
| Start logstash | |
| Logstash configuration to process JMeter data | |
| $ cat dlogs.conf | |
| input { | |
| stdin { |
This file contains hidden or 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
| @GrabExclude(group='org.eclipse.jetty.orbit', module='javax.servlet', version='3.0.0.v201112011016') | |
| @Grapes([ | |
| @Grab('org.eclipse.jetty.aggregate:jetty-server:8.1.2.v20120308'), | |
| @Grab('org.eclipse.jetty.aggregate:jetty-servlet:8.1.2.v20120308'), | |
| @Grab(group='javax.servlet', module='javax.servlet-api', version='3.0.1'), | |
| @Grab(group='org.eclipse.jetty', module='jetty-server', version='9.0.4.v20130625'), | |
| @Grab(group='com.sparkjava', module='spark-core', version='1.0') | |
| ]) |
This file contains hidden or 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
| class Foo { | |
| def fooMethod(String message) { | |
| println "fooMethod: ${message}" | |
| } | |
| } | |
| class Bar { | |
| def barMethod(String message) { | |
| println "barMethod: ${message}" |
This file contains hidden or 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 sum(a, b) { | |
| println "sum" | |
| a + b | |
| } | |
| def sub(a, b) { | |
| println "sub" | |
| a - b | |
| } |
This file contains hidden or 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
| apply plugin:'groovy' | |
| apply plugin:'idea' | |
| apply plugin:'application' | |
| apply plugin: 'shadow' | |
| buildscript { | |
| repositories { | |
| maven { | |
| name 'Shadow' | |
| url 'http://dl.bintray.com/content/johnrengelman/gradle-plugins' |
This file contains hidden or 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 doSomething() { | |
| "Doing something" | |
| } | |
| def ret(Closure c) { | |
| [if: { condition -> | |
| if (condition) c() | |
| }] | |
| } |
This file contains hidden or 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
| ApiCampaign a = new ApiCampaign() | |
| a.properties.each { property -> | |
| a.class.declaredFields.find { field -> | |
| if (field.name == property.key && SupportedApiVersion in field.declaredAnnotations*.annotationType()) { | |
| def parameter = field.getAnnotation(SupportedApiVersion) | |
| println "Property with name " + property.key + " with parameter " + parameter.atLeast() | |
| } |
This file contains hidden or 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
| @GrabExclude(group='org.eclipse.jetty.orbit', module='javax.servlet', version='3.0.0.v201112011016') | |
| @Grapes([ | |
| @Grab(group='dbunit', module='dbunit', version='2.2'), | |
| @Grab(group='mysql', module='mysql-connector-java', version='5.1.26') | |
| ]) | |
| @GrabConfig(systemClassLoader=true) | |
| import java.io.FileOutputStream |
This file contains hidden or 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
| @Grapes( | |
| @Grab(group='com.ibm.icu', module='icu4j', version='52.1') | |
| ) | |
| import com.ibm.icu.text.* | |
| import java.util.Locale | |
| import com.ibm.icu.text.RuleBasedNumberFormat | |
| public String spellOut(num) { | |
| NumberFormat formatter = new RuleBasedNumberFormat(RuleBasedNumberFormat.SPELLOUT) |
This file contains hidden or 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
| cd() { | |
| if [[ -e application.properties ]]; | |
| then | |
| $(cat application.properties | grep app.grails.version | awk -F= '{print "gvm use grails " $2}') | |
| fi | |
| } |
OlderNewer