Skip to content

Instantly share code, notes, and snippets.

View kevalpatel2106's full-sized avatar
🚧

Keval Patel kevalpatel2106

🚧
View GitHub Profile
Observable<Integer> observable = Observable.from(new Integer[]{1,2,3,4,5}) //emit 1 to 5
.skip(2); //Skip first two elements
observable
.subscribeOn(Schedulers.newThread())
.observeOn(Schedulers.io())
.subscribe(new Action1<Integer>() {
@Override
public void call(Integer integer) {
Log.d("Observer", "Output:" + integer);
@kevalpatel2106
kevalpatel2106 / android-19-circle.yml
Created January 24, 2017 10:42 — forked from donnfelker/android-19-circle.yml
Sample CircleCI Configuration For an Android App
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/your-app-name/app/build/outputs/apk/
machine:
environment:
#Enable daemon
org.gradle.daemon=true
# Try and findout the best heap size for your project build.
org.gradle.jvmargs=-Xmx3096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Modularise your project and enable parallel build
org.gradle.parallel=true
# Enable configure on demand.
#!/usr/bin/env bash
# use curl to download a keystore from $KEYSTORE_URI, if set,
# to the path/filename set in $KEYSTORE.
if [[ KEY_STORE && ${KEY_STORE} && $KEYSTORE_URI && ${KEYSTORE_URI} ]]
then
echo "Keystore detected - downloading..."
# we're using curl instead of wget because it will not
# expose the sensitive uri in the build logs:
curl -L -o ${KEY_STORE} ${KEYSTORE_URI}
else
package com.infiniteexpandablelistview;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;
import java.util.ArrayList;
release {
//Enable the proguard
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), "proguard-rules.pro"
//Other parameters
debuggable false
jniDebuggable false
renderscriptDebuggable false
signingConfig playStoreConfig //Add your own signing config
release{
//...
//...
shrinkResources true
//...
}
defaultConfig {
//...
//...
//...
//strip other than english resources
resConfigs "en"
}

Keybase proof

I hereby claim:

  • I am kevalpatel2106 on github.
  • I am kevalpatel2106 (https://keybase.io/kevalpatel2106) on keybase.
  • I have a public key whose fingerprint is 340D 657D E497 6120 75B1 2EEF 32D5 B008 6528 DF6C

To claim this, I am signing this object:

@kevalpatel2106
kevalpatel2106 / employe.json
Created April 27, 2017 14:49
Interview Test
{
"status": "success",
"count": 11,
"employee": [
{
"name": {
"first_name": "Keval",
"last_name": "Patel"
},
"experience": 2,