Gistnote is a Gist client app based on HTML5 and JavaScript.
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
@groovy.transform.ToString() | |
class Args { | |
Collection items | |
Map settings | |
Closure closure | |
static Args parse(Object[] objects) { | |
def args = new Args() | |
def stack = objects as LinkedList | |
if (stack.last() instanceof Closure) { |
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
trait T { | |
private a(x) { "--$x--" } | |
def b(x) { a(x) } | |
def c(xs) { xs.collect { x -> a(x) } } | |
} | |
class C { | |
} | |
def c = new C() |
It is strongly recommended to run on Linux or OS X. Maybe many problems will happen.
- Cygwin
- apt-cyg
http_proxy
is set if needed
Use HttpURLClient
in Groovy.
import groovyx.net.http.HttpURLClient
try {
def client = new HttpURLClient(url: 'https://...')
def response = client.request(query: query)
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
from dockerfile/java:oracle-java7 | |
volume /usr/src/groovy-ssh | |
copy . /usr/src/groovy-ssh | |
run cd /usr/src/groovy-ssh && \ | |
./gradlew --gradle-user-home=.gradle installApp && \ | |
cp -a build/install/groovy-ssh / | |
workdir /groovy-ssh/bin | |
entrypoint ["./groovy-ssh"] |
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
from dockerfile/java:oracle-java7 | |
run mkdir -p /usr/src/app | |
workdir /usr/src/app | |
add . /usr/src/app | |
run ./gradlew assemble | |
cmd ["./gradlew", "run"] |
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
ssh { | |
outputLogLevel = LogLevel.LIFECYCLE | |
} | |
task example(type: SshTask) { | |
session(remotes.localhost) { | |
execute 'uname -a' | |
execute 'secret', logging: false |