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 com.hascode.tutorial | |
import org.apache.camel.scala.dsl.builder.RouteBuilder | |
import org.apache.camel.CamelContext | |
import org.apache.camel.impl.DefaultCamelContext | |
import javax.jms.ConnectionFactory | |
import org.apache.camel.component.jms.JmsComponent | |
import org.apache.activemq.ActiveMQConnectionFactory | |
import org.apache.camel.Processor | |
import org.apache.camel.scala.dsl.builder.RouteBuilderSupport | |
import org.apache.camel.Exchange |
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>com.hascode.tutorial</groupId> | |
<artifactId>javaee7-webapp</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>war</packaging> |
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
git config --global alias.plog "log --graph --decorate --all --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'" | |
git plog |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.16</version> | |
<configuration> | |
<excludes> | |
<exclude>it/**</exclude> | |
</excludes> |
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>com.github.klieber</groupId> | |
<artifactId>phantomjs-maven-plugin</artifactId> | |
<version>0.2.1</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>install</goal> | |
</goals> | |
</execution> |
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>com.atlassian.maven.plugins</groupId> | |
<artifactId>maven-jira-plugin</artifactId> | |
<version>${amps.version}</version> | |
<extensions>true</extensions> | |
<configuration> | |
[...] | |
<productDataPath>src/test/xml/generated-test-resources.zip</productDataPath> | |
</configuration> |
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
Function.prototype.curry = function(){ | |
var func = this, args = Array.prototype.slice.call(arguments); | |
return function(){ | |
return func.apply(this, args.concat(Array.prototype.slice.call(arguments))); | |
} | |
}; | |
var add = function(a,b){ | |
return a+b; | |
} |
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 fib = function(n){ | |
return (n<2) ? 1 : fib(n-1) + fib(n-2); | |
} | |
var calc = function(numbers){ | |
var self = this; | |
numbers.forEach(function(n){ | |
if(!self.cache){ | |
self.cache = {}; | |
} |
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
<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>com.hascode.tutorial</groupId> | |
<artifactId>hamcrest-tutorial</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.hamcrest</groupId> | |
<artifactId>hamcrest-all</artifactId> |
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
@Provider | |
public class CustomExceptionMapper implements ExceptionMapper<CustomException> { | |
@Override | |
public Response toResponse(final CustomException exception) { | |
return Response.status(Status.BAD_REQUEST).entity(exception).type(MediaType.APPLICATION_JSON).build(); | |
} | |
} |
OlderNewer