Skip to content

Instantly share code, notes, and snippets.

View migelfn's full-sized avatar

Miguel Fermin migelfn

View GitHub Profile
gource \
-f -1280x720 \
-seconds-per-day 1 \
-o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
@migelfn
migelfn / build.gradle
Created July 29, 2017 19:18
Resolution strategy to avoid different support library verison
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith('multidex')) {
details.useVersion '25.3.1'
}
}
}
}
public class RxBus {
private static RxBus sInstance;
private final Relay<Object> mBus = PublishRelay.create().toSerialized();
public static RxBus getInstance() {
if (sInstance == null){
sInstance = new RxBus();
}
@migelfn
migelfn / BasePresenter.java
Last active April 30, 2017 15:33
MVP + RxLifecycle
public abstract class BasePresenter<T extends MvpView> implements Presenter<T> {
private T mView;
@Override
public void attachView(T view) {
mView = view;
}
@Override