Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Tartaglia danielt1263

  • Haneke Design
  • Tampa, FL
View GitHub Profile
@danielt1263
danielt1263 / TokenAcquisitionService.swift
Last active Jun 20, 2021
Token Acquisition Service for Combine
View TokenAcquisitionService.swift
//
// TokenAcquisitionService.swift
// CombineSandbox
//
// Created by Daniel Tartaglia on 11/27/19.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import Combine
View EmitWhile.swift
//
// EmitWhile.swift
//
// Created by Daniel Tartaglia on 09/06/2018.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import RxSwift
@danielt1263
danielt1263 / RetryingTokenNetworkService.swift
Last active May 21, 2021
The TokenAcquisitionService automatically retry requests if it receives an unauthorized error. Complete with proof that it works correctly.
View RetryingTokenNetworkService.swift
//
// RetryingTokenNetworkService.swift
//
// Created by Daniel Tartaglia on 16 Jan 2019.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import RxSwift
View PaginationNetworkLogic.swift
//
// PaginationNetworkLogic.swift
//
// Created by Daniel Tartaglia on 4/9/17.
// Copyright © 2019 Daniel Tartaglia. MIT License
//
import RxSwift
struct PaginationUISource {
@danielt1263
danielt1263 / RetryWhen.swift
Last active Jan 28, 2021
I have implemented RetryWhen in Combine.
View RetryWhen.swift
//
// RetryWhen.swift
// CombineSandbox
//
// Created by Daniel Tartaglia on 9/27/19.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import Combine
@danielt1263
danielt1263 / Store.swift
Last active Nov 9, 2020
A stripped down version of The Elm Architecture for Swift. Great for implementing state machines.
View Store.swift
//
// Store.swift
//
// Created by Daniel Tartaglia on 3/11/17.
// Copyright © 2020 Daniel Tartaglia. MIT License
//
import Foundation
import RxSwift
View Presenter.swift
//
// Presenter.swift
//
// Created by Daniel Tartaglia on 8/24/20.
// Copyright © 2020 Daniel Tartaglia. MIT License.
//
import UIKit
import RxSwift
@danielt1263
danielt1263 / ErrorRouter.swift
Created Aug 13, 2020
Gather up errors into a single Observable<Error>
View ErrorRouter.swift
//
// ErrorRouter.swift
//
// Created by Daniel Tartaglia on 5/23/20.
// Copyright © 2020 Daniel Tartaglia. MIT License.
//
import Foundation
import RxCocoa
import RxSwift
View ObservableEventTransforms.swift
//
// ObservableEventTransforms.swift
//
// Created by Daniel Tartaglia on 9/22/18.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import RxSwift
/**
@danielt1263
danielt1263 / Signal.swift
Last active May 15, 2020
Swift replacement for KVO
View Signal.swift
//
// Signal.swift
//
// Created by Daniel Tartaglia on 9/6/15.
// Copyright © 2016 Daniel Tartaglia. MIT License.
//
public protocol Disposable {
func dispose()
}