Skip to content

Instantly share code, notes, and snippets.

View ardakazanci's full-sized avatar
:bowtie:
E=mc^2

Arda K. ardakazanci

:bowtie:
E=mc^2
View GitHub Profile
@ardakazanci
ardakazanci / ConflatedJob.kt
Created September 5, 2023 19:10 — forked from gpeal/ConflatedJob.kt
Conflated Job
class MyClass(private val scope: CoroutineScope) {
private val job = ConflatedJob()
fun retry() {
retryJob += scope.launch {
delay(Long.MAX_VALUE)
}
}
}
@ardakazanci
ardakazanci / shared_app_bar_final.kt
Created March 10, 2024 18:29 — forked from fvilarino/shared_app_bar_final.kt
Shared App Bar - Final
val HomeRoute = "home"
val SettingsRoute = "settings"
val ManyOptionsRoute = "manyOptions"
val NoAppBarRoute = "noAppBar"
sealed interface Screen {
val route: String
val isAppBarVisible: Boolean
val navigationIcon: ImageVector?
val navigationIconContentDescription: String?
@ardakazanci
ardakazanci / AdbCommands
Created March 16, 2024 15:01 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
ColorPickerTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
@ardakazanci
ardakazanci / CardExpandContainerTransform.kt
Created April 9, 2024 15:35 — forked from JunkFood02/CardExpandContainerTransform.kt
Container transform for cards (🐈 included)
@file:OptIn(
ExperimentalSharedTransitionApi::class, ExperimentalMaterial3Api::class
)
package com.example.compose_debug
import androidx.activity.compose.BackHandler
import androidx.annotation.DrawableRes
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.AnimatedVisibilityScope
@ardakazanci
ardakazanci / Place.kt
Created May 19, 2024 09:08 — forked from vishal2376/Place.kt
Image Reflection with cool animation using Jetpack Compose
data class Place(
val name: String,
val resId: Int
)
@ardakazanci
ardakazanci / ChoasLinesShader.metal
Created May 22, 2024 16:40 — forked from realvjy/ChoasLinesShader.metal
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
import androidx.compose.animation.core.tween
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.AnchoredDraggableState
import androidx.compose.foundation.gestures.DraggableAnchors
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.anchoredDraggable
import androidx.compose.foundation.gestures.animateTo
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column