Skip to content

Instantly share code, notes, and snippets.

View codesnipers's full-sized avatar
😏
I'll catch your code

nexxer codesnipers

😏
I'll catch your code
View GitHub Profile
@Andrea-Scuderi
Andrea-Scuderi / .swift
Created September 3, 2019 10:23
CombineAPIDemo
import Combine
import Foundation
enum APIError: Error {
case invalidBody
case invalidEndpoint
case invalidURL
case emptyData
case invalidJSON
case invalidResponse
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.python.org/pypi/certifi
import os
import os.path
import ssl
import stat
@milechainsaw
milechainsaw / BackoffCallback.java
Created July 19, 2016 12:53
Exponential backoff support for Retrofit2.
/**
* Created by milechainsaw on 7/19/16.
*
* Exponential backoff callback for Retrofit2
*
*/
public abstract class BackoffCallback<T> implements Callback<T> {
private static final int RETRY_COUNT = 3;
/**
* Base retry delay for exponential backoff, in Milliseconds