/tmp/apache-tomcat-7.0.59/bin/setenv.sh
に下記の内容を書く.- chmod +xなどは不要.
- setenv.shがすでに存在する場合はCATALINA_OPTSの内容をマージする.
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
class ClosureBridge { | |
static Closure wrap(closureOnAnotherWorld) { | |
{ -> | |
closureOnAnotherWorld.delegate = delegate | |
closureOnAnotherWorld.resolveStrategy = resolveStrategy | |
closureOnAnotherWorld.call() | |
} | |
} | |
} |
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 java.lang.annotation.Retention | |
import java.lang.annotation.RetentionPolicy | |
@Retention(RetentionPolicy.RUNTIME) | |
@interface T { | |
Class formatter | |
} | |
trait A { | |
@T(formatter = {}) |
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
class A { | |
def foo | |
} | |
class B { | |
def foo | |
} | |
class C { | |
@Delegate A a = new A() |
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
// Add a trigger to run everyday | |
function appendHistoryRow() { | |
var app = SpreadsheetApp.getActive(); | |
app.setSpreadsheetTimeZone('Asia/Tokyo'); | |
var historyRow = app.getRangeByName('history_row'); | |
var values = historyRow.getValues(); | |
values[0][0] = new Date(); | |
historyRow.getSheet().appendRow(values[0]); | |
} |
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
var jsdom = require("jsdom"); | |
document = jsdom.jsdom(); | |
window = document.defaultView; | |
var xslt = require("xslt"); | |
var result = xslt( | |
'<a>xxx</a>', | |
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" encoding="UTF-8"/></xsl:stylesheet>'); | |
console.info(result); |
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
############################################## | |
# Sample client-side OpenVPN 2.0 config file # | |
# for connecting to multi-client server. # | |
# # | |
# This configuration can be used by multiple # | |
# clients, however each client should have # | |
# its own cert and key files. # | |
# # | |
# On Windows, you might want to rename this # | |
# file so it has a .ovpn extension # |
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
/** | |
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet. | |
*/ | |
/** | |
* A function that takes a single input value and returns a single value. | |
* Returns a simple concatenation of Strings. | |
* | |
* @param {String} name A name to greet. | |
* @return {String} A greeting. |
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
class GroovySsh < Formula | |
homepage "https://github.com/int128/groovy-ssh" | |
url "https://github.com/int128/groovy-ssh/releases/download/v1.1.3/groovy-ssh.jar" | |
version "1.1.3" | |
sha1 "2674602e2c966893eecafa75a9ec38bf46d8f392" | |
head "https://github.com/int128/groovy-ssh.git" | |
depends_on :java => "1.6+" |
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
@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) { |