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
| extension String { | |
| var components: [String] { | |
| return self.characters.map { String.init($0) } | |
| } | |
| func componentsSeparated( | |
| separator: String.CharacterView.Generator.Element) -> [String] { | |
| return self.characters.split(separator: separator).map(String.init) | |
| } |
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
| #!/usr/bin/env swift | |
| #if os(OSX) | |
| import Darwin | |
| #else | |
| import Glibc | |
| #endif | |
| 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
| static func shell( | |
| _ args: String..., | |
| input: AnyObject? = nil, | |
| errorHandler: AnyObject? = nil, | |
| inDirectory: String? = nil, | |
| waitUntilExit: Bool = true) -> Pipe? | |
| { | |
| let task = Task() | |
| task.launchPath = "/usr/bin/env" | |
| task.arguments = args |
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 RealmSwift | |
| class RealmString: Object, StringLiteralConvertible { | |
| typealias StringLiteralType = String | |
| typealias ExtendedGraphemeClusterLiteralType = StringLiteralType | |
| typealias UnicodeScalarLiteralType = StringLiteralType | |
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
| extension Array { | |
| func repeatInserted(addElement: Element, repeatIndex: Int) -> [Element] { | |
| guard self.count > 0 else { | |
| return [] | |
| } | |
| guard self.count >= repeatIndex else { | |
| return self | |
| } |
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
| // | |
| // SystemMainAction.swift | |
| // SystemMainAction | |
| // | |
| // Created by moaible on 2017/01/16. | |
| // | |
| // | |
| 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 APIKit | |
| import Unbox | |
| // MARK: - Abstract | |
| protocol ResponseParser { | |
| associatedtype ParsedResponse | |
| static func parsedResponse(object: Any) throws -> ParsedResponse |
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
| /* @flow */ | |
| import React from 'react' | |
| import { StickyContainer, Sticky } from 'react-sticky' | |
| import Header from '../../components/header' | |
| import Footer from '../../components/footer' | |
| type Props = { | |
| children: React.Children | |
| } |
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 SwiftTask | |
| protocol RepositoryQuery { | |
| } | |
| protocol Repository { | |
| associatedtype ContentId | |
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
| declare class Headers { | |
| @@iterator(): Iterator<[string, string]>; | |
| constructor(init?: HeadersInit): void; | |
| append(name: string, value: string): void; | |
| delete(name: string): void; | |
| entries(): Iterator<[string, string]>; | |
| get(name: string): string; | |
| getAll(name: string): Array<string>; | |
| has(name: string): boolean; | |
| keys(): Iterator<string>; |
OlderNewer