#Every Single Option Under The Sun
- optimization level options
- automatic crashing options
- debug info options
- swift internal options
- swift debug/development internal options
- linker-specific options
- mode options
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |
| import android.text.TextUtils; | |
| import io.realm.Case; | |
| import io.realm.Realm; | |
| import io.realm.RealmObject; | |
| import io.realm.RealmResults; | |
| public class RealmFullTextSearch { | |
| public static <T extends RealmObject> RealmResults<T> search(Realm realm, Class<T> modelClass, String query, String fieldName, boolean partialSearch){ |
| import Foundation | |
| import XCPlayground | |
| XCPlaygroundPage.currentPage.needsIndefiniteExecution = true | |
| extension NSData { | |
| func castToCPointer<T>() -> T { | |
| let mem = UnsafeMutablePointer<T>.alloc(sizeof(T.Type)) | |
| self.getBytes(mem, length: sizeof(T.Type)) | |
| return mem.move() |
| import UIKit | |
| extension UIImage { | |
| // colorize image with given tint color | |
| // this is similar to Photoshop's "Color" layer blend mode | |
| // this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved | |
| // white will stay white and black will stay black as the lightness of the image is preserved | |
| func tint(tintColor: UIColor) -> UIImage { | |
| xattr -d com.apple.quarantine /path/to/app/myMacApp.app |
| // | |
| // ViewController.swift | |
| // KeyboardTest | |
| // | |
| // Created by Adam Śliwakowski on 01.12.2015. | |
| // Copyright © 2015 Adam Śliwakowski. All rights reserved. | |
| // | |
| import UIKit | |
| typealias AnimationClosure = (() -> Void) |
| // Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1 | |
| // Author: Timo Wälisch <[email protected]> | |
| import UIKit | |
| import RealmSwift | |
| import ObjectMapper | |
| import SwiftyJSON | |
| class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType { | |
| typealias Object = List<T> |
| #!/usr/bin/perl | |
| # This filter changes all words to Title Caps, and attempts to be clever | |
| # about *un*capitalizing small words like a/an/the in the input. | |
| # | |
| # The list of "small words" which are not capped comes from | |
| # the New York Times Manual of Style, plus 'vs' and 'v'. | |
| # | |
| # 10 May 2008 | |
| # Original version by John Gruber: |
#Every Single Option Under The Sun