Skip to content

Instantly share code, notes, and snippets.


Mohammad Ersan MoshDev

Block or report user

Report or block MoshDev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.dart
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
Widget build(BuildContext context) {
View App.dart
Future main() async {
final Iterable<Locale> supportedLocales = [Locale('en'), Locale('ar')];
await Langs.init(supportedLocales: supportedLocales, loadDeviceLanguage: true);
runApp(MyApp(supportedLocales: supportedLocales));
MoshDev / ListAdapter.kt
Last active Sep 30, 2019
Gson List Adapter
View ListAdapter.kt
import java.util.ArrayList
MoshDev / DebounceTest.kt
Created Oct 17, 2018 — forked from k-kagurazaka/DebounceTest.kt
RxJava debounce like operator implementation for kotlin coroutine
View DebounceTest.kt
launch(UI) {
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
fun EditText.onTextChanged(): ReceiveChannel<String> =
View Gradle Simple Run Task.gradle
project.afterEvaluate {
android.applicationVariants.all { variant ->
task "installRun${}"(type: Exec, dependsOn: "install${}", group: "run") {
commandLine = ["adb", "shell", "monkey", "-p", variant.applicationId + " 1"]
doLast {
println "Launching ${variant.applicationId}"
View ubuntu14.04-command-line-install-android-sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
MoshDev / installRun.gradle
Last active Feb 24, 2020
Install and Run Android App Using Gradle Task
View installRun.gradle
//Place this script inside your application module build.gradle
//It will create a new task(s) based on your application variants within (run) group
//sample: ./gradlew installRunDebug
//sample: ./gradlew installRunStagDebug
project.afterEvaluate {
android.applicationVariants.all { variant ->
task "installRun${}"(type: Exec, dependsOn: "install${}", group: "run") {
commandLine = ["adb", "shell", "monkey", "-p", variant.applicationId + " 1"]
doLast {
View How to inject FlowUp inside an

How to inject FlowUp inside your apk

  • Decompile flowup sample app
    • apktool d flowup.apk -o flowup
  • Decompile your apk
    • apktool d original.apk -o injected
  • Copy all the smali files from the flowup library to your decompiled project
    • cp -r flowup/smali injected/smali_classes{N} where N is the next smali_classes group number
  • Open your app AndroidManifest.xml and look for the application tag to get its android:name value
  • Open your app main application .smali file
MoshDev / gist:948dd4e37638a4dd55ce
Created Feb 26, 2016 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1
View gist:948dd4e37638a4dd55ce


Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

You can’t perform that action at this time.