Skip to content

Instantly share code, notes, and snippets.

View MartinHarkins's full-sized avatar

Martin Harkins MartinHarkins

View GitHub Profile
ConnectableObservable<Wrapper<List<Data>>> dataObservable;
public Observable<Wrapper<List<Data>>> getData() {
if (dataObservable == null) {
dataObservable = webService.getApiData()
.compose((Observable.Transformer<List<Data>, List<Data>>) networkScheduling)
.map(dataList -> Wrapper.response(dataList))
// Retry a few times before letting an error through.
.retry(5)
.onErrorResumeNext(throwable -> {
@MartinHarkins
MartinHarkins / 0_reuse_code.js
Created May 13, 2014 21:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console