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
q=39 as char;s=';print "s=$q$s$q$s"';print "q=39 as char;s=$q$s$q$s" |
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 com.google.appengine.api.users.User; | |
import com.google.appengine.api.users.UserService; | |
import com.google.appengine.api.users.UserServiceFactory; | |
class AppEngineTagLib { | |
def ifLoggedIn = { attrs, body -> | |
def userService = UserServiceFactory.getUserService() | |
if (userService.isUserLoggedIn()) { | |
out << body() | |
} |
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
#export GRAILS_VERSION="$(ls -lhr $HOME/.grails | egrep -i '1\.' | head -1 | gawk '{print $9 }')" | |
export GRAILS_VERSION=1.1.1 | |
_get_domain_classes(){ | |
find ./grails-app/domain -iname *.groovy 2> /dev/null | tr \\n ' ' | sed 's/\.groovy//g' | sed 's/\.\/grails-app\/domain\///g' | tr '/' \. | |
} | |
_get_tests(){ | |
find ./test -iname *.groovy 2> /dev/null | sed 's/\.\/test\/integration\///g' | sed 's/\Tests.groovy//g' | tr '/' \. | |
} |
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
interface DotPair {} | |
class ConsList implements DotPair { | |
private _first | |
def getFirst() { | |
_first instanceof Closure ? _first=_first.call() : _first | |
} | |
private _tail | |
def getTail() { | |
_tail instanceof Closure ? _tail=_tail.call() : _tail |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>GDK</ShortName> | |
<Description>Groovy JDK(GDK)から検索</Description> | |
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACL0lEQVQ4y3VSMUhbURQ9/9fHw5BS/iCojVRcMnwyGKptmtFJyBJonbROSpuIdCyZLASyFOfgUsFSJQ4OJXRIx0JAkGTJHhRnMwgR8949Hb6+NqY9cOG9+84997x3H0gakvZhiIg1xtgv+/t2cnLS5vN5+y+eD2AkSPqdTscfHx/3262WX6lU/KWlJd/zPJ/kMJ+k8C9Ya7m2tkalFMvlMgEQAG9vb6m15kMMCYgIT05OqJRitVrl9PS0E+h0OgTwfwER4enpKbXW3NvbYxiGFBFqrTkxMcGtrS0nYIyhtZbGGEIiRBuALzOvHLHVahEADw8PnZNSqcS5uTlmMhkWCgXi2fOszIYpPn4SEACXl5eZSCQie3dFGxsbXF1d5dTUlMu5+PD9l7w//kkAvL6+dgck2ev1mM1mIxdHR7y5uSEAzs/P883Kyn0TSLjwggAoIqMdAK6vrxMA+/2+y9Xr9WhtrZV7u7VazVnXWjMWi/Hs7IwAqJQiSW5ubhIADw4OqLUensK9enpxkblcjrFYjEopplIpN7bLy0sCYBAE7Ha7wwLNZtOJKKXcW4j8+Wvn5+eOY60dddBoNEiSg8FgqFBEHCf/8RMBMAzDUYGZmRkaY0YKr66uXOficYNvP1cJgD7u4HkeSOLi4gI7OzsAgN3d |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>Java API</ShortName> | |
<Description>Java APIから検索</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAABi0lEQVQ4y6WTMUgbYRTHf7n+kaMEcchwQ4YMQh06ZBAJKNJBxIKDSCkdQukgIuLgEMQhSAYpDk6SIZM4dHC8wcHBwcFJbgjlhlAOOcoh3xBCkAw3HOhw5uhQBM8HDx7f4/u/P7/vfYW5r9uP5IjabJWTvc2CBSJPfqp+BECSXj297JSolB0ArDz2AZzSVH4HkjD9YVqTQwCJMDJvc3DT7Y0d2Fnj4rhBEEbsts9fFIj6I5C4/f3n0ZKEJK7a+7Q651x5Pu1GnfH5/xNMf8S15/Puw/znlmVZvJ8Ql16POzNgMHjADEd8X57DDw0/N9fxg780vi3zY3URZ7JI9+4eWWAhgYQfGo421nCPdvFCAxIrC1UcZ4rqTAVkMzNdpnnmsrZUA4lh/A9EL4jwgoiKU8I93OFLq4MtG5H2i0V7DC0DiSBb5WZ9CRAkCd0gSGuBGcbZhThOiJPsLSBlkiq6Nz3cww0A9jsukrj2evxq1jP6SZIwelaQhBCF9YPTXL8RYGu1lnMTn2PaKfEE3MB3SyViQIQAAAAldEVYdGNyZWF0ZS1kYXRlADIwMDktMDktMjJUMTE6Mzg6NDMrMDk6MDCjg4GMAAAAJXRFWHRtb2RpZnktZGF0Z |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>Groovy API</ShortName> | |
<Description>Groovy APIから検索</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAQAAAAEABcxq3DAAACL0lEQVQ4y3VSMUhbURQ9/9fHw5BS/iCojVRcMnwyGKptmtFJyBJonbROSpuIdCyZLASyFOfgUsFSJQ4OJXRIx0JAkGTJHhRnMwgR8949Hb6+NqY9cOG9+84997x3H0gakvZhiIg1xtgv+/t2cnLS5vN5+y+eD2AkSPqdTscfHx/3262WX6lU/KWlJd/zPJ/kMJ+k8C9Ya7m2tkalFMvlMgEQAG9vb6m15kMMCYgIT05OqJRitVrl9PS0E+h0OgTwfwER4enpKbXW3NvbYxiGFBFqrTkxMcGtrS0nYIyhtZbGGEIiRBuALzOvHLHVahEADw8PnZNSqcS5uTlmMhkWCgXi2fOszIYpPn4SEACXl5eZSCQie3dFGxsbXF1d5dTUlMu5+PD9l7w//kkAvL6+dgck2ev1mM1mIxdHR7y5uSEAzs/P883Kyn0TSLjwggAoIqMdAK6vrxMA+/2+y9Xr9WhtrZV7u7VazVnXWjMWi/Hs7IwAqJQiSW5ubhIADw4OqLUensK9enpxkblcjrFYjEopplIpN7bLy0sCYBAE7Ha7wwLNZtOJKKXcW4j8+Wvn5+eOY60dddBoNEiSg8FgqFBEHCf/8RMBMAzDUYGZmRkaY0YKr |
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
new GRubyScriptEngine().with { | |
require 'rubygems' | |
require 'mechanize' | |
def Mechanize = eval('WWW::Mechanize') | |
def a = Mechanize.new | |
a.basic_auth args[0], args[1] |
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 #37 GDKのコマンドラインビューア | |
@Grab('net.sourceforge.htmlunit:htmlunit:2.8') | |
import java.net.URL; | |
import com.gargoylesoftware.htmlunit.BrowserVersion; | |
import com.gargoylesoftware.htmlunit.WebClient; | |
import com.gargoylesoftware.htmlunit.html.HtmlHorizontalRule as HR; | |
proxyHost = null // set the proxy host name if you are in Firewall | |
proxyPort = 18080 |
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 #83 webスクレイピング(nekohtmlを内部で使っているHtmlUnit使用) | |
// HtmlUnit are using nekohtml under the hood. | |
@Grab('net.sourceforge.htmlunit:htmlunit:2.8') | |
import java.net.URL; | |
import com.gargoylesoftware.htmlunit.BrowserVersion; | |
import com.gargoylesoftware.htmlunit.WebClient; | |
proxyHost = null // set the proxy host name if you are in Firewall | |
proxyPort = 18080 |
OlderNewer