Skip to content

Instantly share code, notes, and snippets.

View gmazzo's full-sized avatar
🐾
let's get it done...

Guillermo Mazzola gmazzo

🐾
let's get it done...
  • Glovo
  • Barcelona
  • 22:02 (UTC +02:00)
  • Instagram gmazzo65
View GitHub Profile
@gmazzo
gmazzo / RxUtils.java
Last active February 9, 2018 04:42
A util class for RxJava which provides Observable sources for Cursor, LocalBroadcastManager and SparseArray
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.util.LongSparseArray;
import android.util.SparseArray;
import io.reactivex.Observable;
@gmazzo
gmazzo / JsoupConverterFactory.kt
Created February 2, 2018 15:19
A Jsoup body converter for Retrofit
/**
* A Jsoup body converter for Retrofit
*
* Sample usage (with Rx):
* Retrofit.Builder()
* .addCallAdapterFactory(RxJava2CallAdapterFactory.createAsync())
* .addConverterFactory(JsoupConverterFactory)
* .build()
*
* Then you can declare in you Retrofit interface return type:
@gmazzo
gmazzo / logger.kt
Last active February 2, 2018 15:20
A lightweight Kotlin extension for java.util.logging.Logger simple support
/**
* A lightweight Kotlin extension for java.util.logging.Logger simple support
*
* Usage:
*
* At top level add:
* private val log = logger<MyClass>()
*
* Then on class body:
* log.info "Some log"