An howto for codegen.
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 based commands using annotations | |
class dir { | |
@Usage("show the current directory") | |
@Command | |
void main(@Usage("the dir to list") @Argument String path) { | |
File dir = path != null ? new File(path) : new File("."); | |
def files = dir.listFiles(); | |
files.each { file -> | |
context.provide(NAME:file.name,LENGTH:file.length(),DATE:new Date(file.lastModified())) | |
} |
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(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7') | |
import groovyx.net.http.RESTClient | |
import static groovyx.net.http.ContentType.* | |
import org.crsh.text.ui.UIBuilder | |
UIBuilder ui = new UIBuilder(); | |
def http = new RESTClient( 'http://localhost:8080/pentaho/' ) | |
def resp = http.get( path: 'content/ws-run/soapConnectionService/getConnections', query: [userid: 'admin', password: 'password'] ) |
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
package avaj.lang.invoke; | |
import java.io.*; | |
import java.lang.invoke.SerializedLambda; | |
import static java.nio.charset.StandardCharsets.ISO_8859_1; | |
public class FindParametersTypes { | |
public static void main(String[] args) throws Exception { | |
System.out.println(getMethodSignature((String s) -> s)); |
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
plugins { | |
id 'java' | |
id 'eclipse' | |
id 'idea' | |
id 'com.github.johnrengelman.shadow' version '1.2.1' | |
} | |
repositories { | |
mavenLocal() | |
mavenCentral() |
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 static class SimpleEntityCodecFactoryTest { | |
private Map<@JSON Integer,Map<@Frozen Integer,@Enumerated(value = Enumerated.Encoding.NAME, test = "123") String>> map; | |
} | |
final TypeElement typeElement = elementUtils.getTypeElement(SimpleEntityCodecFactoryTest.class.getCanonicalName()); | |
final List<VariableElement> els = ElementFilter.fieldsIn(typeElement.getEnclosedElements()); | |
final VariableElement mapElt = els.stream().filter(x -> x.getSimpleName().contentEquals("map")).findFirst().get(); | |
final com.sun.tools.javac.util.List<Attribute.TypeCompound> typeAttributes = ((Symbol.VarSymbol) mapElt).getMetadata().getTypeAttributes(); |
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
# Building JBoss AS 7.2.0.Final | |
wget https://github.com/jbossas/jboss-as/archive/7.2.0.Final.tar.gz | |
tar -xvf 7.2.0.Final.tar.gz | |
cd jboss-as-7.2.0.Final | |
./build.sh -DskipTests -Drelease=true # -Drelease=true creates the distribution archives | |
# Copy the binaries | |
cp -R build/target/jboss-as-7.2.0.Final /opt/java/ | |
# Copy the archive | |
cp dist/target/jboss-as-7.2.0.Final.zip ~/archives/ |
Download and install crash via rpm
rpm -Uvh http://dl.bintray.com/content/hgomez/devops-incubator-rpm/crash-1.2.0.cr7-1.noarch.rpm
Start crash
crash.sh
______
.~ ~. |`````````, .'. ..'''' | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "vertx/win10" | |
config.vm.box_url = "http://209.132.178.63/vagrant/Win10.box" | |
# big timeout since windows boot is very slow | |
config.vm.boot_timeout = 500 |
The HTTP/2 protocol is the latest evolution of the HTTP protocol addressing the issue of HTTP/TCP impedance mismatch. Web applications have been working around this problem for years employing techniques like concatenation or css spriting to reduce page load time and improve user experience. HTTP/2 is also a game changer on the server enabling increased concurrency. This talk will focus on the impact HTTP/2 will have on the server and examine how particularly well adapted the Vert.x concurrency model is to serve HTTP/2 applications.
OlderNewer