Skip to content

Instantly share code, notes, and snippets.

@genju83
genju83 / docker.yaml
Created September 6, 2022 10:34
lima_docker_docker-compose install
# based from https://github.com/lima-vm/lima/blob/62159c9be1d8f00b3d7d7879ac87dec0d4ed65a7/examples/docker.yaml
# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./docker.yaml
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
# Hint: To allow `docker` CLI on the host to connect to the Docker daemon running inside the guest,
# add `NoHostAuthenticationForLocalhost yes` in ~/.ssh/config , and then run the following commands:
# $ export DOCKER_HOST=ssh://localhost:60006
# $ docker ...
@genju83
genju83 / sample.kt
Created December 1, 2021 07:50
sample
val sample = "test"
@genju83
genju83 / main.yml
Created May 7, 2020 07:54
android app release build with sign
name: assembleRelease
on:
create:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
@genju83
genju83 / anywhere.csv
Last active May 23, 2018 04:21
AnyWhere
run #1 with
인자 () -> R T, T.() -> R
반환 block() receiver.block()
@genju83
genju83 / t_extension.csv
Last active May 23, 2018 04:21
T 의 extension
let also run #2 apply
인자 (block) (T) -> R (T) -> Unit T.() -> R T.() -> Unit
반환 block(this) this block() this
@genju83
genju83 / HigherOrder2.kt
Created May 20, 2018 17:33
higher-order functions
fun main(args: Array<String>) {
println(sum(1, 3)) // 4
}
fun sum(a: Int, b: Int) = higherOrderFunction2().let {
it(a, b)
}
fun higherOrderFunction2(): (Int, Int) -> Int {
return { a, b -> a + b }
@genju83
genju83 / HigherOrder.kt
Created May 20, 2018 17:16
higher-order functions
fun main(args: Array<String>) {
println(sum(1, 3)) // 4
println(sum2(1, 3)) // 4
println(multiply(1, 3)) // 3
println(subtract(1, 3)) // -2
}
fun sum(a: Int, b: Int)
= higherOrderFunction(a, b, { a, b -> a + b })