Skip to content

Instantly share code, notes, and snippets.

View kauanmocelin's full-sized avatar

Kauan Mocelin kauanmocelin

View GitHub Profile
@kauanmocelin
kauanmocelin / PaymentFactory.java
Created October 22, 2024 12:08
Strategy and Factory com EnumMap
public class PaymentFactory {
private static final Map<PaymentType, PaymentStrategy> strategies = new EnumMap<>(PaymentType.class);
static {
strategies.put(PaymentType.CREDIT_CARD, new CreditCardPayment());
strategies.put(PaymentType.DEBIT_CARD, new DebitCardPayment());
strategies.put(PaymentType.CRYPTO, new CryptoPayment());
}
public static PaymentStrategy getPaymentStrategy(PaymentType paymentType) {
@markswell
markswell / image.markdown
Last active January 16, 2025 17:19
To integrate Intellij Idea community with wildfly server just put this file into root path of application and run with command ./intellij_wildfly_integration.sh. For debug in your Intellij Idea Community enable debug of wildfly into standalone.xml file and create a configuration of type “Remote JVM Debug” and attach in “Run/Attach to process”.

Captura de tela de 2022-08-22 11-23-33 image

@alexishida
alexishida / Manual Instalação Token Safenet5110 Ubuntu.txt
Last active April 21, 2025 22:49
Instalando token SAFENET 5110 - Ubuntu
-----------------------------------------------------------------------------------------------------------------------------
PROCEDIMENTOS PARA INSTALAÇÃO SAFENET5110
Autor: Alex Ishida <[email protected]>
Data: 13/08/2021
Versão: 1.0.0.0
-----------------------------------------------------------------------------------------------------------------------------
PASSO 1, instale alguns pacotes disponíveis no repositório oficial do Ubuntu.
-----------------------------------------------------------------------------------------------------------------------------
sudo apt update
@gbzarelli
gbzarelli / GsonUTCDateAdapter.java
Last active April 18, 2025 22:33
Gson Adapter converter Date to String in ISO UTC ( ISO 8601 ) format - Serializer and Deserializer #helpdev-blog
import com.google.gson.*;
import java.lang.reflect.Type;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;