Skip to content

Instantly share code, notes, and snippets.

View thiagolocatelli's full-sized avatar

Thiago Locatelli thiagolocatelli

  • Charlotte, NC
View GitHub Profile
FROM openjdk:13-jdk-alpine as jlink-package
RUN jlink \
--verbose \
--strip-java-debug-attributes \
--compress=2 \
--no-man-pages \
--no-header-files \
--module-path /opt/openjdk-13/jmods \
--add-modules jdk.jfr,jdk.management.agent,java.base,java.sql,java.logging,java.xml,jdk.unsupported,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
[alias]
plog = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --date=short
tlog = log --graph --abbrev-commit --decorate --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)' --all
FROM openjdk:13-jdk-alpine as jlink-package
RUN jlink \
--verbose \
--strip-java-debug-attributes \
--compress=2 \
--no-man-pages \
--no-header-files \
--module-path /opt/openjdk-13/jmods \
--add-modules jdk.jfr,jdk.management.agent,java.base,java.sql,java.logging,java.xml,jdk.unsupported,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
import java.util.Comparator;
import java.util.Objects;
import java.util.function.Consumer;
public class TestGenerics {
public static class A<T> {
private T var;
public A(T elm) {
var = elm;
@thiagolocatelli
thiagolocatelli / AnnotationBuilder.java
Last active August 23, 2018 14:36
example of java lib with isolated spring context
package com.example.customlib;
/**
*
* This class initializes annotations and beans for the Library.
*
*/
@ComponentScan("com.example.customlib")
@EnableAspectJAutoProxy
@EnableCaching
@thiagolocatelli
thiagolocatelli / StripeCursor
Last active August 29, 2015 13:58
StripeCursor implementation and test
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.stripe.model.StripeCollection;
import com.stripe.net.APIResource;