This file contains 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 groovy.json.* | |
def API_KEY = 'XXXXXXXXXXXXXXXXXXXX' | |
def DIAGRAMS_URL = 'https://cacoo.com/api/v1/diagrams.json' | |
def DELETE_DIAGRAM_URL = 'https://cacoo.com/api/v1/diagrams/' | |
def slurper = new JsonSlurper() | |
def apiKeyParameter = "apiKey=${API_KEY}" | |
// 削除対象の図一覧の取得 |
This file contains 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 url = 'http://example.com/' | |
Authenticator.default = { | |
[ | |
// user | |
System.env.U, | |
// password | |
System.env.P.toCharArray() | |
] | |
} as Authenticator |
This file contains 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(group='org.codehaus.groovy', module='groovy-xmlrpc', version='0.7') | |
@Grab(group='jivesoftware', module='smack', version='3.1.0') | |
import groovy.net.xmlrpc.XMLRPCServerProxy | |
// 設定内容 | |
def SPACE = 'demo' | |
def USER_ID = 'demo' | |
def PASSWORD = 'demo' |
This file contains 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 VIEW = 'XXXXXXXX' | |
def REPLACE = 'XXXXXXXXX' | |
// ジョブ群 | |
def items = hudson.model.Hudson.instance.getView(VIEW).items | |
items.each { | |
print "${it.name} : " | |
// ビルド環境 > Configure release build |
This file contains 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(group='net.sourceforge.nekohtml', module='nekohtml', version='1.9.14') | |
@GrabExclude(group='xml-apis', module='xml-apis') | |
@GrabConfig(systemClassLoader=true) | |
@Grab(group='org.apache.poi', module='poi', version='3.7') | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
import org.apache.poi.ss.usermodel.CellStyle | |
import org.apache.poi.ss.usermodel.Font | |
import org.apache.poi.ss.usermodel.Hyperlink |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.ikikko</groupId> | |
<artifactId>guestbook-ajax</artifactId> | |
<packaging>war</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<properties> | |
<slim3.version>1.0.6</slim3.version> | |
<appengine.version>1.4.0</appengine.version> | |
<generated.src>.apt_generated</generated.src> |
This file contains 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 #63 演算子オーバーロード | |
// 文字列の'+'でも数値とみなして加算するためのカテゴリ | |
class StringCalculationCategory { | |
static def plus(String self, String operand) { | |
try { | |
return self.toInteger() + operand.toInteger() | |
} catch (NumberFormatException e) { | |
return (self << operand).toString() | |
} |
This file contains 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 #95 クラスパスの動的な変更 | |
// 追加したいJarファイルとクラス名を指定する | |
def jarName = '*****.jar' | |
def className = '*****' | |
def loader = this.class.classLoader.rootLoader | |
loader.addURL(new File(jarName).toURL()) | |
loader.URLs.each{ println it } |
This file contains 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 #8 Ustream API | |
// Ustream Developer Network : http://developer.ustream.tv/ | |
// 本来なら http://developer.ustream.tv/apikey/generate で | |
// APIキーを取得する必要があるはずだが | |
// キーを指定しなくともAPIを使用することができた | |
def key = 'yourDevKey' | |
// Ustream APIのパラメータ | |
def format = 'xml' // [ xml | json | html | php ] |