Skip to content

Instantly share code, notes, and snippets.

belgoros /
Created Jun 4, 2021 — forked from hillmanli-seekers/
BigDecimal vs double: illustration of accuracy and performance impact
import java.math.BigDecimal;
import java.util.function.Consumer;
import java.util.function.DoubleSupplier;
public class TestDouble {
private static double doubleTotal = 0;
private static double kahanDoubleTotal = 0;
View decoded_token_from_postman.json
"exp": 1621497315,
"iat": 1621497015,
"jti": "b390e0bc-292f-423d-9eb9-8eeced0b5272",
"iss": "http://localhost:8080/auth/realms/Demo-Realm",
"aud": "account",
"sub": "aefc221c-1402-41b4-8fb0-4be2eaa003f2",
"typ": "Bearer",
"azp": "springboot-microservice",
"session_state": "93bf159e-c617-4436-9891-a0f0333e37d9",
View decode_token_generated_in_test.json
"aud": [
"iat": 1621503452,
"auth_time": 1621503452,
"exp": 1621539452,
"iss": "http://localhost:8080/auth/realms/Demo-Realm",
"sub": "user",
"scope": "openid",
View postman-keycloak.json
"info": {
"_postman_id": "55e9873b-b947-49c8-9fca-a98a8ac41587",
"name": "keycloak",
"schema": ""
"item": [
"name": "token-employee1",
"request": {
View demo-realm.json
"id": "Demo-Realm",
"realm": "Demo-Realm",
"notBefore": 0,
"revokeRefreshToken": false,
"refreshTokenMaxReuse": 0,
"accessTokenLifespan": 300,
"accessTokenLifespanForImplicitFlow": 900,
"ssoSessionIdleTimeout": 1800,
"ssoSessionMaxLifespan": 36000,
View stored_procedure_service.rb
class StoredProcedureService
def self.instance
@instance ||=
def execute(name, *args)
results = []
connection.execute("CALL #{name}(#{args.join(',')})").each(as: :hash, symbolize_keys: true) do |row|
belgoros /
Created Aug 31, 2020
Customizing Git - Git Configuration

Customizing Git - Git Configuration

Setup your credentials

git config --global "Firstname Lastname"
git config --global ""

Avoid merge commits for pulling

belgoros / producer_test_failed.txt
Created Aug 26, 2020
Kafka producer failing test stack trace
View producer_test_failed.txt
➜ kafka-producer-consumer-basics git:(master) ✗ mvn clean test
[INFO] Scanning for projects...
[INFO] ------------< com.codeaches:kafka-producer-consumer-basics >------------
[INFO] Building kafka-producer-consumer-basics 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ kafka-producer-consumer-basics ---
[INFO] Deleting /Users/serguei/projects/java/kafka-producer-consumer-basics/target
belgoros / spring_dynamodb_errors.txt
Created Aug 16, 2020
Spring and DynamoDB integration test errors
View spring_dynamodb_errors.txt
➜ spring-dynamodb-integration git:(master) mvn clean test
[INFO] Scanning for projects...
[INFO] ---< com.nibado.example.spring-testcontainers:spring-testcontainers >---
[INFO] Building spring-testcontainers 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ spring-testcontainers ---
[INFO] Deleting /Users/serguei/projects/java/spring-dynamodb-integration/target
View gist:6a8b233ea70abd449202aa3baecbdffa

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.


  • SVN is hosted at
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at and: