Skip to content

Instantly share code, notes, and snippets.

View epool's full-sized avatar

Eduardo Pool epool

  • Bitso
  • Mérida, México
View GitHub Profile
@epool
epool / FirebaseUtil.java
Last active January 29, 2018 16:40
Firebase util class to serialize and deserialize Object for Firebase 9.2.0 using Auto-Value and Jackson.
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.GenericTypeIndicator;
import java.util.Map;
public enum FirebaseUtil {
@epool
epool / CreditCardFormattingTextWatcher.java
Created March 14, 2016 22:02
Text watcher for giving "#### #### #### ####" format to edit text.
import android.text.Editable;
import android.text.TextWatcher;
/**
* Text watcher for giving "#### #### #### ####" format to edit text.
* Created by epool on 3/14/16.
*/
public class CreditCardFormattingTextWatcher implements TextWatcher {
private static final String EMPTY_STRING = "";
@epool
epool / introrx.md
Last active August 29, 2015 14:23 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.