Skip to content

Instantly share code, notes, and snippets.

View littleli's full-sized avatar

Aleš Najmann littleli

View GitHub Profile
@littleli
littleli / promises-reading-list.md
Created September 23, 2016 15:28 — forked from joepie91/promises-reading-list.md
Promises (Bluebird) reading list

Promises reading list

This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.

This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.

I'm available for tutoring and code review :)

You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).

@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 / 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