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
| enum Navigation { | |
| case Onboarding | |
| case Conversations | |
| var controller:UIViewController { | |
| switch self { | |
| case Onboarding: | |
| return OnboardingController() | |
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
| post_install do |installer| | |
| installer.pods_project.targets.each do |target| | |
| target.build_configurations.each do |configuration| | |
| configuration.build_settings['SWIFT_VERSION'] = "2.3" | |
| end | |
| end | |
| end |
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
| all: build run | |
| clean: | |
| @vapor clean | |
| build: | |
| @vapor build | |
| run: |
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
| var context = FSEventStreamContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) | |
| let flags = UInt32(kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents) | |
| let callback: FSEventStreamCallback = {(streamRef: ConstFSEventStreamRef, clientCallBackInfo: UnsafeMutableRawPointer?, numEvents: Int, eventPaths: UnsafeMutableRawPointer, eventFlags: UnsafePointer<FSEventStreamEventFlags>?, eventIds: UnsafePointer<FSEventStreamEventId>?) -> Void in | |
| DispatchQueue.main.async { | |
| print("HERE") | |
| } | |
| } | |
| let stream = FSEventStreamCreate(kCFAllocatorDefault, callback, &context, ([testDir] as CFArray), FSEventStreamEventId(kFSEventStreamEventIdSinceNow), 0, flags) |
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 Foundation | |
| import Vapor | |
| import Console | |
| import PathKit | |
| final class SassCommand: Command { | |
| public let id = "sass" | |
| public let help = ["This command compiles all scss files to css"] | |
| public let console: ConsoleProtocol |
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 Vapor | |
| let root = Droplet() | |
| root.get { req in return try root.view.make("welcome", []) } | |
| root.group("v1") { v1 in | |
| v1.group("prefs") { prefs in | |
| let controller = PrefsController() | |
| prefs.get("index", controller.index) |
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
| func removeHTML(_ str:String) -> String { | |
| var html = str | |
| let scanner = NSScanner(string: html) | |
| var text:NSString? = "" | |
| while !scanner.atEnd { | |
| scanner.scanUpToString("<", intoString: nil) | |
| scanner.scanUpToString(">", intoString: &text) | |
| if let replaceText = text as? String { |
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
| from Cozmo import * | |
| triggerActions = {"AcknowledgeFaceInitPause" : cozmo.anim.Triggers.AcknowledgeFaceInitPause, | |
| "AcknowledgeFaceNamed" : cozmo.anim.Triggers.AcknowledgeFaceNamed, | |
| "AcknowledgeFaceUnnamed" : cozmo.anim.Triggers.AcknowledgeFaceUnnamed, | |
| "AcknowledgeObject" : cozmo.anim.Triggers.AcknowledgeObject, | |
| "AskToBeRightedLeft" : cozmo.anim.Triggers.AskToBeRightedLeft, | |
| "AskToBeRightedRight" : cozmo.anim.Triggers.AskToBeRightedRight, | |
| "BlockReact" : cozmo.anim.Triggers.BlockReact, | |
| "BuildPyramidReactToBase" : cozmo.anim.Triggers.BuildPyramidReactToBase, |
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
| func ==(lhs:ErrorType, rhs:ErrorType) -> Bool { | |
| return lhs._domain == rhs._domain | |
| } | |
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
| defmodule MyApp do | |
| use Application | |
| def start(_type, _args) do | |
| import Supervisor.Spec, warn: false | |
| children = [ | |
| Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
| dispatch: dispatch | |
| ]) |