CLICK ME
yes, even hidden code blocks!
print("hello world!")
import androidx.fragment.app.Fragment | |
import androidx.lifecycle.DefaultLifecycleObserver | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.Observer | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KProperty | |
fun <T> Fragment.viewLifecycleLazy(initialise: () -> T): ReadOnlyProperty<Fragment, T> = | |
object : ReadOnlyProperty<Fragment, T>, DefaultLifecycleObserver { |
// Sometimes it's necessary to do a bit of clean-up | |
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) { | |
el.removeAttribute('data-confirm'); | |
el.click(); | |
}); |
// Requires Compose 1.1.0-alpha02+ | |
// Best used with navigation animation transitions in Accompanist 0.17.0+ | |
import androidx.compose.animation.* | |
import androidx.compose.animation.core.FastOutLinearInEasing | |
import androidx.compose.animation.core.LinearEasing | |
import androidx.compose.animation.core.LinearOutSlowInEasing | |
import androidx.compose.animation.core.tween | |
import androidx.compose.ui.unit.Density | |
import androidx.compose.ui.unit.dp |
/** | |
APPLY CHASE BANK CC OFFERS | |
This script helps you apply all the Chase bank credit cards automatically. | |
- Login to Chase and go to https://secure03b.chase.com/web/auth/dashboard#/dashboard/offers/index. | |
- Open 'Inspect Element' | |
- Go to Scripts tab and copy this script. | |
- Run this script. | |
*/ |
inline fun <reified T> SharedPreferences.observeKey(key: String, default: T): Flow<T> { | |
val flow = MutableStateFlow(getItem(key, default)) | |
val listener = SharedPreferences.OnSharedPreferenceChangeListener { _, k -> | |
if (key == k) { | |
flow.value = getItem(key, default)!! | |
} | |
} | |
registerOnSharedPreferenceChangeListener(listener) |
package des.c5inco.material3 | |
import androidx.compose.animation.* | |
import androidx.compose.animation.core.* | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.interaction.MutableInteractionSource | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.shape.CircleShape | |
import androidx.compose.foundation.shape.RoundedCornerShape |
package com.saantiaguilera | |
import com.saantiaguilera.Result.Failure | |
import com.saantiaguilera.Result.Success | |
import kotlin.contracts.ExperimentalContracts | |
import kotlin.contracts.InvocationKind | |
import kotlin.contracts.contract | |
/** | |
* A discriminated union that encapsulates successful outcome with a value of type [S] |
import androidx.compose.animation.animateColor | |
import androidx.compose.animation.core.* | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.defaultMinSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.shape.ZeroCornerSize | |
import androidx.compose.material.* |