Skip to content

Instantly share code, notes, and snippets.

View tyama's full-sized avatar
💤

Tsuyoshi Yamamoto tyama

💤
  • newcast inc.
  • Tajimi,Japan
  • 02:58 (UTC +09:00)
View GitHub Profile
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"
/*
Kiwanuji on JVM
http://kihwanujish.jottit.com/
*/
バブン = {println it}
シココケ = {a,b-> assert a==b}
バブン "オグモ ハイジ"
ラダ = "ゲボ"
シココケ(ラダ,"ゲボ")
/*
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){
/*
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){
@tyama
tyama / gist:624129
Created October 13, 2010 14:29 — forked from nobeans/gist:619325
// 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")
@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
// ================= DSL =================
// カタコトな日本語だね。
わいは 茶 に 砂糖
あたいは、 茶 に 砂糖 と ミルク
おいらは 珈琲 に 砂糖, ミルク と リキュール
// =======================================
"""注文内容:\n${allBreaks.collect { " - $it" }.join('\n')}"""
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}
apply plugin: 'groovy'
apply plugin: 'eclipse'
repositories {
mavenCentral()
mavenRepo urls: "http://groovypp.artifactoryonline.com/groovypp/libs-releases-local/"
}
dependencies {
def gppVersion = '0.2.4'
package exam1;
public class WordFilter {
private String word;
public WordFilter(String word) {
this.word = word;
}