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 com.kiwi.navigationcompose.typed.Destination | |
import kotlinx.serialization.Serializable | |
sealed interface Destinations : Destination { | |
@Serializable | |
object BookingList: Destinations | |
@Serializable | |
data class BookingDetail( | |
val bookingId: Long, |
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
fun <T> ViewModel<*>.savedMutableStateFlow( | |
initialValue: T, | |
key: String? = null, | |
): ReadOnlyProperty<ViewModel<*>, MutableStateFlow<T>> { | |
var mutableStateFlow: MutableStateFlow<T>? = null | |
return ReadOnlyProperty { _, property -> | |
if (mutableStateFlow != null) { | |
return@ReadOnlyProperty mutableStateFlow!! | |
} |
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
class Foo1 { | |
private val unpause = MutableSharedFlow<Unit>() | |
suspend fun await() { | |
delay(1000) | |
unpause.first() | |
} | |
fun unpause() { | |
unpause.tryEmit(Unit) | |
} | |
} |
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 kotlinx.coroutines.experimental.* | |
import kotlinx.coroutines.experimental.channels.ReceiveChannel | |
import kotlinx.coroutines.experimental.channels.consumeEach | |
import kotlinx.coroutines.experimental.channels.produce | |
import kotlin.coroutines.experimental.CoroutineContext | |
fun <E> ReceiveChannel<E>.debounce( | |
wait: Long = 50, | |
context: CoroutineContext = DefaultDispatcher | |
): ReceiveChannel<E> = produce(context) { |
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
[user] | |
useconfigonly = true | |
email = ... | |
name = ... | |
[core] | |
excludesfile = ~/.gitignore_global | |
fscache = true | |
editor = 'C:/Soft_x86/NPP/notepad++.exe' -multiInst -notabbar -nosession -noPlugin | |
autocrlf = Input | |
[color] |
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
<?php | |
class AdminerColors | |
{ | |
function head() | |
{ | |
static $colors = [ | |
'alpha-adminer.example.com' => '#3C8DBC', | |
'prod-adminer.example.com' => '#DD4B39', | |
]; |
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
.build-monitor header .details { | |
display: none; | |
} | |
.build-monitor .slots { | |
position: absolute; | |
left: 0; | |
right: 0; | |
top: 0; | |
-webkit-flex: none; | |
flex: none; |
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
#!/bin/bash | |
current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || current_branch="(unknown)" | |
current_branch=${current_branch##refs/heads/} | |
github_username="JanTvrdik" | |
github_token="..." | |
if [[ $current_branch = "(unknown)" ]] | |
then |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("circleci.com") { | |
.app-dominant { | |
background: #FFF; | |
} | |
.card { | |
border: 2px solid #ccc; | |
border-radius: 4px; | |
} |
NewerOlder