Skip to content

Instantly share code, notes, and snippets.

View mp911de's full-sized avatar
🚑
I may be slow to respond…

Mark Paluch mp911de

🚑
I may be slow to respond…
View GitHub Profile
package com.example;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;
import java.net.UnknownHostException;
import java.util.Set;
import javax.annotation.PreDestroy;
@mp911de
mp911de / Redis RESP.md
Created March 28, 2016 14:59
Redis RESP summary

All elements are CRLF terminated. CRLF in the examples mean additional CRLFs.

Syntax Type null? empty? data/value
+ Simple string no + ASCII string, non-binary safe
- Simple error string no - ASCII string, non-binary safe
: Integer no no ASCII-represented 64bit integer
$(integer)CRLF(data) Bulk $0CRLF $-1 Binary safe chunk of bytes
*(integer) Array *0 *-1 Array header holding a length/null indicator
@mp911de
mp911de / JMH Results.txt
Last active March 28, 2016 09:15
Long Parsing Benchmark
# JMH 1.11.3 (released 74 days ago)
# VM version: JDK 1.8.0_71, VM 25.71-b15
# VM invoker: /Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home/jre/bin/java
# VM options: -Dvisualvm.id=43580837207773 -Didea.launcher.port=7533 -Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8
# Warmup: 5 iterations, 1 s each
# Measurement: 5 iterations, 1 s each
# Timeout: 2 s per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: com.lambdaworks.redis.protocol.LongParsingBenchmark.longProcessor
import static org.springframework.data.mongodb.core.query.Criteria.where;
import java.net.UnknownHostException;
import java.util.List;
import javax.annotation.PreDestroy;
import lombok.Data;
import org.junit.Test;
@mp911de
mp911de / Redis Cluster Keys for all slot hashes.txt
Created February 24, 2016 20:48
Redis Cluster Keys for all slot hashes
# This file contains key-strings for every of the 16384 slot hashes in Redis Cluster
# Each line contains the string and a comment with the slot hash
# Make sure to trim the string so you don't include the whitespace before the # comment
# Comments start with a hash (#)
fyimk7v1CgnBo # Slot 0
8HMdi # Slot 1
IQhHSeAVHI # Slot 2
N8mstVwJZoSaIg # Slot 3
e2esUEU # Slot 4
Yjj1RFQ5ME # Slot 5
/*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mp911de
mp911de / RedisConfiguration.java
Created February 5, 2016 13:26
Gist to reproduce behavior in DATAREDIS-411
/*
* Copyright 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mp911de
mp911de / Exception.txt
Last active April 6, 2023 17:53
org.hibernate.MappingException: Could not determine type for...
org.hibernate.MappingException: Could not determine type for: org.hibernate.ogm.backendtck.associations.onetoone.Wife, at table: Husband, for columns: [org.hibernate.mapping.Column(wife)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:390)
at org.hibernate.tuple.PropertyFactory.buildEntityBasedAttribute(PropertyFactory.java:157)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:208)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:509)
at org.hibernate.ogm.persister.impl.OgmEntityPersister.<init>(OgmEntityPersister.java:193)
at org.hibernate.ogm.persister.impl.SingleTableOgmEntityPersister.<init>(SingleTableOgmEntityPersister.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
@mp911de
mp911de / Jar-Files for OGM000059: Unable to find a GridType for string, Hibernate OGM, Redis.txt
Created December 28, 2015 21:23
Jar-Files for OGM000059: Unable to find a GridType for string, Hibernate OGM, Redis
antlr:antlr:2.7.7
biz.paluch.redis:lettuce:3.2.Final
com.fasterxml.jackson.core:jackson-annotations:2.4.1
com.fasterxml.jackson.core:jackson-core:2.4.1
com.fasterxml.jackson.core:jackson-databind:2.4.1
com.fasterxml:classmate:1.0.0
com.google.guava:guava:17.0
dom4j:dom4j:1.6.1
io.netty:netty-buffer:4.0.28.Final
io.netty:netty-codec:4.0.28.Final
@mp911de
mp911de / Main.java
Created December 22, 2015 15:05
Wiener Process with Java and JFreeChart
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.title.TextTitle;
import org.jfree.data.time.Month;
import org.jfree.data.time.TimeTableXYDataset;
import org.jfree.data.xy.TableXYDataset;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.VerticalAlignment;