Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View gravicle's full-sized avatar

Amit Jain gravicle

  • San Francisco
View GitHub Profile
Disconnected from: /Users/gravicle/Library/Developer/CoreSimulator/Devices/67CA6865-8F5A-4040-A0C6-AAF32CC78554/data/Containers/Bundle/Application/14109655-F7D3-4F03-87DD-72B3E11A15AE/CircleMedicalPatient.app/CircleMedicalPatientConnection from: /Users/gravicle/Library/Developer/CoreSimulator/Devices/67CA6865-8F5A-4040-A0C6-AAF32CC78554/data/Containers/Bundle/Application/FF82A656-557B-4F86-8583-9BF4CE74A9AC/CircleMedicalPatient.app/CircleMedicalPatient x86_64 (22)buidRoot: /Users/gravicle/Library/Developer/Xcode/DerivedData/CircleMedicalPatient-gazepgpdyvnfsthbejusiexjjjth/BuildlogDir: /Users/gravicle/Library/Developer/Xcode/DerivedData/CircleMedicalPatient-gazepgpdyvnfsthbejusiexjjjth/Logs/BuildCopying iOSBundleTemplate into project.Migrating project parameters to bundle..Inported setting IPHONEOS_DEPLOYMENT_TARGET = 9.3;Inported setting SDKROOT = iphoneos;Inported setting CLANG_ENABLE_OBJC_ARC = YES;Inported setting CLANG_CXX_LANGUAGE_STANDARD = “gnu++0x”;Inported setting CLANG_CXX_LIBRARY = “libc++”;2017-0
@gravicle
gravicle / RunScript.sh
Last active January 4, 2017 01:41 — forked from pala/RunScript
Show TODO's And FIXME's As Warnings
TAGS="FIXME:|TODO:"
ERRORTAG="ERROR:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" | perl -p -e "s/($ERRORTAG)/ error: \$1/"
@gravicle
gravicle / IBLoadableView.swift
Last active October 17, 2016 19:19
Abstract class allowing UIViews to be programmatically initialized while using IB internally for layout
import UIKit
/// Allows loading view from Nibs named the same as the class.
class IBLoadableView: UIView {
fileprivate var view: UIView!
convenience init() {
self.init(frame: CGRect.zero)
}
Scope Access Access Level
across modules import public
           | subclass | open

within module | import | internal final | subclass | internal within file | use | fileprivate final | subclass | fileprivate within scope | use | private final | subclass | private

We have a few appointments coming up. Can you determine if there are conflicts, and if there are, can you print them out?
2:30 PM → 4:0 PM
11:00 AM → 11:20 AM
12:00 PM → 1:30 PM
9:45 AM → 10:45 AM
12:30 PM → 2:15 PM
4:00 PM → 5:30 PM
9:00 AM → 10:30 AM
4:45 PM → 6:00 PM
@gravicle
gravicle / gist:f2c3cce198153c6b6ef059300113188e
Created July 6, 2016 17:55 — forked from steipete/ios-xcode-device-support.sh
Using Xcode 7.3.1 and iOS 10 devices
// The trick is to copy the DeviceSupport folder from the beta to the stable version.
cp -r /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5261u\) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
// Then restart Xcode. You might need to do that for every beta of iOS 10/Xcode 8.
import Foundation
import RxSwift
protocol OptionalType {
associatedtype Wrapped
var value: Wrapped? { get }
}
extension Optional: OptionalType {
var value: Wrapped? {
extension UIApplication {
static var topViewController: UIViewController? {
var topVC = UIApplication.sharedApplication().keyWindow?.rootViewController
if let tabController = rootTabBarController {
topVC = tabController.selectedViewController
}
while(topVC?.presentedViewController != nil) {
+-------------------------+
| |
| |
| Coordinator |
| |
| |
+-------------------------+