Skip to content

Instantly share code, notes, and snippets.

@qfrank
qfrank / gist:9c09c3728cd8aac017b2
Last active August 29, 2015 14:23
tomcat virtual mapping xml
private static createVirtualMappingXml(){
if(Environment.current != Environment.DEVELOPMENT){
def catalinaHome = System.getenv('CATALINA_HOME')
if(!catalinaHome){
catalinaHome = System.getProperty("catalina.base")
}
if(!catalinaHome){
throw new RuntimeException("找不到环境变量CATALINA_HOME")
}
chrome://flags/#enhanced-bookmarks-experiment
@qfrank
qfrank / gradle note
Last active August 29, 2015 14:22
Gradle note
// setting compile encoding:
// compileJava.options.encoding = 'UTF-8'
// compileGroovy.options.encoding = 'UTF-8'
// compileTestGroovy.options.encoding = 'UTF-8'
// compileTestJava.options.encoding = 'UTF-8'
tasks.withType(AbstractCompile) {
options.encoding = 'UTF-8'
}
@qfrank
qfrank / grails note
Last active September 1, 2015 13:01
grails url-mappings-report
// test com.xx.PushServiceSpec
test-app unit: **.Push*
// specify service init non-lazy, just add a static lazyInit property with false
static lazyInit = false
import org.grails.databinding.converters.ValueConverter
import test.Address