Skip to content

Instantly share code, notes, and snippets.

@DejanEnspyra
DejanEnspyra / Obfuscator.swift
Created May 31, 2017 17:51
Obfuscation of hard-coded security-sensitive strings.
//
// Obfuscator.swift
//
// Created by Dejan Atanasov on 2017-05-31.
//
import Foundation
class Obfuscator: AnyObject {
@Gurdeep0602
Gurdeep0602 / AppStoryboard.swift
Last active April 2, 2024 09:54
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
@ibrahimkteish
ibrahimkteish / PublishSubject.swift
Last active February 1, 2018 14:03
RxSwift PublishSubject type
//disposeBag from memoy management
let disposeBag = DisposeBag()
//Create our PublishSubject with a string type
let subject = PublishSubject<String>()
//ErrorType will be used for emitting an Error event
enum Error: ErrorType {
case Test
}
//emit our first event before any subscription to the subject
@rsaunders100
rsaunders100 / gist:8972207
Created February 13, 2014 09:24
NSDateFormatter reuse
// For NSString to NSDate to parse server dates in the full ISO 8601 format
// E.g. 2014-02-11T10:22:46+00:00
+ (NSDateFormatter *) iso8601FullDateFromatter
{
static NSDateFormatter * dateFormatter;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
dateFormatter = [[NSDateFormatter alloc] init];