This file contains 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 SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
Text("Hello, World!") | |
} | |
} | |
struct ContentView_Previews: PreviewProvider { | |
static var previews: some View { |
This file contains 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 Foundation | |
typealias IPv4 = UInt32 | |
extension IPv4 { | |
private static let octetCount = Self.bitWidth / UInt8.bitWidth | |
init?(octets: [UInt8]) { | |
guard octets.count == IPv4.octetCount else { return nil } |
This file contains 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
static var localIPAddress: (address: String?, mask: String?) { | |
let wifiInterface = "en0" | |
var address: String? | |
var mask: String? | |
var ifaddr: UnsafeMutablePointer<ifaddrs>? | |
guard getifaddrs(&ifaddr) == 0 else { | |
return (address: address, mask: mask) | |
} |
This file contains 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
#!/bin/bash | |
START_DATE=$(date +"%s") | |
SWIFTLINT="${PODS_ROOT}/SwiftLint/swiftlint" | |
EXIT_CODE=0 | |
# Usage description | |
function usage() { | |
if [ -n "$1" ]; then |