Skip to content

Instantly share code, notes, and snippets.

View D00mch's full-sized avatar
🇰🇿

Artur Dumchev D00mch

🇰🇿
View GitHub Profile
@andrikeev
andrikeev / Content.kt
Created August 2, 2025 10:59
ContentFlow
sealed interface Content<out Data> {
data object Loading : Content<Nothing>
data class Success<out Data>(
val data: Data,
val refresh: LoadState = LoadState.NotLoading,
) : Content<Data>
data object Error : Content<Nothing>
}
@mikeananev
mikeananev / deps.edn
Created February 24, 2019 22:28
Clojure compress / decompress data examples
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
com.taoensso/nippy {:mvn/version "2.14.0"}
org.apache.commons/commons-compress {:mvn/version "1.18"}}}
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.os.Build;
import android.transition.Transition;
import android.transition.TransitionValues;
import android.view.ViewGroup;
@dodyg
dodyg / gist:5823184
Last active July 13, 2025 08:51
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

(ns mmu
(:gen-class)
(:use [clojure.contrib duck-streams]))
(defn gc []
(dotimes [_ 4] (System/gc)))
(defn used-memory []
(let [runtime (Runtime/getRuntime)]
(gc)