Skip to content

Instantly share code, notes, and snippets.

View BryanJBryce's full-sized avatar
🐐

Bryan Bryce BryanJBryce

🐐
View GitHub Profile
import Foundation
import Actor
import MessageRouter
public final class Core<State, Event, Command> {
public typealias CommandProcessor = (Core<State, Event, Command>, Command) -> Void
public typealias EventHandler = (State, Event) -> CoreUpdate<State, Command>
public let stateChanged = MessageRouter<State>()
@BryanJBryce
BryanJBryce / Readme.md
Last active January 18, 2024 11:46 — forked from adricasti/Readme.md
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Sierra 10.12.5
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
@BryanJBryce
BryanJBryce / MirrorDebugDecscription.swift
Created January 28, 2016 17:59 — forked from mcmurrym/MirrorDebugDecscription.swift
A default protocol implementation for CustomDebugStringConvertible that uses Mirror for introspection. This is meant for debugging only.
public extension CustomDebugStringConvertible {
var debugDescription: String {
return debugDescription()
}
func debugDescription(indentationLevel: Int = 0) -> String {
let indentString = (0..<indentationLevel).reduce("") { tabs, _ in tabs + "\t" }
var s = "\(self.dynamicType)"
@BryanJBryce
BryanJBryce / parsing.swift
Last active August 29, 2015 14:26 — forked from chriseidhof/parsing.swift
JSON Parsing in Swift
// This code accompanies a blog post: http://chris.eidhof.nl/posts/json-parsing-in-swift.html
//
// As of Beta5, the >>= operator is already defined, so I changed it to >>>=
import Foundation
let parsedJSON : [String:AnyObject] = [
"stat": "ok",
"blogs": [