Skip to content

Instantly share code, notes, and snippets.

View dmengelt's full-sized avatar
💥
// TODO cleanup later

Dominik Mengelt dmengelt

💥
// TODO cleanup later
View GitHub Profile
@dmengelt
dmengelt / docker-compose.yml
Last active November 29, 2020 20:32
a configuration to run a unifi cloud key behind traefik
version: "3.3"
services:
traefik:
image: traefik:v2.2.0
container_name: traefik
restart: unless-stopped
command:
- --log.level=DEBUG
- --api
public Map<String, Integer> speciesCount2() {
return animalRepository.findAll()
.stream().collect(groupingBy(Animal::getSpecies, summingInt(x -> 1)));
}
@dmengelt
dmengelt / xd log exception
Created May 11, 2015 19:58
Spring XD - twitterstream
2015-05-11 21:54:24,501 1.1.2.RELEASE WARN twitterSource-1-1 twitter.TwitterStreamChannelAdapter - Exception while reading stream.
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://stream.twitter.com/1.1/statuses/filter.json?track=SpringXD&follow=72249208":Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:584)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:544)
at org.springframework.integration.x.twitter.AbstractTwitterInboundChannelAdapter$StreamReadingTask.readStream(AbstractTwitterInboundChannelAdapter.java:183)
at org.springframework.integration.x.twitter.AbstractTwitterInboundChannelAdapter$StreamReadingTask.run(AbstractTwitterInboundChannelAdapter.java:161)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
@dmengelt
dmengelt / Grouper.java
Last active November 9, 2017 09:32
group values of list of key values pairs
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.AbstractMap.SimpleEntry;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Grouper {
public static void main(String[] args) {
if(args == null || args.length == 0) {