<div id="comments-section" data-bsky-uri="{{ .Params.bsky }}"></div>
{{ $comments := resources.Get "js/comments.js" }}
<script src="{{ $comments.RelPermalink }}"></script>
Kotlin/Native requires that C libraries are compiled with a specific verison of GCC.
You can use the GCC used by Kotlin/Native itself. These Gradle tasks will help with this.
// build.gradle.kts
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
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
addEventListener("fetch", e => { | |
if (e.request.destination !== "image" || // Only do this when requesting an image | |
request.mode === "no-cors") // We don't know the status of no-cors images | |
return; | |
e.respondWith((async () => { | |
try { | |
const response = await fetch(e.request); | |
if (response.ok) | |
return response; |
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 org.jetbrains.compose.compose | |
import org.jetbrains.compose.desktop.application.dsl.TargetFormat | |
buildscript { | |
dependencies { | |
classpath("com.guardsquare:proguard-gradle:7.2.1") | |
} | |
} | |
repositories { |
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 RickRoll.writer | |
object RickRoll { var writer: (String) -> Unit = { println(it) } } | |
val Never = RickAstleyNever // to get different highlighting color | |
object RickAstleyNever { | |
infix fun gonna(x: give) = give | |
infix fun gonna(x: let) = let | |
infix fun gonna(x: run) = run | |
infix fun gonna(x: make) = make | |
infix fun gonna(x: say) = say |
var s=%1$s%2$s%1$s;printf(s,(char)34,s);/exit";printf(s,(char)34,s);/exit
Cheat Sheet - Http Client SSL TLS Configuration for Java, Kotlin and Scala with example http requests
The examples below use the base ssl configuration found here: SSLConfig of the library: SSLContext Kickstart
Java
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 org.gradle.api.DefaultTask | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.Configuration | |
import org.gradle.api.artifacts.ConfigurationContainer | |
import org.gradle.api.artifacts.Dependency | |
import org.gradle.api.artifacts.ExternalModuleDependency | |
import org.gradle.api.artifacts.ProjectDependency | |
import org.gradle.api.artifacts.dsl.DependencyHandler | |
import org.gradle.api.artifacts.result.ResolvedArtifactResult | |
import org.gradle.api.artifacts.result.UnresolvedArtifactResult |
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
// implementation("org.zeroturnaround:zt-exec:1.12") LIBRARY USAGED | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.collectAsState | |
import kotlin.coroutines.resume | |
import kotlinx.coroutines.channels.awaitClose | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.callbackFlow | |
import kotlinx.coroutines.flow.collect | |
import kotlinx.coroutines.flow.flow |
NewerOlder