Skip to content

Instantly share code, notes, and snippets.

View kiy0taka's full-sized avatar
🔒

Kiyotaka Oku kiy0taka

🔒
View GitHub Profile
@mike-neck
mike-neck / gradleb.groovy
Last active December 10, 2015 10:09
gradleb - gradle builder for easy creating gradle build script
import groovy.transform.*
@ToString (includeNames = true)
class BuildGradle {
final StringWriter w = new StringWriter()
def plugins = []
void apply () {
plugins.each {
w << "apply plugin : '${it}'\n"
@uehaj
uehaj / static typed markup builder
Created January 18, 2013 08:44
@DelegatesToを使った静的型チェックされるMarkupBuilderのようなものです。
import groovy.transform.*
class HtmlBuilder {
def html(@DelegatesTo(Html) Closure c) {
c.delegate = new Html()
println "<html>"; c(); println "</html>"
}
}
class Html {
def head(@DelegatesTo(Head) Closure c) {
c.delegate = new Head()
@orrsella
orrsella / init.d-script.sh
Last active August 2, 2020 05:43
Init.d Script
#!/bin/bash
START_SCRIPT={{ start_script }}
PID_FILE={{ pid_file }}
# ***********************************************
# ***********************************************
ARGS="" # optional start script arguments
DAEMON=$START_SCRIPT