Skip to content

Instantly share code, notes, and snippets.

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

Mikołaj Pich mklkj

🏠
Working from home
View GitHub Profile
@KlassenKonstantin
KlassenKonstantin / ListSections.kt
Last active August 13, 2024 02:47
List sections
@file:OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
package de.kuno.listsections
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateRectAsState
import androidx.compose.foundation.ExperimentalFoundationApi
@chachako
chachako / Toast.kt
Last active October 18, 2023 18:14
An actionable Jetpack-Compose toast bar with beautiful UI and animations
package chachako.ui
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.ContentTransform
import androidx.compose.animation.SizeTransform
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.EaseInOutQuad
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.VisibilityThreshold
import androidx.compose.animation.core.spring
@jisungbin
jisungbin / Modifier.drawHorizontalFadingEdges.kt
Last active October 18, 2023 18:16
Jetpack Compose horizontal fading edges with ScrollableState.
@Stable
fun Modifier.drawHorizontalFadingEdges(
target: Color = Color.White,
width: Dp = 10.dp,
scrollState: ScrollableState,
) =
if (!scrollState.canScrollForward && !scrollState.canScrollBackward) this
else drawWithCache {
val gradientWidth = width.toPx()
@SMUsamaShah
SMUsamaShah / list_of_p2p_file_sharing.md
Last active April 24, 2025 05:35
List of P2P file sharing tools

Browser Based

  1. Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
  2. ToffeeShare https://toffeeshare.com/
  3. FilePizza https://file.pizza/
  4. ShareDrop sharedrop.io https://github.com/szimek/sharedrop (SOLD, not recommended, use one of the forks)
    1. A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop (SOLD, not recommended, use one of the forks)
      1. A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
  5. Instant.io https://instant.io/
  6. FileTC https://file.tc/
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active April 2, 2025 17:54
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@yaraki
yaraki / EdgeToEdge.kt
Last active July 3, 2024 19:48
Edge-to-edge setup for Android app in a backward-compatible manner.
/*
* Copyright (C) 2022 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
*
* Unless required by applicable law or agreed to in writing, software
@VincentJoshuaET
VincentJoshuaET / BundleUtil.kt
Last active October 18, 2021 19:02
Building a type safe bundleOf
import android.os.Bundle
import android.os.IBinder
import android.os.Parcelable
import android.util.Size
import android.util.SizeF
import android.util.SparseArray
import kotlinx.parcelize.Parcelize
import java.io.Serializable
inline fun bundleOf(block: BundleBuilder.() -> Unit): Bundle {
@EugeneTheDev
EugeneTheDev / DotsLoaders.kt
Created March 18, 2021 23:15
Dots loading animations with Jetpack Compose
import androidx.compose.animation.core.*
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@aelk00
aelk00 / remove-likes.md
Last active March 1, 2024 00:58
Remove all your facebook likes