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
| fun main(){ | |
| launch(Dispatchers.IO) { | |
| val user = api.fetchUserInfoAsync(id).await() | |
| withContext(Dispatchers.Default) { | |
| val hash = user.username.hash() | |
| } | |
| } | |
| } | |
| fun String.md5(): String { |
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
| fun json(init: Json.() -> Unit): Json { | |
| val json = Json() | |
| json.init() | |
| return json | |
| } | |
| open class Json { | |
| private val entries: LinkedHashMap<String, Any> = linkedMapOf() | |
| infix fun String.to(value: Any): Unit { |
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
| namespace StockDomain | |
| { | |
| class Stock // aggregate root = nosql doc optimistic lock etc. | |
| { | |
| /* | |
| * | |
| * noSql document like this | |
| * { |
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
| package com.trendyol.inventorycenterapi.helper | |
| import com.trendyol.inventorycenterapi.domain.inventory.CurrencyCode | |
| import java.lang.reflect.* | |
| import java.time.Instant | |
| import kotlin.random.Random | |
| import kotlin.reflect.full.createType | |
| import kotlin.reflect.KClass | |
| import kotlin.reflect.KType | |
| import kotlin.reflect.KTypeProjection |
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
| #!/bin/zsh | |
| for i in */.git; | |
| do ( echo $i; cd $i/..; git pull; git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done ); | |
| done |
OlderNewer