Skip to content

Instantly share code, notes, and snippets.


Eddie Ringle EddieRingle

View GitHub Profile
pakoito / ADomainDrivenApproachToKotlinsNewTtypes.kt
Last active Jan 11, 2021
Final code example for "A domain driven approach to Kotlin's new types"
View ADomainDrivenApproachToKotlinsNewTtypes.kt
data class UserInfo(val id: String)
data class UserInfoDto(var id: String?)
// Open Inheritance
interface IViewState { }
class Idle: IViewState
mttkay /
Created Nov 4, 2015
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;
JakeWharton /
Created Jul 6, 2012
Scoped event bus which automatically registers and unregisters with the lifecycle.
package com.squareup.example;
public abstract BaseActivity extends SherlockActivity {
private final ScopedBus scopedBus = new ScopedBus();
protected ScopedBus getBus() {
return scopedBus;
@Override public void onPause() {
yohhoy / threads.h
Last active Sep 29, 2021
C11 <threads.h> emulation library
View threads.h
* C11 <threads.h> emulation library
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at
kevinsawicki /
Created Aug 2, 2011
Add downloads to a GitHub repository
import org.eclipse.egit.github.core.Download;
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.DownloadService;

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access: