Skip to content

Instantly share code, notes, and snippets.

@bryanchug
bryanchug / Foo.groovy
Created October 12, 2012 01:27
/src/main/groovy/Foo.groovy
class Foo{
static String getBar( String self ){
"${self} is foobar."
}
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
repositories{
mavenCentral()
}
dependencies{
@bryanchug
bryanchug / gist:3871241
Created October 11, 2012 09:30
Grails Console Filter
consoleImports(controller: 'console', action: '*') {
before = {
String importStatements = """
// Groovy Code here
// Implicit variables include:
// ctx: the Spring application context
// grailsApplication: the Grails application
// config: the Grails configuration
// request: the HTTP request