Skip to content

Instantly share code, notes, and snippets.

View diegolirio's full-sized avatar

Diego Lírio diegolirio

View GitHub Profile

Keycloak

  1. Create new Field in Realm Settings > User Profile.
  2. Fill new-field in Users > User Detail.
  3. In Clients set-up this new Field. Clients > Your Client > Client Scopes > your-client-dedicated > configure a new mapper > User attribute > in the form in the User Attribute field select your-field

image

Keycloak Java Source

Install gradle

image

Creating Java Application for the Keycloak

image

@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "type",
visible = true
)
@JsonSubTypes(
JsonSubTypes.Type(BuyOperationRequest::class, name = "BUY"),
JsonSubTypes.Type(SellOperationRequest::class, name = "SELL"),
JsonSubTypes.Type(BlockOperationRequest::class, name = "BLOCK")

Intellij Plugins

  • Ktlint
  • Github Copilot
  • ...

Technologies

Git

Stash (Hiding changes)

To see stash stored to apply again

git stash list 

Stashing changes (you can use the command above to see it)

@diegolirio
diegolirio / fast-api.md
Last active January 5, 2024 20:47
Python + Fast API

Python + Fast API

Tecnologias utilizadas:

  • Python3
  • Pip
  • Pipenv
  • Fast API
  • Uvicorn

Instalando Python 3

@diegolirio
diegolirio / DistributedTracingConsumer.kt
Created November 27, 2023 16:54
RabbitMQ with Distributed-Tracing
package com.example.distributed.tracing
import jakarta.annotation.PostConstruct
import org.slf4j.LoggerFactory
import org.springframework.amqp.rabbit.annotation.EnableRabbit
import org.springframework.amqp.rabbit.annotation.RabbitListener
import org.springframework.amqp.rabbit.config.ContainerCustomizer
import org.springframework.amqp.rabbit.core.RabbitTemplate
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer
import org.springframework.beans.factory.annotation.Autowired
package demointerviews.collection;
import java.util.*;
/**
* You must improve the processing time of the "solution" method
*/
public class ChallengeForInsideFor {