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
val formatter by safeThread { | |
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss:SSS'Z'", Locale.getDefault()) | |
} | |
fun main(): Unit = runBlocking { | |
val time = "2024-01-24T22:58:54:322Z" | |
launch { | |
launch { | |
withContext(Dispatchers.Default) { |
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
sealed interface LoginAction { | |
data object NavigateToTerm: LoginAction | |
data object Login: LoginAction | |
data object ShowDialog: LoginAction | |
data object HideDialog: LoginAction | |
} |
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 MainActivity { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
navController = rememberAnimatedNavController() | |
TickTheme { | |
ProvideLocalNavHost(navController) { | |
NavigationController( | |
snackbarManager = viewModel.snackbarManager, |
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 android.annotation.SuppressLint | |
import android.content.Context | |
import android.content.ContextWrapper | |
import android.content.pm.PackageManager | |
import android.content.pm.Signature | |
import android.os.Build | |
import android.util.Base64 | |
import timber.log.Timber | |
import java.security.MessageDigest |
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
:set number | |
:set relativenumber | |
:set tabstop=4 | |
:set shiftwidth=4 | |
:set autoindent | |
:set smarttab | |
:set softtabstop=4 | |
:set mouse=a | |
call plug#begin() |
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
set number | |
set relativenumber | |
set tabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
set mouse=a |
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.fx.coroutines.continuations.resource | |
import arrow.fx.coroutines.release | |
class UserProcessor { | |
fun start(): Unit = println("Creating UserProcessor") | |
fun shutdown(): Unit = println("Shutting down UserProcessor") | |
fun process(ds: DataSource): List<String> = | |
ds.users().map { "Processed $it" } | |
} |
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
@Preview( | |
name = "NEXUS_5 -> 4.95\"", | |
group = "devices", | |
device = Devices.NEXUS_5, | |
showBackground = true | |
) | |
@Preview( | |
name = "PIXEL -> 5.0\"", | |
group = "devices", |
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
[*] | |
charset = utf-8 | |
end_of_line = crlf | |
indent_size = 4 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
max_line_length = 100 | |
ij_kotlin_imports_layout = *, android.*, androidx.*, com.*, java.*, javax.*, kotlin.*, kotlinx.*, $* | |
# Tab indentation (no size specified) |
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 kotlin.math.pow | |
fun main() { | |
println("^" * 5) // "^^^^^" | |
println(5 `^` 3) // 125.0 | |
println(199 `%%` 24) // (24 * 199) / 100 = 47.76 | |
println(5 / 2) // 2 | |
println(5 `÷` 2) // 2.5 | |
NewerOlder