to change the application context in a grails app,
in Config.groovy add grails.app.context=/mycontextpath
Thursday, August 21, 2008
Sunday, March 30, 2008
creating an iso from file on linux
I have a file that I need to convert to iso so that I can mount it cd a CDROM in QEMU. Here's how to do it:
mkisofs -o foo.iso foo.file
mkisofs -o foo.iso foo.file
Thursday, March 6, 2008
Wednesday, February 27, 2008
groovy script to rename a lot of files
I got a hold of 1692 mp3 files of Chinese characters for a Chinese-English dictionary that I wrote with my 16year old cousin to introduce him to programming in Groovy. The dictionary is called xiaosu cidian 小苏词典 http://www.diningphilosophers.net/xiaosu
The mp3 files are all in uppercase but I wanted them in lower case. Here's the script I wrote to do that:
Much easier than with Java!
The mp3 files are all in uppercase but I wanted them in lower case. Here's the script I wrote to do that:
new File(".").eachFile{ f->
def cmd = "mv $f.name ${f.name.toLowerCase()}"
cmd.execute()
}
Much easier than with Java!
Tuesday, February 12, 2008
internationalization (i18n) in grails
any .properties files put in grails-app/i18n can be used to store internationalized text.
for example, grails-app/i18n/foobar.properties
the internationalized text can be accessed in the view using
for example, grails-app/i18n/foobar.properties
the internationalized text can be accessed in the view using
Monday, February 11, 2008
extracting html form unicode data
tomcat has problems with extracting unicode data (chinese for example) from submitted form. The form must be method="post". method="get" will not work in tomcat but works in jetty
Subscribe to:
Comments (Atom)