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
endpoints.shutdown.enabled=true | |
// call a shutdown with post | |
// curl -X POST http://localhost:8080/shutdown |
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
default index.gsp: | |
<ul> | |
<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }"> | |
<li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> | |
</g:each> | |
</ul> | |
result: | |
<ul> | |
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
@Grab('com.aestasit.infrastructure.sshoogr:sshoogr:0.9.25') | |
@Grab('org.codehaus.gpars:gpars:1.2.1') | |
@GrabConfig(systemClassLoader = true) | |
import static com.aestasit.infrastructure.ssh.DefaultSsh.* | |
import groovyx.gpars.GParsPool | |
options.trustUnknownHosts = true | |
stores = [ '10.0.1.1', '10.0.2.1', '10.0.3.1' ] | |
GParsPool.withPool(10) { |
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 ApplicationController implements PluginManagerAware { | |
GrailsApplication grailsApplication | |
GrailsPluginManager pluginManager | |
@Autowired | |
BeansConfiguration beansConfiguration | |
def index() { | |
[grailsApplication: grailsApplication, pluginManager: pluginManager,hello:beansConfiguration.hello] |
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
@Component | |
@ConfigurationProperties(prefix="authorization") | |
class CloudConfiguration { | |
String secretKey | |
boolean dirty = true | |
@Autowired | |
SignedJwtTokenGenerator tokenGenerator |
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
buildscript { | |
dependencies { | |
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.11' | |
} | |
} | |
plugins { | |
id 'org.asciidoctor.convert' version '1.5.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/sh | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $current_branch != "master" ]; then | |
exit 0 | |
fi | |
echo "Antes de subir nada a master, vamos a chequearlo" | |
$(pwd)/gradlew check |
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
def client = new SOAPClient('http://www.holidaywebservice.com/Holidays/US/Dates/USHolidayDates.asmx') | |
def response = client.send(SOAPAction:'http://www.27seconds.com/Holidays/US/Dates/GetMothersDay') { | |
body { | |
GetMothersDay('xmlns':'http://www.27seconds.com/Holidays/US/Dates/') { | |
year(2011) | |
} | |
} | |
} | |
response.GetMothersDayResponse.GetMothersDayResult.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
def p = ["docker","images"].execute() | ["sort","-buk1,3"].execute() | |
p.waitFor() | |
def text =p.text | |
def prev | |
text.split('\n').each{ line -> | |
def fields = line.split(' ').findAll{ it.size() } | |
if(!prev || prev[0] != fields[0]) | |
println fields[0] | |
if(prev && prev[2] != fields[2]) | |
println "\t${fields[1]}\t${fields[2]}" |
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 groovy.grape.Grape | |
new javafx.embed.swing.JFXPanel(); | |
Grape.grab(group:'org.groovyfx',module:'groovyfx',version:'8.0.0',transitive:false) | |
Class.forName('groovyx.javafx.GroovyFX').start { | |
stage(title: 'GroovyFX Hello World', visible: true) { | |
scene(fill: BLACK, width: 500, height: 250) { | |
hbox() { | |
text(text: 'Groovy', font: '80pt sanserif') { | |
fill linearGradient(endX: 0, stops: [PALEGREEN, SEAGREEN]) |
OlderNewer