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('org.twitter4j:twitter4j-core:[2.2.4,)') | |
| import twitter4j.* | |
| import groovy.swing.j2d.GraphicsRenderer | |
| import javax.imageio.ImageIO | |
| if (!args || args.size() !=1) { | |
| println "usge:groovy TwitterProfileImageDownLoader.groovy ListFile.txt" | |
| System.exit(1) |
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
| /* | |
| * 型を省略した場合 | |
| */ | |
| //バインディング変数 | |
| v = "abc" | |
| assert v.class == java.lang.String | |
| v = 1 | |
| assert v == 1 | |
| assert v.class == java.lang.Integer |
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("net.sourceforge.nekohtml:nekohtml:1.9.14") | |
| import groovy.swing.j2d.* | |
| import javax.imageio.*; | |
| import org.cyberneko.html.parsers.SAXParser | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: orangeclover | |
| * Date: 12/06/06 |
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 groovy.json.JsonSlurper | |
| import groovy.swing.j2d.* | |
| import javax.imageio.*; | |
| if (!args || args.size() !=1) { | |
| println "usge:groovy Zusaar.groovy http://www.zusaar.com/event/XXXXXX" | |
| System.exit(1) | |
| } | |
| def eventID = "" | |
| (args[0] =~ (/(?<=http:\/\/www.zusaar.com\/event\/).*/)).each{ |
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 groovy.swing.j2d.GraphicsRenderer | |
| import javax.imageio.ImageIO | |
| /** | |
| * Created by IntelliJ IDEA. | |
| * User: orangeclover | |
| * Date: 12/05/19 | |
| * Time: 22:31 | |
| * To change this template use File | Settings | File Templates. | |
| */ |
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('org.xerial:sqlite-jdbc:[3.7.2,)') | |
| @GrabConfig(systemClassLoader=true) | |
| import groovy.sql.Sql | |
| Class.forName("org.sqlite.SQLite") | |
| sql = Sql.newInstance("jdbc:sqlite:C:/Users/orangeclover/AppData/Local/Evernote/Evernote/Databases/orangeclover.exb", "org.sqlite.JDBC") | |
| sql.eachRow("SELECT title,source_url FROM note_attr WHERE notebook COLLATE NOCASE LIKE '201204' AND (tags LIKE '%Groovy%' OR tags LIKE '%G*%');"){ | |
| println "[ ${it.source_url}:title=${it.title}]" | |
| } |
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
| // Web上にあるjarを、GROOV_HOME/lib にダウンロードする | |
| // 例 gomoku | |
| // https://gist.github.com/1341266 | |
| downLoadUrl = "https://github.com/downloads/sile/gomoku/gomoku-0.0.4.jar" | |
| GroovyHome = System.getProperty("groovy.home") + File.separator + "lib" | |
| url = new URL(downLoadUrl) | |
| file = new File(GroovyHome, new File(url.file).name) |
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
| // 形態素解析 | |
| // https://github.com/sile/gomoku/downloads | |
| // GROOVY_HOME/libにgomoku-0.0.4.jar をコピー | |
| import net.reduls.gomoku.* | |
| for(morpheme in Tagger.parse("我が輩は猫である。名前はまだない。")){ | |
| println(morpheme.surface + ":" + morpheme.feature) | |
| } |
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
| // GroovyRun:Groovy実行マクロ | |
| // GroovyとGroovyServが必要です。 | |
| // | |
| // 設定 | |
| // | |
| // 環境変数PATHを設定してなければ、groovyclientを絶対パスの設定 | |
| // 環境変数PATHを設定してあれば、変更不要 | |
| // 例 |
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
| //秀丸 + GrovoyServ でprintln しか使ってなかったので、 | |
| //OSの改行コードにあわせて変換を追加 | |
| 自己紹介 = """\ | |
| 親愛なるGroovyistのみなさんへ。 \r\n | |
| はじめまして(?) \r\n | |
| \r\n | |
| 佐野 貴之 です。 \r\n | |
| \r\n |
NewerOlder