Skip to content

Instantly share code, notes, and snippets.

View amank22's full-sized avatar
💻
Working

Aman Kapoor amank22

💻
Working
View GitHub Profile
@cgruber
cgruber / constrain_desktop_window.kt
Last active April 21, 2024 11:30
Constrain Compose Desktop Window to a minimum size.
//
// Copyright (c) Christian Gruber, All Rights Reserved
//
// Licensed for use under any of simplified BSD 2-clause, BSD, MIT, or Apache licenses,
// at the licensee's discretion.
//
// I'd release it to the public domain, except that prevents its use in some commercial
// environments due to the US having a broken copyright system. So there it is. Liberally
// licensed as I can make it.
@DavidIbrahim
DavidIbrahim / DashedBorder.kt
Last active April 17, 2024 13:32
dashedBorder modifier for android compose
import androidx.compose.foundation.BorderStroke
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@3v1n0
3v1n0 / map-string-any-kotlin-serialization-tests.kt
Last active September 25, 2023 18:15
Kotlin Map<String, Any?> (andy Any type in general) (de)serialization tests with both Binary (CBOR) and JSON support
import kotlinx.serialization.*
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.CompositeDecoder
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.*
import kotlin.reflect.KType
import kotlin.reflect.full.isSubtypeOf
import kotlin.reflect.full.starProjectedType
/*
* Copyright (C) 2016 Evan Halley
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software