Skip to content

Instantly share code, notes, and snippets.

Rehan Kodekar mkodekar

Block or report user

Report or block mkodekar

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
@mkodekar
mkodekar / gist:203b40157bd3e790ecca5a4832ccf051
Created Dec 14, 2016 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:203b40157bd3e790ecca5a4832ccf051
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@mkodekar
mkodekar / gist:a7da00292a6f2b133329f1a607b60368
Created Oct 19, 2016 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1
View gist:a7da00292a6f2b133329f1a607b60368

#Intro

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 kotlin.jetbrains.org.

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

Let's get started.

@mkodekar
mkodekar / RxJava.md
Created Sep 20, 2016 — forked from cesarferreira/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda
View RxJava.md

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
You can’t perform that action at this time.