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 Howl do | |
use GenServer | |
require Logger | |
@type type :: :n | :p | :c | :a | :r | :rc | |
@type scope :: :l | :g | |
@type name :: term | |
@type key :: {type, scope, name} | |
# Client API |
This file has been truncated, but you can view the full file.
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
ZIP,LAT,LNG | |
00601,18.180555, -66.749961 | |
00602,18.361945, -67.175597 | |
00603,18.455183, -67.119887 | |
00606,18.158345, -66.932911 | |
00610,18.295366, -67.125135 | |
00612,18.402253, -66.711397 | |
00616,18.420412, -66.671979 | |
00617,18.445147, -66.559696 | |
00622,17.991245, -67.153993 |
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 | |
]) |
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
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 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
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
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
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
all: build run | |
clean: | |
@vapor clean | |
build: | |
@vapor build | |
run: |