Skip to content

Instantly share code, notes, and snippets.

public final class AdvancedGeoCoder {
private final Geocoder geocoder;
private final List<Address> addressList = new ArrayList<>();
private @GeocoderType
int coderType = GeocoderType.GOOGLE_INTERNAL;
public AdvancedGeoCoder(@NonNull Context context) {
geocoder = new Geocoder(context, new Locale("ru", "RU"));
}
@dmitriigriazin
dmitriigriazin / Constants.kt
Created November 15, 2019 12:56
Kotlin initialization
open class Constants(val a: Unit = print("a")) {
val x: Unit = print("x")
val int by lazy {
print("int")
1
}
init {
@dmitriigriazin
dmitriigriazin / TestCoroutineContext.kt
Created March 18, 2018 16:04 — forked from streetsofboston/TestCoroutineContext.kt
Kotlin Unit Tests Util for having testable functions using Coroutines: TestCoroutineContext
@file:Suppress("PackageDirectoryMismatch")
/*
* Copyright (c) 2018 Intrepid Pursuits,Inc. All rights reserved.
*/
package kotlinx.coroutines.experimental.intrepid
import kotlinx.coroutines.experimental.*
import java.util.concurrent.PriorityBlockingQueue
import java.util.concurrent.TimeUnit

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step)

    git clone git@github...some-repo.git
package ru.avito.aviyo.play_market_info
import android.os.Bundle
import com.jakewharton.rxrelay2.BehaviorRelay
import com.jakewharton.rxrelay2.PublishRelay
import io.reactivex.disposables.CompositeDisposable
import ru.avito.aviyo.SchedulersFactory
import ru.avito.aviyo.distinctTypes
import ru.avito.aviyo.play_market_info.ScreenState.*
import ru.avito.aviyo.plusAssign