Skip to content

Instantly share code, notes, and snippets.

View iamutkarshtiwari's full-sized avatar
💭
改善

Utkarsh Tiwari iamutkarshtiwari

💭
改善
  • Expedia Group
  • Seattle, WA
View GitHub Profile
@iamutkarshtiwari
iamutkarshtiwari / samsung_galaxy_debloater_script.sh
Last active May 8, 2023 10:35
Samsung Galaxy Debloater Script
#!/bin/bash
# List of package names to be removed
packages=(
# Samsung apps
# You can add more here. Checkout out this blogpost:
# https://technastic.com/remove-samsung-bloatware-safe-to-remove-apps/
"com.samsung.android.calendar"
"com.samsung.android.email.provider"
@iamutkarshtiwari
iamutkarshtiwari / gist:b0eceff9ebd955606e060f4d34502b21
Created November 4, 2021 08:50
Ordered/Unordered List in Jetpack Compose
package com.iamutkarshtiwari.ds.component
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
@iamutkarshtiwari
iamutkarshtiwari / gist:3437c2855e5ee1ca64d6ceb7e95e7023
Created March 9, 2021 09:21
Scrim issue in ModalBottomSheetLayout with column container with full width wrapping contents within sheet
@OptIn(ExperimentalMaterialApi::class)
@Composable
private fun SetupModal() {
val state = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
sheetState = state,
sheetContent = {
Column(
modifier = Modifier
@iamutkarshtiwari
iamutkarshtiwari / gist:b0a5da2945d056c3b0a291ffa432617c
Created March 9, 2021 09:10
ModalBottomSheetLayout Scrim Issue
@OptIn(ExperimentalMaterialApi::class)
@Composable
private fun SetupModal() {
val state = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden)
val scope = rememberCoroutineScope()
ModalBottomSheetLayout(
sheetState = state,
sheetContent = {
PrimaryButton(
text = "Hello",
@iamutkarshtiwari
iamutkarshtiwari / Jetpack Compose Right and Left ModalDrawer
Last active July 29, 2023 10:12
Custom Jetpack Compose ModalDrawer to support Left and Right alignments
package com.iamutkarshtiwari.ds.component.drawer
import androidx.annotation.FloatRange
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
Konosuke san is one hardworking folk. I remember a weekend when I went office to pick up some parcel,
I found Konosuke completely zoned into his laptop oblivious of anyone around him.
He didn't even notice that I was standing next to him for a couple of minutes.
I had to nudge him to initiate the conversation. This shows how much dedicated he is toward his work.
He is on of the most cooperative and passionate PMs in Mercari I have had the honor to work with.
I wish him all the best for his future endeavors!
@iamutkarshtiwari
iamutkarshtiwari / DynamicGridView.java
Created December 21, 2018 06:51
DynamicGridView.java
package com.project.ui.dynamicgridview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.annotation.TargetApi;
import android.content.Context;
@iamutkarshtiwari
iamutkarshtiwari / OkHttp3 integration library with GlideModule.md
Last active April 3, 2018 06:59
How to create Custom Glide Module with OkHttp3 integration?

This is the only answer the solved my this issue for me - https://stackoverflow.com/a/46638213

This configuration worked for me -

  • In app module gradle -
    implementation "com.github.bumptech.glide:glide:${glide_version}"
    implementation "com.github.bumptech.glide:okhttp3-integration:${glide_version}"
    kapt "com.github.bumptech.glide:compiler:${glide_version}"
  • In app proguard -
package com.cookpad.android.licensetools
import groovy.json.JsonBuilder
import groovy.util.slurpersupport.GPathResult
import groovyjarjarantlr.StringUtils
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.Dependency
02-22 20:02:52.108 16927-16927/com.kouzoh.mercari.debug D/Fotoapparat: Device: updateLensPositionSelector
02-22 20:02:52.119 16927-16927/com.kouzoh.mercari.debug D/Fotoapparat: Fotoapparat: <init>
02-22 20:02:52.125 16927-16927/com.kouzoh.mercari.debug D/Fotoapparat: Fotoapparat: start
02-22 20:02:52.129 16927-17861/com.kouzoh.mercari.debug D/Fotoapparat: Device: selectCamera
02-22 20:02:52.132 16927-17861/com.kouzoh.mercari.debug D/Fotoapparat: CameraDevice: open
02-22 20:02:52.611 16927-17861/com.kouzoh.mercari.debug D/Fotoapparat: CameraDevice: getCapabilities$suspendImpl
02-22 20:02:52.615 16927-17861/com.kouzoh.mercari.debug D/Fotoapparat: CameraDevice: updateParameters$suspendImpl
02-22 20:02:52.617 16927-17861/com.kouzoh.mercari.debug D/Fotoapparat: New camera parameters are: CameraParameters
flashMode: io.fotoapparat.parameter.Flash$Off@96559e8
focusMode: io.f