Skip to content

Instantly share code, notes, and snippets.

View littleli's full-sized avatar

Aleš Najmann littleli

View GitHub Profile
@littleli
littleli / Pager.java
Created November 14, 2015 21:11 — forked from mttkay/Pager.java
A simple Rx based pager
public class Pager<I, O> {
private static final Observable FINISH_SEQUENCE = Observable.never();
private PublishSubject<Observable<I>> pages;
private Observable<I> nextPage = finish();
private Subscription subscription = Subscriptions.empty();
private final PagingFunction<I> pagingFunction;
private final Func1<I, O> pageTransformer;
package com.getpebble.example;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
@littleli
littleli / gist:8906640
Created February 9, 2014 22:00
Hamcrest p0rn
@SuppressWarnings("unchecked")
List<Object> aList = edn.unmarshall("(:one :two 3 4)", List.class);
assertThat(aList, Matchers.<Object>contains(Keyword.newKeyword("one"), Keyword.newKeyword("two"), 3L, 4L));
@littleli
littleli / 0_reuse_code.js
Created November 28, 2013 22:33
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
@littleli
littleli / the-case-for-go.txt
Created November 12, 2012 12:25
The case for Go #golang
Go at Heroku
http://blog.golang.org/2011/04/go-at-heroku.html
Why you PHP guys should learn Golang
http://www.mikespook.com/2012/08/why-you-php-guys-should-learn-golang/
Go at CloudFlare
http://blog.cloudflare.com/go-at-cloudflare
Go at Moovweb