Skip to content

Instantly share code, notes, and snippets.

View k-arabadzhiev's full-sized avatar

Kostadin Arabadzhiev k-arabadzhiev

  • Plovdiv, Bulgaria
View GitHub Profile
@okmanideep
okmanideep / EventQueue.kt
Last active October 2, 2024 04:19
Event abstraction for Jetpack Compose
import androidx.compose.runtime.*
import kotlinx.coroutines.CoroutineScope
@Stable
internal class Event<T>(val value: T)
class MutableEventQueue<T>
internal constructor(): EventQueue<T>() {
private val events = mutableListOf<Event<T>>()
private val nextEventAsState = mutableStateOf<Event<T>?>(null)
// https://vonlisboa.medium.com/uploading-a-file-with-progress-in-kotlin-6afbfd80fb1c
package com.example.retrofit.upload
import io.reactivex.rxjava3.core.Single
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 22, 2025 21:15
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@felix19350
felix19350 / pagination-headers-sample.kt
Last active June 3, 2022 16:36
Ktor REST style pagination headers
import io.ktor.application.ApplicationCall
import io.ktor.http.URLBuilder
import io.ktor.http.takeFrom
import io.ktor.util.createFromCall
import io.ktor.application.call
import io.ktor.http.HttpStatusCode
import io.ktor.request.receive
import io.ktor.response.respond
import io.ktor.routing.*