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
#!/usr/bin/env groovy | |
@GrabResolver(name='restlet', root='http://maven.restlet.org/') | |
@Grab(group='org.restlet.jse', module='org.restlet', version='[2.0,2.1[') | |
@Grab('commons-lang:commons-lang:2.4') | |
import java.awt.* | |
import java.awt.datatransfer.* | |
import java.io.* | |
import java.util.logging.* |
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
package org.osscripters.grails.common.web.converters.marshaller | |
import grails.plugin.spock.ControllerSpec | |
import org.codehaus.groovy.grails.support.MockApplicationContext | |
import org.codehaus.groovy.grails.web.converters.ConverterUtil | |
import org.codehaus.groovy.grails.web.converters.configuration.ConvertersConfigurationInitializer | |
import org.springframework.validation.Errors | |
import org.springframework.web.context.WebApplicationContext | |
/** |
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 com.sun.net.httpserver.* | |
Object.metaClass.webapp = { | |
{ path -> | |
try { | |
def attrs = path.split('/')[1..-1] | |
[200, owner.delegate.invokeMethod(attrs.head(), attrs.tail() as Object[]) as String] | |
} catch (Exception e) { | |
[500, e as String] | |
} |
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
# | |
# Show branch name in Zsh's right prompt | |
# | |
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null | |
setopt prompt_subst | |
function rprompt-git-current-branch { | |
local name st color gitdir action |
NewerOlder