Skip to content

Instantly share code, notes, and snippets.

View indyfromoz's full-sized avatar
🏠
Working from home

Indrajit Chakrabarty indyfromoz

🏠
Working from home
View GitHub Profile
@emenjivar
emenjivar / AnimatedTypingIndicator.kt
Created June 23, 2024 17:39
Animated typing indicator in jetpack compose
/**
* Display an animated typing indicator with a configurable number of dots.
*
* @param modifier The modifier to be applied to the component.
* @param configuration The configuration for the component's appearance.
* @param totalDots The total number of dots displayed in the indicator.
*/
@Composable
fun AnimatedTypingIndicator(
modifier: Modifier = Modifier,
@akexorcist
akexorcist / BeakShape.kt
Last active July 6, 2024 22:34
Beak Shape for Jetpack Compose or Compose Multiplatform
import androidx.annotation.FloatRange
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Outline
import androidx.compose.ui.graphics.Path
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.LayoutDirection
import kotlin.math.atan2
import kotlin.math.cos
import kotlin.math.pow
//
// SignatureAnimation.swift
// OpenSwiftUIAnimations
//
// Created by Amos Gyamfi on 11.5.2024.
//
import SwiftUI
struct SignatureAnimation: View {
//
// MeasuringHeartRate.swift
import SwiftUI
struct MeasuringHeartRate: View {
@State var measuring = false
let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1))
let streamRed = Color(#colorLiteral(red: 1, green: 0, blue: 0, alpha: 1))
//
// DateTimeTimerView..swift
import SwiftUI
struct DateTimeTimerView: View {
var body: some View {
NavigationStack {
List {
// 1. Month, day, year
@JunkFood02
JunkFood02 / Motion.kt
Last active July 19, 2024 11:57
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing
//
// CloudCompositingView.swift
// OpenSwiftUIDesigns
//
// Created by Amos Gyamfi on 9.4.2024.
//
import SwiftUI
struct CloudCompositingView: View {
@KlassenKonstantin
KlassenKonstantin / SharedTrans.kt
Last active July 20, 2024 07:04
Popup shared transition test
private val products = listOf(
Product("🍎", "Apples"),
Product("🍪", "Cookies"),
Product("🍉", "Watermelon"),
Product("🫐", "Blueberries"),
Product("🍊", "Oranges"),
Product("🍑", "Peaches"),
Product("🥦", "Broccoli"),
)
@ardakazanci
ardakazanci / CircularMainMenuGroup.kt
Created January 13, 2024 05:54
Circular Menu Group for jetpack compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
CircularMenuGroupTheme {
MainMenuCanvas()
}
}
}
@khalidx
khalidx / node-typescript-esm.md
Last active July 3, 2024 18:04
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json