Moved to https://github.com/kbilsted/Functional-core-imperative-shell/blob/master/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension NSData { | |
/// Return hexadecimal string representation of NSData bytes | |
@objc(kdj_hexadecimalString) | |
public var hexadecimalString: NSString { | |
var bytes = [UInt8](count: length, repeatedValue: 0) | |
getBytes(&bytes, length: length) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface KeyBoardSizeView : UIView | |
@property (nonatomic,weak) NSLayoutConstraint* heightConstraint; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BitwiseOptions.swift | |
// | |
// Created by Gregory Higley on 11/24/14. | |
// Copyright (c) 2014 Prosumma LLC. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/** | |
Creates and returns a new debounced version of the passed block which will postpone its execution until after wait seconds have elapsed since the last time it was invoked. | |
It is like a bouncer at a discotheque. He will act only after you shut up for some time. | |
This technique is important if you have action wich should fire on update, however the updates are to frequent. | |
Inspired by debounce function from underscore.js ( http://underscorejs.org/#debounce ) | |
*/ | |
public func dispatch_debounce_block(wait : NSTimeInterval, queue : dispatch_queue_t = dispatch_get_main_queue(), block : dispatch_block_t) -> dispatch_block_t { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func +(lhs: NSAttributedString, rhs: NSAttributedString) -> NSAttributedString { | |
let a = lhs.mutableCopy() as! NSMutableAttributedString | |
let b = rhs.mutableCopy() as! NSMutableAttributedString | |
a.appendAttributedString(b) | |
return a.copy() as! NSAttributedString | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import WebKit | |
final class WebCacheCleaner { | |
class func clean() { | |
HTTPCookieStorage.shared.removeCookies(since: Date.distantPast) | |
print("[WebCacheCleaner] All cookies deleted") | |
WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ObservableBuffer.swift | |
// | |
// Created by Daniel Tartaglia | |
// Copyright © 2019 Daniel Tartaglia. MIT License. | |
import RxSwift | |
extension ObservableType { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PaginationNetworkLogic.swift | |
// | |
// Created by Daniel Tartaglia on 4/9/17. | |
// Copyright © 2019 Daniel Tartaglia. MIT License | |
// | |
import RxSwift | |
struct PaginationUISource { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EmitWhile.swift | |
// | |
// Created by Daniel Tartaglia on 09/06/2018. | |
// Copyright © 2021 Daniel Tartaglia. MIT License. | |
// | |
import Foundation | |
import RxSwift |
OlderNewer