This file contains 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
- (RACSignal *)enqueueRequestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters cacheTime:(NSTimeInterval)expirationTime { | |
NSAssert(self.cluster, @"cluster should be set before request."); | |
NSAssert(self.applicationID.length != 0, @"applicationID should be set before request."); | |
NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:parameters]; | |
RACSignal *signal = [RACSignal createSignal:^(id<RACSubscriber> subscriber) { | |
AFHTTPRequestOperation *operation; | |
operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *op, id JSON) { | |
NSDictionary *errorDictionary = JSON[@"error"]; |
This file contains 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 Character { | |
func utf8() -> UInt8 { | |
let utf8 = String(self).utf8 | |
return utf8[utf8.startIndex] | |
} | |
} | |
func encrypt(c:Character, key:Character) -> String { |
This file contains 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
Hello, | |
I'd like to request the following information, in accordance with the information rights in the GDPR, and particularly Article 15. Please address all points in this email in turn. | |
1. A copy of all my personal data held and/or undergoing processing, in a commonly used electronic form (Article 15(3)). Please note that this might also include any audiovisual material (e.g. voice-recordings or pictures) and is not necessarily limited to the information contained in your customer database and/or the information you make available through the ‘manage my profile’ functionality. For all data that would fall under Article 20 (portability), I would like to recieve this in a commonly-used machine readable format. For data that does not fall under Article 20, such as data inferred about me or opinions about me, I would like this in a commonly-used electronic format. | |
2. If any data was not collected, observed or inferred from me directly, precise information about the source of that data, including the name and c |
This file contains 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 SwiftUI | |
struct ChaoticPhoto: View { | |
let image: Image | |
let radius: CGFloat | |
@Binding var activated: Bool | |
@State var scale: CGFloat = 1 | |
var body: some View { | |
image | |
.resizable() |
This file contains 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
// | |
// Store.swift | |
// | |
// Created by Daniel Tartaglia on 3/11/17. | |
// Copyright © 2020 Daniel Tartaglia. MIT License | |
// | |
import Foundation | |
import RxSwift |
This file contains 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
@main | |
struct MyApp: App { | |
enum Sheet { case first, second } | |
@State var sheet: Sheet? = nil | |
var body: some Scene { | |
WindowGroup { | |
VStack { | |
Button("First") { sheet = .first } |
This file contains 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
extension LoginViewController: WKNavigationDelegate { | |
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
if let url = webView.url, url.absoluteString.contains("/index.action") { | |
let store = WKWebsiteDataStore.default().httpCookieStore | |
store.getAllCookies { cookies in | |
if let sessionIdCookie = cookies.first(where: { cookie in | |
cookie.name == "JSESSIONID" | |
}) { | |
HTTPCookieStorage.shared.setCookies(cookies, for: webView.url, mainDocumentURL: nil) | |
self.callback(ConfluenceSessionCookie(jSessonId: sessionIdCookie)) |
This file contains 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 Decodable { | |
public static func randomInstance() throws -> Self { | |
let decoder = RandomDecoder() | |
return try Self(from: decoder) | |
} | |
} | |
private class RandomDecoder: Decoder { |
This file contains 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 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
// | |
// CAMediaTimingFunction.swift | |
import UIKit | |
extension CAMediaTimingFunction { | |
static let linear = CAMediaTimingFunction(name: .linear) | |
static let easeOut = CAMediaTimingFunction(name: .easeOut) |
OlderNewer