Skip to content

Instantly share code, notes, and snippets.


İbrahim Süren ibrahimsn98

View GitHub Profile
ibrahimsn98 / bottomsheet.kt
Created Jul 7, 2021
Android Appending Sticky Bottom Sheet View
View bottomsheet.kt
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val bottomSheetDialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
bottomSheetDialog.setOnShowListener {
val containerLayout = dialog?.findViewById(
) as? FrameLayout
val buttonLayout = LayoutInflater.from(dialog?.context)
.inflate(R.layout.layout_delivery_bottom_sheet_buttons, null)
View build.gradle
implementation ""
View build.gradle
allprojects {
repositories {
maven {
url ""
name "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
apply from: "$rootDir/gradle-mvn-push.gradle"
View build.gradle
buildscript {
plugins {
id 'maven-publish'
allprojects {
View gradle-mvn-push.gradle
apply plugin: 'maven-publish'
static def isReleaseBuild() {
return !Config.versionName.contains("SNAPSHOT")
def getOutputDir() {
if (isReleaseBuild()) {
return "${project.buildDir}/releases"
} else {
View gist:e54e302fb54a754d5695b4ca6df7b582
( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 cat.ab ) | tar xfvz -
ibrahimsn98 / AdbCommands
Created Mar 10, 2019 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
ibrahimsn98 /
Created Feb 8, 2019 — forked from soulmachine/
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC:

ibrahimsn98 / MainActivity.kt
Last active Jan 1, 2019
View MainActivity.kt
liveSharedPreferences.listenMultiple(listOf("bool1", "bool2", "bool3"), false).observe(this, Observer<Pair<String, Boolean>> { value ->
Log.d(TAG, "key: ${value!!.first} value: ${value.second}")