Skip to content

Instantly share code, notes, and snippets.

View rnkoaa's full-sized avatar

Richard Agyei rnkoaa

View GitHub Profile
@rnkoaa
rnkoaa / Retry.java
Created June 30, 2022 11:51 — forked from dtodt/Retry.java
Retrofit2@2.5.0 - Retry Adapter Factory - Call & CompletableFuture
package com.company.retrofit2.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
@rnkoaa
rnkoaa / EitherCallAdapterFactory.kt
Created June 30, 2022 10:36 — forked from marcRDZ/EitherCallAdapterFactory.kt
A custom Retrofit CallAdapter.Factory to handle Response as Either
import arrow.core.Either
import okhttp3.Request
import okio.Timeout
import retrofit2.Call
import retrofit2.CallAdapter
import retrofit2.Callback
import retrofit2.Response
import retrofit2.Retrofit
import java.io.IOException
@rnkoaa
rnkoaa / compress_tar_gzip.go
Created January 27, 2021 00:58 — forked from mimoo/compress_tar_gzip.go
How to compress a folder in Golang using tar and gzip (works with nested folders)
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
@rnkoaa
rnkoaa / docker-compose.yml
Created June 29, 2019 20:04 — forked from lucasjellema/docker-compose.yml
Docker Compose file for Apache Kafka, the Confluent Platform (4.1.0) - with Kafka Connect, Kafka Manager, Schema Registry and KSQL (1.0) - assuming a Docker Host accessible at 192.168.188.102
version: '2'
services:
zookeeper:
image: "confluentinc/cp-zookeeper:4.1.0"
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181