Skip to content

Instantly share code, notes, and snippets.

Engineering @PandoraMedia

Miguel Vargas guelo

Engineering @PandoraMedia
Block or report user

Report or block guelo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .bash_profile
export PS1="\u:$ "
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/26.0.2:~/scripts:.:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:/usr/local/share/npm/bin:$HOME/bin/gsutil:$HOME/.rvm/bin"
export NODE_PATH="/usr/local/lib/node_modules"
export EDITOR="subl -w"
export GRADLE_OPTS="-Dorg.gradle.daemon=true"
export HISTTIMEFORMAT="%m-%d %T "
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
guelo /
Created Sep 30, 2017 — forked from rjrjr/java-sealed-class
Poor Man's Sealed Classes (visitor pattern)
* For Java developers all excited by and jealous of Kotlin's sealed classes.
* Do this when you wish you could put parameters on an enum.
public class PoorMan {
interface Event {
<T> T dispatch(EventHandler<T> handler);
interface EventHandler<T> {
guelo / a.kt
Last active Jun 26, 2017
Kotlin class with constructor and annotations formating
View a.kt
@ScreenScope internal class ReservationsPresenter @Inject constructor(private val shiftPresenter: ShiftPresenter, private val reservationRepository: ReservationRepository ) : Presenter<ReservationsFragment>() {
fun hello() {
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Consumer;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
guelo /
Last active Jul 1, 2019
Dagger injected Rx schedulers
import javax.inject.Named;
import javax.inject.Singleton;
import io.reactivex.Observable;
import io.reactivex.ObservableTransformer;
import io.reactivex.Scheduler;
public class RxSchedulers {
guelo / gist:6b74921cb118e36caf175cc91a894969
Created Apr 25, 2016
Mock Retrofit2 service interface.
View gist:6b74921cb118e36caf175cc91a894969
public interface GitHubService {
Call<List<Repo>> listRepos(@Path("user") String user);
class MockCall<T> implements Call<T> {
public Response<T> execute() throws IOException { return null; }
You can’t perform that action at this time.