Skip to content

Instantly share code, notes, and snippets.

@HubertWo
HubertWo / docker-clean.sh
Last active April 17, 2022 06:32
Docker - remove unused containers, volumes and images
# Removes:
# all stoped containers
# all volumes
# all unused images
docker container prune -f && \
docker images prune -q && \
docker volume prune -f
import org.jetbrains.annotations.NotNull;
...
// https://checkerframework.org/jsr308/specification/java-annotation-design.html#array-syntax
@Test
public void dummy() {
foo(null); // 1
foo(new Integer[]{null}); // 2
}
@HubertWo
HubertWo / App.java
Last active February 14, 2017 16:02
Short example how to avoid problem with infinite amount of ConnectionPools created by OkHttpClient 3.6.0.
package com.github.hubertwo.okhttptest;
import okhttp3.*;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
/**
* This is a short example how to avoid problem