Skip to content

Instantly share code, notes, and snippets.

http
git config --global http.proxy "http://127.0.0.1:[your port]"
git config --global https.proxy "http://127.0.0.1:[your port]"
sock5:
git config --global http.proxy "socks5://127.0.0.1:[your port]"
git config --global https.proxy "socks5://127.0.0.1:[your port]"
unset(取消设置):
git config --global --unset http.proxy
git config --global --unset https.proxy
fun <T> Observable<T>.autoDispose(provider: ScopeProvider): ObservableSubscribeProxy<T> =
this.`as`(AutoDispose.autoDisposable(provider))
fun <T> Observable<T>.autoDispose(owner: LifecycleOwner, untilEvent: Lifecycle.Event = Lifecycle.Event.ON_DESTROY): ObservableSubscribeProxy<T> =
this.`as`(AutoDispose.autoDisposable(AndroidLifecycleScopeProvider.from(owner, untilEvent)))
fun <T> Flowable<T>.autoDispose(provider: ScopeProvider): FlowableSubscribeProxy<T> =
this.`as`(AutoDispose.autoDisposable(provider))
fun <T> Flowable<T>.autoDispose(owner: LifecycleOwner, untilEvent: Lifecycle.Event = Lifecycle.Event.ON_DESTROY): FlowableSubscribeProxy<T> =