Skip to content

Instantly share code, notes, and snippets.


Erich Eichinger eeichinger

View GitHub Profile
eeichinger / Immutable Data Types with Jackson and
Last active February 7, 2019 15:56
Example tests and notes for making Jackson work with Lombok
View Immutable Data Types with Jackson and

Examples for getting Jackson and Lombok to work together to create immutable data types.

Demonstrates use of:

  • Nullable Types
  • Optional
  • immutable java.util.List
  • immutable array
  • validating custom types on instantiate/unmarshalling
  • use & customize Lombok-@Builder with Jackson
eeichinger /
Last active August 12, 2016 17:19
in asychronous test cases it sometimes is necessary to wait for a condition to occur
private static <T> void assertThatWithSpinWait(Callable<T> actual, Matcher<? super T> matcher, long timeoutMillis) {
long endMillis = System.currentTimeMillis() + timeoutMillis;
while (System.currentTimeMillis() < endMillis) {
try {
assertThat("",, matcher);
} catch (AssertionError ignored) {
// ignore
eeichinger / git toolkit
Last active September 8, 2023 05:31
Recursively execute git commands, find unpushed commits, ...
View git toolkit
# Description:
# Various additional git utility commands
# git recursive <command>:
# from the current working folder search recursively for local git repos and run 'git <command>' on each of them.
# git recursive-exec <command>:
# from the current working folder search recursively for local git repos and run '<command>' on each of them.
eeichinger /
Created June 14, 2016 15:56
Python script to enum OSX windows and corresponding process id
#!/usr/bin/env python
# from
# requires Quartz framework installed
# $pip install pyobjc-framework-Quartz
import Quartz
#wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionOnScreenOnly | Quartz.kCGWindowListExcludeDesktopElements, Quartz.kCGNullWindowID)
wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionAll, Quartz.kCGNullWindowID)
eeichinger / sample-resttemplate_pom.xml
Created May 5, 2016 12:06
resttemplate usage sample
View sample-resttemplate_pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
eeichinger /
Last active June 28, 2018 08:15
Apache HttpClient 4.5.x Usage with NTLM Proxy Authentication, ignore SSL Certificate
public void fetch_something() throws Exception {
URI uri = UriBuilder.fromPath(path)
.resolveTemplates(ImmutableMap.<String, Object>builder()
.put("country", VALID_COUNTRY)
.put("language", VALID_LANGUAGE)
eeichinger / mapping.json
Last active January 15, 2016 16:37
Wiremock un-gzip recorded traffic
View mapping.json
"priority": 10,
"request": {
"method": "ANY",
"urlPattern": ".*"
"response": {
"proxyBaseUrl" : "",
"additionalProxyRequestHeaders": {
"Accept-Encoding": "identity"
eeichinger /
Last active January 15, 2016 16:34
Use WireMockRule in Recording mode against a https backend
public WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
) {