Skip to content

Instantly share code, notes, and snippets.

View abachar's full-sized avatar

Abdelhakim Bachar abachar

View GitHub Profile
@abachar
abachar / CaffeineGetAll.java
Last active June 18, 2020 21:48
caffeine getAll
package consulting.crafter.cache;
import com.github.benmanes.caffeine.cache.CacheLoader;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.HashMap;
import java.util.Map;
@abachar
abachar / vscode-extensions.md
Last active April 12, 2020 11:44
Visual Studio Code Extensions

Extensions

  • Live Server
  • Bracket Pair Colorizer 2
  • REST Client
  • Auto Rename Tag
  • Prettier
  • ESLint
  • Material Theme
  • Material Theme Icons
@abachar
abachar / reactivebatch.java
Created February 14, 2019 23:05
Reactive Batch
package consulting.crafters.reactive.batch.reactivebatch;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Value;
import lombok.val;
import org.assertj.core.util.Lists;
import org.junit.Test;
import reactor.core.publisher.Flux;
@abachar
abachar / serialization.java
Last active July 25, 2019 04:23
Java serialization
package consulting.crafters.serialization;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.github.javafaker.Faker;
@abachar
abachar / notes-of-a-crafter.md
Last active November 12, 2019 12:22
Notes of a Crafter

Notes of a Crafter

fundamental conditions of the classic architecture: firmitas, utilitas and venustas

Design Patterns

Abstract Factory
Adapter
Bridge
Builder
Chain of Responsibility
@abachar
abachar / kata.md
Last active January 23, 2023 16:25
Bank account kata (Sandro Mancuso)

Bank account kata

Think of your personal bank account experience When in doubt, go for the simplest solution

Requirements

  • Deposit and Withdrawal
  • Account statement (date, amount, balance)
  • Statement printing

User Stories

US 1: