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
| <configuration debug="true" scan="true" scanPeriod="30 seconds"> | |
| <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
| <layout> | |
| <pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern> | |
| </layout> | |
| </appender> | |
| <root level="warn"> | |
| <appender-ref ref="STDOUT" /> |
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
| grails.project.class.dir = "target/classes" | |
| grails.project.test.class.dir = "target/test-classes" | |
| grails.project.test.reports.dir = "target/test-reports" | |
| //grails.project.war.file = "target/${appName}-${appVersion}.war" | |
| grails.project.dependency.resolution = { | |
| inherits("global") { | |
| excludes "slf4j-log4j12" | |
| } | |
| log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' | |
| repositories { |
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
| import spock.lang.Specification | |
| class ClassInstanceAccessFromWithinClosureSpec extends Specification { | |
| def component = new ClassUnderTest() | |
| def "class instance variable is accessible when called from within closure delegated to Object" (){ | |
| setup: def delegate = new Object() | |
| expect: component.execute(delegate) | |
| } |
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
| # add alias to get latest version of mongo cheatsheet | |
| alias mongocheat='curl -s http://cheat.errtheblog.com/s/mongo | groovy -e "@Grab(group=/net.sourceforge.nekohtml/, module=/nekohtml/, version=/1.9.14/)import org.cyberneko.html.parsers.SAXParser;println new XmlSlurper(new SAXParser()).parseText(System.in.text).depthFirst().find{ it.@class == /sheet/}.text()"' |
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 Appointment implements Comparable { | |
| LocalDateTime time | |
| String description | |
| String place | |
| // Define a natural ordering of Appointments | |
| // base on their times. | |
| int compareTo(that) { this.date <=> that.date } |
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
| void mapsAreEqual(Map a, Map b) { | |
| if ( a == null || b == null ) { assert a == b; return } | |
| assert a.keySet().sort()*.toString() == b.keySet().sort()*.toString() | |
| a.each{ key, value -> assert "${b[key]}" == "$value" } | |
| } |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.your-company</groupId> | |
| <artifactId>your-project</artifactId> | |
| <version>0.1-SNAPSHOT</version> | |
| <name>your-project</name> |
NewerOlder