Skip to content

Instantly share code, notes, and snippets.

Mehmet Altıparmak mehmet6parmak

Block or report user

Report or block mehmet6parmak

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
@sebaslogen
sebaslogen / LiveObservable.kt
Created Jul 9, 2017
LiveObservable: Android lifecycle aware wrapper for an RxJava Observable
View LiveObservable.kt
import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleObserver
import android.arch.lifecycle.LifecycleOwner
import android.arch.lifecycle.OnLifecycleEvent
import com.jakewharton.rxrelay.BehaviorRelay
import rx.Observable
import rx.android.schedulers.AndroidSchedulers
import rx.functions.Action1
import rx.subscriptions.CompositeSubscription
@tsuharesu
tsuharesu / AddCookiesInterceptor.java
Last active Sep 4, 2019
Handle Cookies easily with Retrofit/OkHttp
View AddCookiesInterceptor.java
/**
* This interceptor put all the Cookies in Preferences in the Request.
* Your implementation on how to get the Preferences MAY VARY.
* <p>
* Created by tsuharesu on 4/1/15.
*/
public class AddCookiesInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
@alexfu
alexfu / DividerItemDecoration.java
Last active Jun 27, 2019
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
View DividerItemDecoration.java
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@JakeWharton
JakeWharton / OkHttpStack.java
Created May 21, 2013
A `HttpStack` implementation for Volley that uses OkHttp as its transport.
View OkHttpStack.java
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
* uses OkHttp as its transport.
*/
@robcowie
robcowie / countries.csv
Created Apr 4, 2011
Create a table of Countries with ISO codes
View countries.csv
alpha2 alpha3 numeric name
AF AFG 004 Afghanistan
AX ALA 248 Åland Islands
AL ALB 008 Albania
DZ DZA 012 Algeria
AS ASM 016 American Samoa
AD AND 020 Andorra
AO AGO 024 Angola
AI AIA 660 Anguilla
AQ ATA 010 Antarctica
You can’t perform that action at this time.