Skip to content

Instantly share code, notes, and snippets.

@humblehacker
humblehacker / mutablelivedata.md
Last active October 4, 2024 19:17
Don't expose MutableLiveData
@yashaka
yashaka / how-to-add-markdown-to-tilda-page-ru.md
Last active April 8, 2025 13:59
Как добавить markdown в tilda

Как добавить markdown в tilda

Базовой функционал

1 В head страницы добавляем:

<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-loader.min.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"></script>
@willyrh495
willyrh495 / EncryptionAES.kt
Created June 17, 2020 03:43
AES encryption using AndroidKeyStore
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import java.security.*
import javax.crypto.*
import javax.crypto.spec.GCMParameterSpec
import android.util.Base64
import androidx.annotation.VisibleForTesting
class EncryptionAES {
@trd86
trd86 / mouse-tap-sample.c
Last active February 19, 2025 03:42
Tap Dance and Mouse Key. You can define the hold to be CMD or layer.
#define ACTION_TAP_DANCE_MOUSE_LAYER(kc1, layer) \
{ .fn = {mousekey_tap, mousekey_finished, mousekey_reset}, .user_data = (void *)&((qk_tap_dance_pair_t){kc1, layer}), }
// Tap Dance declarations
enum {
TD_MB_CMD,
TD_MB_L1,
TD_RMB_L2
};
@luca992
luca992 / s3.kt
Last active April 15, 2025 18:28
Kotlin Multiplatform S3 Request
import io.ktor.client.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
import kotlinx.datetime.Clock
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
import okio.ByteString.Companion.encodeUtf8
@SEAbdulbasit
SEAbdulbasit / Moving Gradient
Last active December 6, 2024 04:31
Moving Mesh Gradient
@Composable
fun FluidMeshGradient(
modifier: Modifier = Modifier
) {
val infiniteTransition = rememberInfiniteTransition(label = "gradient")
// Angle animations for smoother movement
val angle1 = infiniteTransition.animateFloat(
initialValue = 0f,