Skip to content

Instantly share code, notes, and snippets.

View mibrahimdev's full-sized avatar
🐞
Bugging

Mohamed Ibrahim mibrahimdev

🐞
Bugging
View GitHub Profile
package com.experiments.preferencehelper
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import com.experiments.preferencehelper.PreferenceHelper.get
import com.experiments.preferencehelper.PreferenceHelper.set
class MainActivity : AppCompatActivity() {
@mibrahimdev
mibrahimdev / build.gradle
Created June 24, 2018 21:24 — forked from gpeal/build.gradle
Airbnb Gradle Flavors
...
apply from: './flavors.gradle'
...
android {
buildTypes {
productFlavors {
project.flavors.each { flavor, config ->
"$flavor" {
dimension 'scope'
if (flavor != 'full') {
@mibrahimdev
mibrahimdev / SimpleDemo.kt
Created June 24, 2018 20:47 — forked from gpeal/SimpleDemo.kt
Airbnb MvRx Early Look
data class SimpleDemoState(val listing: Async<Listing> = Uninitialized)
class SimpleDemoViewModel(override val initialState: SimpleDemoState) : MvRxViewModel<SimpleDemoState>() {
init {
fetchListing()
}
private fun fetchListing() {
// This automatically fires off a request and maps its response to Async<Listing>
// which is a sealed class and can be: Unitialized, Loading, Success, and Fail.
@mibrahimdev
mibrahimdev / API.md
Created November 28, 2016 08:45 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: