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
// This script will alert you whenever some slot opens up on the given date within the given District IDs | |
// Change the districts to your needs as per your city | |
// Change the dateArr to add your convinent set of dates | |
// For further update do checkout http://twitter.com/debarko/ | |
// How To setup Video -> https://www.youtube.com/watch?v=3_N5FFegtI4 | |
// Steps to use | |
// 1. Update Config |
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
[ | |
"WAT": "Africa/Lagos", | |
"EAT": "Africa/Addis_Ababa", | |
"MDT": "America/Denver", | |
"ICT": "Asia/Bangkok", | |
"TRT": "Europe/Istanbul", | |
"PHT": "Asia/Manila", | |
"CAT": "Africa/Harare", | |
"EET": "Europe/Athens", | |
"SGT": "Asia/Singapore", |
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
[ | |
"Africa/Abidjan", | |
"Africa/Accra", | |
"Africa/Addis_Ababa", | |
"Africa/Algiers", | |
"Africa/Asmara", | |
"Africa/Bamako", | |
"Africa/Bangui", | |
"Africa/Banjul", | |
"Africa/Bissau", |
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 UIKit | |
import WebKit | |
final class ReCAPTCHAViewController: UIViewController { | |
private var webView: WKWebView! | |
private let viewModel: ReCAPTCHAViewModel | |
init(viewModel: ReCAPTCHAViewModel) { | |
self.viewModel = viewModel |
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
// Here is a usage example. Refer to ImagePicker.swift below for the implementation! | |
// 1. Easily configure the picker | |
let cameraPicker = ImagePicker(sourceType: .camera) | |
let cropPicker = ImagePicker(sourceType: .photoLibrary, allowsEditing: true) | |
// Automatically includes both kUTTypeImage and kUTTypeLivePhoto | |
let livePhotoPicker = ImagePicker(sourceType: .photoLibrary, mediaTypes: [.livePhotos]) | |
// 2. Use the picker |
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
// Ispired by http://rasic.info/bindings-generics-swift-and-mvvm/ | |
class Dynamic<T> { | |
typealias Listener = (T) -> Void | |
var listener: Listener? | |
func bind(listener: Listener?) { | |
self.listener = listener | |
} | |
func bindAndFire(listener: Listener?) { |
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
// | |
// ThemeManager.swift | |
// ProjectThemeTest | |
// | |
// Copyright (c) 2017 Abhilash | |
// | |
import UIKit | |
import Foundation |
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 UIKit | |
import PlaygroundSupport | |
// https://gist.github.com/erica/6f13f3043a330359c035e7660f3fe7f5 | |
// Original Video: https://www.youtube.com/watch?v=TTmWUSgNOHk | |
// Video: https://www.youtube.com/watch?v=hmAB3WJOQTU | |
// Video: https://www.youtube.com/watch?v=DWtavuvmKdw (with zoom and fade) | |
// String to animate and its attributes | |
var string = "Hello, playground" | |
let attributes: [String: Any] = [ |
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 <UIKit/UIKit.h> | |
/// This constraint could be toggled between two values (min/max) by `enlarged` flag | |
@interface ToggleConstraint : NSLayoutConstraint | |
/** | |
Max size of the height/width/offset/etc. | |
Think about it as some UI element can change it's size between min and max values. | |
*/ | |
@property (nonatomic, assign) IBInspectable BOOL enlarged; |
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 applicationDidEnterBackground(application: UIApplication) { | |
// Create a pseudo background task to system call applicationWillTerminate when app enter background | |
// Default system will not call applicationWillTerminate when app enter background | |
// applicationWillTerminate only called when user close app in app switcher or some special cases of system | |
bgTask = application.beginBackgroundTaskWithExpirationHandler({ () -> Void in | |
application.endBackgroundTask(self.bgTask) | |
self.bgTask = UIBackgroundTaskInvalid | |
}) | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { () -> Void in |
NewerOlder