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
def version = '1.3.7' //target version | |
def released = false | |
def sock | |
int interval = 120 | |
for(;;){ | |
if(!released){ | |
sock = new Socket('dist.springframework.org.s3.amazonaws.com',80) | |
sock.withStreams{input,output-> | |
output << "GET /release/GRAILS/grails-${version}.zip HTTP/1.1\r\n" | |
output << "Host: dist.springframework.org.s3.amazonaws.com\r\n" |
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
/* | |
Kiwanuji on JVM | |
http://kihwanujish.jottit.com/ | |
*/ | |
バブン = {println it} | |
シココケ = {a,b-> assert a==b} | |
バブン "オグモ ハイジ" | |
ラダ = "ゲボ" | |
シココケ(ラダ,"ゲボ") |
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
/* | |
original "Translation IF/ELSE´s to Portuguese" | |
http://groovyconsole.appspot.com/script/278001 | |
Translation IF/ELSE´s to Japanese | |
*/ | |
/* DSL to conditional expressions in japanese */ | |
モシ = { exp, c -> | |
if (exp){ |
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
/* | |
original "Translation IF/ELSE´s to Portuguese" | |
http://groovyconsole.appspot.com/script/278001 | |
Translation IF/ELSE´s to Japanese | |
*/ | |
/* DSL to conditional expressions in japanese */ | |
もし = { exp, c -> | |
if (exp){ |
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
// g100pon *9 Jakarta POI のGroovyサンプル | |
// | |
// usage: groovy sampleOfGExcelAPI.groovy <入力Excelファイル> | |
// 入力用に適当なExcelファイルを用意してください | |
// ---------------------------- | |
// Grapeによるライブラリ取得 | |
@GrabResolver(name="kobo-repo", root="http://github.com/kobo/maven-repo/raw/master/snapshot") | |
@GrabConfig(systemClassLoader=true) // for workaround a permgen problem with GroovyServ | |
@Grab("org.jggug.kobo:gexcelapi:0.2-SNAPSHOT") |
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
@Grab('pircbot:pircbot:1.4.2') | |
import org.jibble.pircbot.*; | |
def (host, port, channel) = ['<Server>', <Port>, '<Channel>'] | |
def bot = [:] as PircBot | |
bot.name = 'groovy_bot' | |
bot.encoding = 'ISO-2022-JP' | |
bot.connect host, port | |
bot.joinChannel channel |
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
// ================= DSL ================= | |
// カタコトな日本語だね。 | |
わいは 茶 に 砂糖 | |
あたいは、 茶 に 砂糖 と ミルク | |
おいらは 珈琲 に 砂糖, ミルク と リキュール | |
// ======================================= | |
"""注文内容:\n${allBreaks.collect { " - $it" }.join('\n')}""" |
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 org.codehaus.groovy.groovydoc.GroovyRootDoc | |
import org.codehaus.groovy.tools.groovydoc.GroovyDocTool | |
import static groovy.io.FileType.FILES | |
/** | |
* Generate i18n messages.properties from the domain class comments | |
* | |
* grails generate-i18n-labels | |
* grails generate-i18n-labels {target lang} | |
* grails generate-i18n-labels {lang} {target package} |
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
apply plugin: 'groovy' | |
apply plugin: 'eclipse' | |
repositories { | |
mavenCentral() | |
mavenRepo urls: "http://groovypp.artifactoryonline.com/groovypp/libs-releases-local/" | |
} | |
dependencies { | |
def gppVersion = '0.2.4' |
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 exam1; | |
public class WordFilter { | |
private String word; | |
public WordFilter(String word) { | |
this.word = word; | |
} |