This file contains 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
# Creating splits | |
keybind = ctrl+shift+h=new_split:left | |
keybind = ctrl+shift+j=new_split:down | |
keybind = ctrl+shift+k=new_split:up | |
keybind = ctrl+shift+l=new_split:right | |
# Navigating splits | |
keybind = ctrl+h=goto_split:left | |
keybind = ctrl+j=goto_split:bottom | |
keybind = ctrl+k=goto_split:top |
This file contains 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 io.micronaut.http.HttpResponse | |
import io.micronaut.http.MutableHttpRequest | |
import io.micronaut.http.annotation.Filter | |
import io.micronaut.http.filter.ClientFilterChain | |
import io.micronaut.http.filter.HttpClientFilter | |
import mu.KotlinLogging | |
import org.reactivestreams.Publisher | |
import org.slf4j.MDC | |
import java.util.* |
This file contains 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
public static void main(String[] args) { | |
try (var inputStream = Main.class.getClassLoader().getResourceAsStream("application.yml")) { | |
var yamlToProperties = new YamlToProperties(inputStream); | |
Map<String, Object> stringObjectMap = yamlToProperties.asProperties(); | |
stringObjectMap.forEach((key, value) -> { | |
System.out.println("Key: " + key + ", Value: " + value); | |
}); | |
} catch (IOException e) { | |
System.out.println(e.getMessage()); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link rel="stylesheet" href="css/style.css" /> | |
<title>Bedim Code</title> | |
</head> | |
<body id="body-pd"> |
This file contains 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
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; | |
/** |
This file contains 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 okhttp3.Request | |
import okio.Timeout | |
import retrofit2.Call | |
import retrofit2.CallAdapter | |
import retrofit2.Callback | |
import retrofit2.Response | |
import retrofit2.Retrofit | |
import java.io.IOException |
This file contains 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
public record Actor(int id, String firstName, String lastName) {} |
This file contains 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
package org.richard.amortization | |
import kotlin.math.pow | |
object Application { | |
private const val NUMBER_OF_MONTHS_IN_YEAR = 12 | |
private fun interest(principal: Money, rate: Double): Money { | |
return Money(rate * principal.value()) |
This file contains 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
@JsonDeserialize(using = CustomDeserializer.class) | |
public abstract class BaseClass { | |
private String commonProp; | |
} | |
// Important to override the base class' usage of CustomDeserializer which produces an infinite loop | |
@JsonDeserialize(using = JsonDeserializer.None.class) | |
public class ClassA extends BaseClass { | |
This file contains 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
public Mono<Person> load(UUID id) { | |
return API.Match(tryLoadPerson(id)).of( | |
Case($Success($()), Mono::just), | |
Case($Failure($(instanceOf(IllegalArgumentException.class))), Mono::error), | |
Case($Failure($()), x -> Mono.error(new RuntimeException("unknown error"))) | |
); | |
} | |
private Try<Person> tryLoadPerson(UUID id) { |
NewerOlder