Delete merged branches remote. Use with git alias.
[alias]
cleanup-remote = "!git branch -r --merged | grep -v '\\*\\|master\\|develop\\|`THE_NAME_OF_THE_BRANCH`' | sed 's/origin\\///' | xargs -n 1 git push --delete origin"
extension Formatter { | |
static let iso8601: (regular: ISO8601DateFormatter, withFractionalSeconds: DateFormatter) = { | |
let formatter = DateFormatter() | |
formatter.calendar = Calendar(identifier: .iso8601) | |
formatter.locale = Locale(identifier: "en_US_POSIX") | |
formatter.timeZone = TimeZone(secondsFromGMT: 0) | |
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX" | |
return (ISO8601DateFormatter(), formatter) | |
}() | |
} |
// | |
// Debouncer.swift | |
// | |
// Created by Kirill Budevich on 11/14/19. | |
// Copyright © 2019 KB. All rights reserved. | |
// | |
import Foundation | |
final public class Debouncer { |
extension DispatchQueue { | |
static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } | |
static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } | |
static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } | |
static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } | |
func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { | |
asyncAfter(deadline: .now() + delay, execute: closure) | |
} | |
} |
// Created by Kirill Budevich. | |
// Copyright © 2018 Kirill Budevich. All rights reserved. | |
// | |
import UIKit | |
public protocol Gradientable: class { | |
/// Drawed CAGradientLayer from sublayers, nil if not added | |
var gradientLayer: CAGradientLayer? { get } |