Skip to content

Instantly share code, notes, and snippets.

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

Anang Kurniawan anangkur

🏠
Working from home
View GitHub Profile
@mochadwi
mochadwi / README.md
Last active October 8, 2020 06:33
(DEPRECATED) Extracting or Installing an AAB to APK.

DISCLAIMER, in Google Play Console you can download Universal APK directly. No need to use this extracting from AAB to APK method

Download Universal APK from AAB

Please make sure to run this script with your .aab file in the same folder.

The script has the following placeholders, which should be replaced for your specific environment/application:

  • $PASSWORD, $KEYSTORE_FILE, $ALIAS are the details used to sign the .aab in Android Studio
  • $PATH_TO_BUNDLE_TOOL is the path of the bundletool e.g. ~/Downloads/bundletool-all-0.8.0.jar
@GeoffreyMetais
GeoffreyMetais / DiffUtilAdapter.kt
Created October 10, 2018 13:38
Example adapter implementation with DiffUtil
abstract class DiffUtilAdapter<D, VH : RecyclerView.ViewHolder> : RecyclerView.Adapter<VH>(), CoroutineScope {
override val coroutineContext = Dispatchers.Main.immediate
protected var dataset: List<D> = listOf()
private set
private val diffCallback by lazy(LazyThreadSafetyMode.NONE) { DiffCallback<D>() }
protected val detectMoves = true
private val updateActor = actor<List<D>>(capacity = Channel.CONFLATED) {
for (list in channel) internalUpdate(list)
}
@ankurk91
ankurk91 / 1-elementary-os-apps.md
Last active December 25, 2023 19:14
elementary OS 5.1 Hera

elementaryOS Apps and Configs

⚠️ No longer maintained! ⚠️

This guide has been updated for elementaryOS v5.0+.

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common
@krupalshah
krupalshah / PreferenceHelper.kt
Last active June 2, 2023 07:44
helper for shared prefs - kotlin version - Final implementation
object PreferenceHelper {
fun defaultPrefs(context: Context): SharedPreferences
= PreferenceManager.getDefaultSharedPreferences(context)
fun customPrefs(context: Context, name: String): SharedPreferences
= context.getSharedPreferences(name, Context.MODE_PRIVATE)
inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) {
val editor = this.edit()
@lopspower
lopspower / README.md
Last active May 31, 2024 12:19
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 2, 2024 11:03
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites