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
> Task :dependencies | |
------------------------------------------------------------ | |
Root project 'testprojectgrails515' | |
------------------------------------------------------------ | |
agent | |
No dependencies |
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
/* Some example using a library with json logic | |
- https://jsonlogic.com/ | |
- https://github.com/jamsesso/json-logic-java | |
*/ | |
@GrabConfig( systemClassLoader=true ) | |
@Grapes( | |
@Grab(group='io.github.jamsesso', module='json-logic-java', version='1.0.5') | |
) |
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
/* Snippet to pass a method as a closure to generate an output string */ | |
import groovy.text.GStringTemplateEngine | |
import groovy.text.Template | |
import java.text.SimpleDateFormat | |
String formatDate(String date, String pattern, String timeZone){ | |
try { | |
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern) | |
simpleDateFormat.setTimeZone(TimeZone.getTimeZone(timeZone)) |
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
@Grapes([ | |
@Grab(group='org.spockframework', module='spock-core', version='1.3-groovy-2.5', scope='test'), | |
@Grab(group='org.testcontainers', module='spock', version='1.14.2', scope='test'), | |
]) | |
import spock.lang.* | |
import org.testcontainers.containers.GenericContainer | |
import groovy.json.JsonSlurper | |
@org.testcontainers.spock.Testcontainers |
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
openapi: 3.0.0 | |
info: | |
title: Sample API | |
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. | |
version: 0.1.9 | |
servers: | |
- url: http://api.example.com/v1 | |
description: Optional server description, e.g. Main (production) server | |
- url: http://staging-api.example.com | |
description: Optional server description, e.g. Internal staging server for testing |
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
List<String> files = ["file1.properties", "file2.properties", "file3.properties"] | |
Long countWords(File propertiesFile) { | |
Long totalWords = 0 | |
try { | |
InputStream input = new FileInputStream(propertiesFile) | |
Properties prop = new Properties(); | |
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
@Grapes([ | |
@Grab(group='com.google.cloud', module='google-cloud-storage', version='1.31.0'), | |
@Grab(group='com.google.auth', module='google-auth-library-credentials', version='0.9.1') | |
]) | |
import com.google.cloud.storage.Bucket; | |
import com.google.cloud.storage.BucketInfo; | |
import com.google.cloud.storage.Storage; | |
import com.google.cloud.storage.Storage.BucketGetOption; | |
import com.google.cloud.storage.Blob; | |
import com.google.cloud.storage.StorageOptions; |
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
git fetch -p && git branch -r --list origin/hotfix\* origin/feature\* origin/bugfix\* origin/chore\* | while read -r remote_branch; do if [ $(git log -1 $remote_branch --pretty=format:'%ce') == "your@email.com" ]; then echo $(git log -1 $remote_branch --pretty=format:'%d'); fi; done; |
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
git fetch -p && git branch -r --list origin/\* | while read -r remote_branch; do git log -1 $remote_branch --pretty=format:'%ce';echo ;done | sort | uniq -c | awk '{printf("%s,%s\n",$2,$1)}' > output.csv |
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
@Grapes([ | |
@Grab(group='io.vertx', module='vertx-core', version='3.4.1'), | |
@Grab(group='io.vertx', module='vertx-lang-groovy', version='3.4.1') | |
]) | |
import io.vertx.core.* | |
import io.vertx.core.json.* | |
JsonObject jo1 = new JsonObject() | |
assert "jo1 is a ${jo1?.class?.name}" == "jo1 is a io.vertx.core.json.JsonObject" |
NewerOlder