Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mradzinski's full-sized avatar
:bowtie:
E=mc^2

Matias Radzinski mradzinski

:bowtie:
E=mc^2
View GitHub Profile
@mradzinski
mradzinski / ExponentialBackoffRetryHandler.kt
Last active February 24, 2018 18:57
RxJava2 Retry with exponential backoff, maximum amount of retries and evaluator
class ExponentialBackoffRetryHandler<T : Throwable>(private val maxRetries: Int = 3,
private val retryDelayMs: Long = 2500,
private val evaluator: (Throwable, Int) -> Boolean = { _, _ -> true }):
Function<Flowable<T>, Publisher<*>> {
companion object {
private const val TAG: String = "ExponentialRetryHandler"
}
private var retryCount: Int = 0
@mradzinski
mradzinski / Deploying_Vertx.md
Last active August 7, 2019 17:37
Deploying a Vertx fat-jar into EC2 (Ubuntu)

Deploying a Vertx fat-jar into EC2 (Ubuntu)

1. Install JDK

  1. sudo apt-get update

  2. Check if java is installed by running java