Skip to content

Instantly share code, notes, and snippets.

View dblevins's full-sized avatar

David Blevins dblevins

View GitHub Profile
#!/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
@dblevins
dblevins / purl
Last active December 4, 2018 03:23
#!/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
// 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
// Convert annotations on each method's params
clazz.getMethods().stream()
.map(CallableDeclaration::getParameters)
.flatMap(Collection::stream)
.map(Parameter::getAnnotations)
.flatMap(Collection::stream)
.forEach(converter);
Munchi$42

Standardize Pooling and Decouple from EJB Component Model

       Key: EJB_SPEC-113
       URL: https://java.net/jira/browse/EJB_SPEC-113
   Project: ejb-spec
Issue Type: New Feature
  Reporter: reza_rahman
git clone git@github.com:tomitribe/tomee-jaxrs-starter-project.git test &&
cd test &&
mvn clean install
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.
[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
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")