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
@mp911de
mp911de / VaultForConsulBootstrapConfiguration.java
Created December 2, 2016 21:24
Using Spring Cloud Vault Config to get a token for Spring Cloud Vault Consul Config
/*
* 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 / 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;
@mp911de
mp911de / DoubleVector.java
Created October 30, 2024 11:04
Vectors 😱🤯
/*
* Copyright 2024 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mp911de
mp911de / LettuceGuiceIntegrationTest.java
Created November 1, 2015 14:21
Example Lettuce integration with Google Guice
package com.lambdaworks.redis.support;
import com.google.inject.*;
import com.lambdaworks.redis.RedisClient;
import com.lambdaworks.redis.RedisURI;
import com.lambdaworks.redis.TestSettings;
import com.lambdaworks.redis.api.StatefulRedisConnection;
import com.lambdaworks.redis.codec.Utf8StringCodec;
import org.junit.Test;
/*
* Copyright 2018 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
package org.hibernate.bugs;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.archive.scan.internal.DisabledScanner;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.junit.Before;
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
@mp911de
mp911de / MyFragment.java
Last active June 13, 2023 15:51
ResolvableTypeReproducer
/*
* Copyright 2023 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
*
* https://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 / StatementBenchmarks.java
Created October 29, 2019 15:20
R2DBC Postgres benchmarks
/*
* Copyright 2019 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software