Skip to content

Instantly share code, notes, and snippets.

Avatar

Soham Mondal sohamtriveous

View GitHub Profile
@sohamtriveous
sohamtriveous / build.gradle
Last active Feb 1, 2017
A sample RxJava-Android and retrolambda gradle configuration for Android Studio on Mac OS.
View build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.databaseexample"
minSdkVersion 14
targetSdkVersion 22
@sohamtriveous
sohamtriveous / build.gradle
Last active Feb 7, 2016
Quick gradle config snippet to show how to work around circle ci android build memory issues. This will disable pre-dexing libraries on Circle CI while enabling it locally.
View build.gradle
android {
dexOptions {
def filecheck = new File( 'local.properties' )
if (filecheck.exists()) {
preDexLibraries true
} else {
preDexLibraries false
}
}
}
@sohamtriveous
sohamtriveous / sample_toggle_config.json
Last active Jan 24, 2016
changed the 'state' key/value to support non-boolean values
View sample_toggle_config.json
{"name": "jsappbasics", "features":
[
{"name":"video", "state":"disabled", "default": "enabled", "rules":[
{"state": "disabled", "value":
{"apilevel_min": 21, "apilevel_max": 23, "appversion_min": 11, "appversion_max": 13, "date_min": 1452766668000, "date_max": 1455566668000, "buildtype":"debug", "device":[{"manufacturer":"xiaomi","model":"mi3"}, {"manufacturer":"samsung", "model":"s4"}]}
},
{"state": "disabled", "value": {"appversion_max": 13}}
]},
{"name":"crash_reporting", "rules":[
{"state": "disabled", "value":
@sohamtriveous
sohamtriveous / ObjectStore.java
Last active Aug 29, 2015
RxJava wrappers for get/put in Reservoir
View ObjectStore.java
package com.farmily.android.store;
import android.content.Context;
import com.anupcowkur.reservoir.Reservoir;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;
View skills.json
[
{
"displayName": "\"java script\"",
"id": 2651
},
{
"displayName": "\tBusiness Planning & Analysis",
"id": 6279
},
{
View message.json
{
"action": 8,
"message_time": "hhmmz",
"group_flag": 0,
"media_id": 123,
"payload:": "alpha",
"from": 1,
"to": 3,
"chat_type": 0,
"chat_message": "Hello this is a message",
View promocode.json
[{
"coupon-code":"ABCD",
"version":"1",
"coupon-validity-from":"01/01/2014",
"coupon-validity-to":"01/02/2014",
"features-list":{
"recording":"enabled",
"gain":"enabled"
},
"subscription-validity":"lifetime"
@sohamtriveous
sohamtriveous / build.gradle
Created Sep 20, 2014
Top level build.gradle file
View build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'
@sohamtriveous
sohamtriveous / build.gradle
Created Sep 20, 2014
App module build.gradle
View build.gradle
apply plugin: 'com.android.application'
apply plugin: 'hugo'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.myorg.myapp"
minSdkVersion 19