Skip to content

Instantly share code, notes, and snippets.

Avatar

David Blevins dblevins

View GitHub Profile
View buildtime.sh
#!/bin/bash -l
function log {
echo "LOG $(date +"%Y-%m-%d %H:%M:%S") $1"
}
function fail {
log "$1"
View buildtime.sh
#!/bin/bash
cd /tmp &&
git clone https://github.com/apache/tomee.git &&
cd tomee || exit 1
##
## Grab the same revision so we're all comparing the
## exact same code
##
View jakartaee-api-9.1-M2-SNAPSHOT-tomcat.jar.txt
META-INF/
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/LICENSE.md
META-INF/LICENSE.txt
META-INF/MANIFEST.MF
META-INF/NOTICE
META-INF/NOTICE.md
META-INF/mailcap.default
META-INF/maven/
View javaee-api-8.0-6-tomcat.jar.txt
META-INF/MANIFEST.MF
META-INF/
META-INF/DEPENDENCIES
javaee-api-feature.xml
org/
org/apache/
org/apache/openejb/
org/apache/openejb/javaee/
org/apache/openejb/javaee/api/
org/apache/openejb/javaee/api/activator/
View MapperAPI-Exceptions.adoc
View JsonbAPI-Exceptions.adoc
# Jsonb API scenario current proposed

1

JsonbCreator

constructor

JsonbException

JsonbException

2

JsonbCreator

factory

JsonbException

JsonbException

3

Deserialization

arrayOfShortFromString

JsonbException

JsonbException

View chars-vs-bytes.java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
public class Foo {
public static void main(String[] args) throws IOException {
final char c = 'ñ';
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
View startup-times-7-and-8.txt
2422 apache-tomee-7.0.0-M1-plus 139 3555 6034 ssssssssssssssssssssssss
2424 apache-tomee-7.0.0-plus 138 3339 5874 ssssssssssssssssssssssss
2429 apache-tomee-7.0.3-plus 139 3434 5929 ssssssssssssssssssssssss
2431 apache-tomee-7.0.1-plus 139 3250 5717 ssssssssssssssssssssssss
2450 apache-tomee-7.0.2-plus 139 3370 5919 sssssssssssssssssssssssss
2451 apache-tomee-7.0.0-M3-plus 139 3419 5944 ssssssssssssssssssssssss
2466 apache-tomee-7.0.4-plus 139 3510 6111 sssssssssssssssssssssssss
2475 apache-tomee-7.0.0-M2-plus 139 3314 5827 ssssssssssssssssssssssss
2526 apache-tomee-7.0.5-plus 139 3691 6263 sssssssssssssssssssssssss
2526 apache-tomee-7.1.0-plus 139 3684 6332 ssssssssssssssssssssssssss
View trycrest.sh
#!/bin/bash
mvn archetype:generate -DarchetypeGroupId=org.tomitribe \
-DarchetypeArtifactId=tomitribe-crest-archetype \
-DarchetypeVersion=0.19 \
-Dversion=1.0-SNAPSHOT \
-DgroupId=org.example -DartifactId=mycommand &&
cd mycommand/ &&
mvn clean install &&
./target/mycommand ls .
@dblevins
dblevins / pbcut
Created March 22, 2022 21:38
Mac clipboard manipulation scripts I use the most. These all live in my ~/bin/ directory
View pbcut
#!/bin/bash
# Useful for when you want to trim off leading spaces from clipboard text
# Say you grab a chunk of code from a markdown document and want to remove
# the four spaces at the front:
#
# pbcut -c 5-
pbpaste | cut "$@" | pbcopy
pbpaste