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
mvn archetype:generate -DgroupId=org.kata -DartifactId=tictactoe -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false |
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
<plugin> | |
<groupId>org.codehaus.gmaven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<version>1.5</version> | |
<executions> | |
<execution> | |
<phase>initialize</phase> | |
<goals> | |
<goal>execute</goal> | |
</goals> |
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
public class MemoryConsumer { | |
public static void main(String[] args) { | |
long seconds = 30000; | |
long start = System.currentTimeMillis(); | |
Long sillyCounter = 0l; | |
while (start + seconds > System.currentTimeMillis()) | |
sillyCounter++; |
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 extract(String text) { | |
(text =~ /([a-z]+)((\.[a-z]+)*?)/).collect { it[0] } | |
} | |
/** | |
* println extract('groovy.grails.ruby.rails') | |
* | |
* $> [groovy, grails, ruby, rails] | |
*/ |
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
USERNAME and PASSWORD are inserted using SoapUI feature | |
<soapenv:Header> | |
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<wsu:Timestamp wsu:Id="TS-AD11234F3B4CF74705144725809787932"> | |
<wsu:Created>${=TimeZone.setDefault(TimeZone.getTimeZone("UTC")); (new Date()).format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")}</wsu:Created> | |
<wsu:Expires>${=(new Date()).format("yyyy-MM-dd'T23:59:59.999Z'")}</wsu:Expires> | |
</wsu:Timestamp> | |
<wsse:UsernameToken wsu:Id="UsernameToken-AD11234F3B4CF74705144724950372217"> | |
<wsse:Username>USERNAME</wsse:Username> |
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
[INFO] Error stacktraces are turned on. | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Asciidoctor PDF with theme Maven example 1.0.0-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ asciidoctor-pdf-with-theme-example --- | |
[INFO] Deleting C:\home\bin\cygwin64\home\ABEL.SALGADOROMERO\github\asciidoctor-maven-examples\asciidoctor-pdf-with-theme-example\target | |
[INFO] |
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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.asciidoctor.maven</groupId> | |
<artifactId>asciidoctor-diagram-example</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<name>Asciidoctor Diagram Maven example</name> | |
<description>An example project that demonstrates how to integrate Asciidoctor Diagram with the Asciidoctor Maven plugin.</description> |
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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.asciidoctor.maven</groupId> | |
<artifactId>asciidoctor-diagram-example</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<name>Asciidoctor Diagram Maven example</name> | |
<description>An example project that demonstrates how to integrate Asciidoctor Diagram with the Asciidoctor Maven plugin.</description> |
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 org.apache.pdfbox.exceptions.COSVisitorException; | |
import org.apache.pdfbox.pdmodel.PDDocument; | |
import org.apache.pdfbox.util.Splitter; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.List; | |
public class PdfSplitter { |