
Or by path:

| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme", | |
| "default_line_ending": "unix", | |
| "dictionary": "Packages/Language - English/en_US.dic", | |
| "draw_white_space": "selection", | |
| "ensure_newline_at_eof_on_save": true, | |
| "font_size": 17, | |
| "gpu_window_buffer": false, | |
| "ignored_packages": | |
| [ |
| import Foundation | |
| import UIKit | |
| // Say you have a NSMutableString like "<strikeStartTag>+ 6.99<strikeEndTag>" and need to strike through "+ 6.99". | |
| extension String { | |
| func firstRange(from start: String, to end: String?) -> Range<String.Index>? { | |
| guard let lower = range(of: start)?.upperBound else { return nil } | |
| guard let end = end else { return lower..<self.endIndex } | |
| guard let upper = self[lower...].range(of: end)?.lowerBound else { return nil } |
| import UIKit | |
| public enum ModelName: String { | |
| case simulator | |
| case iPod1, iPod2, iPod3, iPod4, iPod5 | |
| case iPad2, iPad3, iPad4, iPad5, iPad6 | |
| case iPadAir, iPadAir2, iPadAir3 | |
| case iPadMini, iPadMini2, iPadMini3, iPadMini4, iPadMini5 | |
| case iPadPro9_7, iPadPro10_5, iPadPro12_9, iPadPro2_12_9, iPadPro11, iPadPro3_12_9 | |
| case iPhone4, iPhone4S |
| import Foundation | |
| import PlaygroundSupport | |
| /// Async. | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| /// | |
| /// Movie Model Codable | |
| /// | |
| struct MovieModel: Codable { |
| # sudo: auth account password session | |
| auth sufficient pam_tid.so | |
| auth sufficient pam_smartcard.so | |
| auth required pam_opendirectory.so | |
| account required pam_permit.so | |
| password required pam_deny.so | |
| session required pam_permit.so |
| import SystemConfiguration | |
| /// Returns `true` if the device is connected to a network, either WiFi or Cellular (4G, 5G, etc). | |
| /// | |
| /// [source](https://stackoverflow.com/a/39782859/584548) | |
| func isConnectedToNetwork() -> Bool { | |
| var zeroAddress = sockaddr_in( | |
| sin_len: 0, | |
| sin_family: 0, | |
| sin_port: 0, |
| --- | |
| disabled_rules: | |
| # Doesn't play nice with SwiftUI. | |
| # https://github.com/realm/SwiftLint/issues/1801 | |
| - multiple_closures_with_trailing_closure | |
| excluded: | |
| - Carthage | |
| # Variable name should be between 3 and 40 characters long... |
| import SwiftUI | |
| typealias Filter = (CGImage) -> CGImage | |
| func blur(radius: Double) -> Filter { | |
| return { image in | |
| // Do something. | |
| return image | |
| } | |
| } |
| #!/usr/bin/swift | |
| import Foundation | |
| func shell(_ command: String) { | |
| let task = Process() | |
| task.launchPath = "/bin/zsh" | |
| task.arguments = ["-c", command] | |
| let pipe = Pipe() |