Skip to content

Instantly share code, notes, and snippets.

View wajahatkarim3's full-sized avatar

Wajahat Karim wajahatkarim3

View GitHub Profile
@mirzemehdi
mirzemehdi / generate_aso_metadata.sh
Created January 8, 2026 19:52
Automatically generates App Store and Google Play metadata (title, subtitle, keywords, description) for multiple locales using OpenAI. Accepts an app idea or PRD file and optionally target keywords, following real ASO best practices. Outputs files for iOS and Android, with parallel generation and locale support.
#!/usr/bin/env bash
set -euo pipefail
# ============================================================
# ASO Metadata Generator (Named Arguments)
# ============================================================
# ----------------------------
# CONFIG
# ----------------------------
/*
* Copyright 2025 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@qamarelsafadi
qamarelsafadi / OnBackPressedAlternativeWay.kt
Last active April 4, 2023 10:09
OnBackPressed Alternative way for fragments and activities
/* ----------------------------------------- Activity ------------------------------------------ */
/* make sure you have at least 'androidx.activity:activity-ktx:1.6.0-rc01' at your dependencies
(just to let you know this dependency is not stable yet )
*/
implementation 'androidx.activity:activity-ktx:1.6.0-rc01'
fun AppCompatActivity.onBackPressed(isEnabled: Boolean, callback: () -> Unit) {
onBackPressedDispatcher.addCallback(this,
@qamarelsafadi
qamarelsafadi / NewMenuApiImplementation.kt
Last active August 11, 2025 11:01
This gist will help you to get started with the new menu implementation way, you can find 2 extensions that will help you not repeat a huge code, Enjoy it.
// Step 1 : implement the new activity dependency in you gradle
implementation 'androidx.activity:activity-ktx:1.5.1'
// if you are using compose
implementation 'androidx.activity:activity-compose:1.5.1'
/* ---------------------------------------------- Activity Extension -------------------------------------------------------*/
fun AppCompatActivity.bindMenu(
@MenuRes menuRes: Int,
@c5inco
c5inco / SwipeableCards.kt
Last active November 10, 2025 22:35
Jetpack Compose implementation of inspiration: https://twitter.com/philipcdavis/status/1534192823792128000
package des.c5inco.cardswipecompose
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.calculateTargetValue
import androidx.compose.animation.core.keyframes
import androidx.compose.animation.splineBasedDecay
@c5inco
c5inco / ChainedSpring.kt
Last active March 17, 2024 17:32
Jetpack Compose implementation of inspiration: https://twitter.com/amos_gyamfi/status/1496487449735872526
package des.c5inco.material3
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.spring
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Surface
@Kashif-E
Kashif-E / proguard_rules.pro
Last active October 14, 2024 00:46
This gist contains almost all the pro guard rules that you will ever need for R8
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
package com.shreyaspatil.callbackflownetwork
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.MutableStateFlow
@wertgit
wertgit / ReminderWorker
Created November 27, 2019 06:53
ReminderWorker
import android.R
import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import androidx.core.app.NotificationCompat
import androidx.work.*
import org.koin.core.KoinComponent
import org.koin.core.inject
@wertgit
wertgit / CustomSwipeToRefresh.kt
Created November 22, 2019 03:27
A Customed SwipeRefreshLayout that handles swiping issues with a RecyclerView inside a SwipeRefreshLayout. It also works for HorizontalScrollView.
import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.ViewConfiguration
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import kotlin.math.abs
/**