Skip to content

Instantly share code, notes, and snippets.

Avatar

David Blevins dblevins

View GitHub Profile
@dblevins
dblevins / Dates.java
Last active May 28, 2022
Works for Java 8 and above. For Java 7 and before, see this legacy version https://gist.github.com/dblevins/03df3cd5eb12f2da05997eef80ac4eca
View Dates.java
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
/**
* This pattern has the following benefits:
*
* - Date formats are referenced as a strong type
* - Code completion on patterns
View oldreleases.log
Downloading from apache: https://repository.apache.org/content/repositories/releases/org/apache/tomee/tomee-webaccess/7.0.0/tomee-webaccess-7.0.0.pom
Progress (1): 4.1/10 kB
Progress (1): 7.7/10 kB
Progress (1): 10 kB
Downloaded from apache: https://repository.apache.org/content/repositories/releases/org/apache/tomee/tomee-webaccess/7.0.0/tomee-webaccess-7.0.0.pom (10 kB at 13 kB/s)
Downloading from apache: https://repository.apache.org/content/repositories/releases/org/apache/tomee/tomee/7.0.0/tomee-7.0.0.pom
Progress (1): 4.1/14 kB
Progress (1): 7.7/14 kB
Progress (1): 12/14 kB
View cleanverify.sh
#!/bin/bash
mkdir /tmp/test
cd /tmp/test
curl -s -O https://archive.apache.org/dist/tomee/KEYS
curl -s -O https://archive.apache.org/dist/tomee/tomee-9.0.0-M7/apache-tomee-9.0.0-M7-webprofile.tar.gz
curl -s -O https://archive.apache.org/dist/tomee/tomee-9.0.0-M7/apache-tomee-9.0.0-M7-webprofile.tar.gz.asc
echo "
list keys
View GenericArgumentComparatorTest.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@dblevins
dblevins / verify.sh
Created Apr 7, 2021
Verify an Apache TomEE binary
View verify.sh
#!/bin/bash
FILE="${1?Specify a TomEE zip, war or tar.gz to verify}"
SHA="$FILE.sha512"
[ -f "$SHA" ] || {
echo "Downloading sha512 for $FILE"
BIN="$(basename "$FILE")"
VER="$(echo "$BIN" | perl -pe 's,apache-(tomee-.*?)-[a-z]+\.(zip|tar.gz|war),$1,')"
curl -s "https://downloads.apache.org/tomee/$VER/$BIN.sha512" > "$SHA"
@dblevins
dblevins / pom.xml
Created Apr 7, 2021
Jakarta EE 8 TCK pom.xml usable for opening/importing the TCK as a project in Intellij. Does not build the TCK.
View pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>jakartaee-tck</groupId>
<artifactId>jakartaee-tck</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
View ejb2x_optional.txt
com/sun/ts/tests/ejb/ee/bb/entity/bmp/allowedmethodstest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/argsemantics
com/sun/ts/tests/ejb/ee/bb/entity/bmp/clientviewtest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/entitybeantest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/entitycontexttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/handletest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/multiclienttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/nonreentranttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/reentranttest
com/sun/ts/tests/ejb/ee/bb/entity/cmp/allowedmethodstest
View optional.txt
com/sun/ts/tests/ejb/ee/bb/entity/bmp/allowedmethodstest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/argsemantics
com/sun/ts/tests/ejb/ee/bb/entity/bmp/clientviewtest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/entitybeantest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/entitycontexttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/handletest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/multiclienttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/nonreentranttest
com/sun/ts/tests/ejb/ee/bb/entity/bmp/reentranttest
com/sun/ts/tests/ejb/ee/bb/entity/cmp/allowedmethodstest
View signatures.txt
# EE 8
annotation
batch
decorator
ejb
el
enterprise
enterprise.concurrent
enterprise.deploy
faces
View affected-javaxrmi-sections.txt
./src/com/sun/ts/lib/util
./src/com/sun/ts/tests/ejb/ee/bb/entity/bmp/allowedmethodstest
./src/com/sun/ts/tests/ejb/ee/bb/entity/bmp/clientviewtest
./src/com/sun/ts/tests/ejb/ee/bb/entity/bmp/entitybeantest
./src/com/sun/ts/tests/ejb/ee/bb/entity/bmp/handletest
./src/com/sun/ts/tests/ejb/ee/bb/entity/cmp/allowedmethodstest
./src/com/sun/ts/tests/ejb/ee/bb/entity/cmp/clientviewtest
./src/com/sun/ts/tests/ejb/ee/bb/entity/cmp/complexpktest
./src/com/sun/ts/tests/ejb/ee/bb/entity/cmp/entitybeantest
./src/com/sun/ts/tests/ejb/ee/bb/entity/cmp/handletest