This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arrow.core.Either | |
import kotlin.jvm.Throws | |
interface Retry<T> { | |
fun shouldRetry(): Boolean | |
fun run(body: () -> T): Either<T, Exception> | |
} | |
class ExponentialBackoffRetry<T>(private val maxRetry: Int = 5, private val initDelay: Long = 200): Retry<T> { | |
private var retries = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="fwalch" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
alias zshconfig="nvim ~/.zshrc" | |
alias ohmyzsh="nvim ~/.oh-my-zsh" | |
alias v="nvim" | |
alias gcom="git commit -am" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
typedef struct _list { | |
int head; | |
struct _list* tail; | |
} list; |