Skip to content

Instantly share code, notes, and snippets.

View chrsp's full-sized avatar

Charles Prado chrsp

  • Post Finance
  • Portugal
View GitHub Profile
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active May 3, 2025 23:26
Japanese Subtitles
@V8tr
V8tr / AutoLayoutDSL.swift
Last active March 23, 2025 19:10
Auto Layout DSL
import UIKit
/// Represents a single `NSLayoutConstraint`
enum LayoutAnchor {
case constant(attribute: NSLayoutConstraint.Attribute,
relation: NSLayoutConstraint.Relation,
constant: CGFloat)
case relative(attribute: NSLayoutConstraint.Attribute,
relation: NSLayoutConstraint.Relation,
@danielt1263
danielt1263 / TokenAcquisitionService.swift
Last active August 30, 2024 06:33
The TokenAcquisitionService automatically retry requests if it receives an unauthorized error. Complete with proof that it works correctly.
//
// TokenAcquisitionService.swift
//
// Created by Daniel Tartaglia on 16 Jan 2019.
// Copyright © 2024 Daniel Tartaglia. MIT License.
//
import Foundation
import RxSwift
@yudetamago
yudetamago / sampleScrollview.swift
Created May 4, 2017 14:46
UIScrollView with SnapKit
import UIKit
import SnapKit
func setScrollView(content: UIView) {
// called in ViewController
self.edgesForExtendedLayout = []
let scrollView = UIScrollView()
let wrapper = UIView()
//
// DetectBlur.swift
//
// Created by Moath_Othman on 2/9/16.
//
import Foundation
//inpired by https://gist.github.com/mortenbekditlevsen/5a0ee16b73a084ba404d
extension UIDevice {
public func MO_isBlurAvailable() -> Bool {