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/bash | |
# Create a tmp place to work | |
TMP=/tmp/tomee-$RANDOM | |
trap "rm -rf $TMP" SIGINT SIGTERM SIGHUP SIGKILL SIGSTOP | |
mkdir $TMP && cd $TMP | |
# clone the repo | |
git clone git@github.com:apache/tomee.git && | |
cd tomee |
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/bash | |
##----------------------------------------- | |
## | |
## Small script to help make it slightly faster | |
## to apply Github PRs to a local clone. | |
## | |
## Purl is short for PR URL. Usage is simple: | |
## | |
## $ cd tomee-site-generator |
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
// The extra .stream() feels logically equivalent to.. | |
// Convert annotations on each method's params | |
clazz.getMethods().stream() | |
.flatMap(method -> method.getParameters().stream()) // <--- | |
.flatMap(parameter -> parameter.getAnnotations().stream()) // <--- | |
.forEach(converter); | |
// needing to call .iterator() in a loop |
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
// Convert annotations on each method's params | |
clazz.getMethods().stream() | |
.map(CallableDeclaration::getParameters) | |
.flatMap(Collection::stream) | |
.map(Parameter::getAnnotations) | |
.flatMap(Collection::stream) | |
.forEach(converter); |
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
Munchi$42 |
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 clone git@github.com:tomitribe/tomee-jaxrs-starter-project.git test && | |
cd test && | |
mvn clean install |
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 javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.util.Base64; | |
public class HmacSignature { | |
public static void main(String... s) throws Exception { | |
final String key = "don't tell"; |
This file has been truncated, but you can view the full file.
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] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Reactor Build Order: | |
[INFO] | |
[INFO] Tribestream | |
[INFO] Tribestream :: Unit | |
[INFO] Tribestream :: API | |
[INFO] Tribestream :: Tree | |
[INFO] Tribestream :: Monitor | |
[INFO] Tribestream :: Container |
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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Foo { | |
public static void main(String... args) { | |
final List<Book> books = Arrays.asList( | |
new Book("50 Sheets with Stains"), | |
new Book("Twitlight") |