Skip to content

Instantly share code, notes, and snippets.

View andreas-kkday's full-sized avatar

andreas-kkday

  • 23:39 (UTC +08:00)
View GitHub Profile
@andreas-kkday
andreas-kkday / Main.kt
Last active July 8, 2022 04:44
Coroutine Async
lifecycleScope.launch(Dispatchers.IO) {
val start = Instant.now().epochSecond
println(">>> ${Instant.now().epochSecond}")
val def1 = async { async1() }
val def2 = async { async2() }
println(">>> ${def1.await()} ${def2.await()}")
println(">>> ${Instant.now().epochSecond - start}") //3
}
lifecycleScope.launch() {
val start = Instant.now().epochSecond
@andreas-kkday
andreas-kkday / README
Last active March 21, 2022 09:30
check PR branch
1. 裝 github cli
https://cli.github.com/
然後登入, auth ...
2. 把兩個 script 放在 ~/bin/, 設定 PATH=$PATH:/Users/kkday/bin/
3. .zshrc 設定 alias
```
@andreas-kkday
andreas-kkday / android-lint.gradle
Created February 15, 2022 02:27
lint parameter from gradle command line
android {
lintOptions {
disable 'InvalidPackage', 'IconMissingDensityFolder', 'ResourceType'
// Disable this check temporally
enable 'ValidFragment'
abortOnError project.hasProperty("abortOnLintError") ? project.getProperty("abortOnLintError").toBoolean() : true
}
}