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
// W3C Markup Validation Service | |
import groovy.json.* | |
def slurper = new JsonSlurper() | |
args.each { | |
def uri = URLEncoder.encode(it) | |
def json = slurper.parseText(new URL("http://validator.w3.org/check?uri=${uri}&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1&output=json").text) |
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
// Another HTML-lint | |
@Grab('org.jsoup:jsoup:1.7.+') | |
import org.jsoup.* | |
args.each { | |
def url = new URL("http://openlab.ring.gr.jp/k16/htmllint/htmllint.cgi") | |
def connection = url.openConnection() | |
connection.setRequestMethod("POST") | |
connection.doOutput = true |
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
#!/usr/bin/env groovy | |
import groovy.json.* | |
// | |
// 株式会社NTTドコモ 雑談対話 API を試す簡単なスクリプト | |
// | |
def apikey = '999999' | |
def url = new URL("https://api.apigw.smt.docomo.ne.jp/dialogue/v1/dialogue?APIKEY=${apikey}") | |
def slurper = new JsonSlurper() |
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
@echo off | |
setLocal EnableDelayedExpansion | |
set PATH=%JAVA_HOME%\bin;%PATH% | |
set IVY=%TEMP:\=/%/ivy-2.3.0.jar | |
if not exist "%IVY%" ( | |
jrunscript %JAVA_OPTS% -e "cp('http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar', '%IVY%')" | |
) |
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
#!/bin/bash | |
export PATH=${JAVA_HOME}/bin:${PATH} | |
IVY=/tmp/ivy-2.3.0.jar | |
if [ ! -f "${IVY}" ]; then | |
jrunscript ${JAVA_OPTS} -e "cp('http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar', '${IVY}')" | |
fi | |
java ${JAVA_OPTS} -jar "${IVY}" -error -dependency org.codehaus.groovy groovy-all 2.3.+ -main groovy.lang.GroovyShell -- $@ |
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
@echo off | |
setLocal EnableDelayedExpansion | |
set PATH=%JAVA_HOME%\bin;%PATH% | |
set LIB=%USERPROFILE:\=/%/.ant/lib | |
set IVY=%LIB%/ivy-2.3.0.jar | |
if not exist "%IVY%" ( | |
mkdir "%LIB%" | |
jrunscript %JAVA_OPTS% -e "cp('http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar', '%IVY%')" |
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
#!/bin/bash | |
export PATH=${JAVA_HOME}/bin:${PATH} | |
LIB=${HOME}/.ant/lib | |
IVY=${LIB}/ivy-2.3.0.jar | |
if [ ! -f "${IVY}" ]; then | |
mkdir -p "${LIB}" | |
jrunscript ${JAVA_OPTS} -e "cp('http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar', '${IVY}')" | |
fi |
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
@echo off | |
rem | |
rem xslt.bat [xsl] [input] [output] | |
rem | |
setLocal EnableDelayedExpansion | |
set PATH=%JAVA_HOME%\bin;%PATH% | |
jrunscript %JAVA_OPTS% -e "XSLTransform('%2','%1','%3')" |
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
#!/bin/bash | |
# | |
# xslt.sh [xsl] [input] [output] | |
# | |
export PATH=${JAVA_HOME}/bin:${PATH} | |
jrunscript ${JAVA_OPTS} -e "XSLTransform('$2','$1','$3')" |
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
importPackage(java.io); | |
importPackage(java.util.zip); | |
for (i = 0; i < arguments.length; i++) { | |
var zip = new ZipFile(new File(arguments[i])); | |
var entries = zip.entries(); | |
while (entries.hasMoreElements()) { |
OlderNewer