Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 1KofoK9G5oKdDDhGoy9XciDW5yspELLCCR https://explorer.blockstack.org/address/1KofoK9G5oKdDDhGoy9XciDW5yspELLCCR
@alonecuzzo
alonecuzzo / errors.swift
Created January 31, 2017 21:10
Notes from Errors chat
//let's talk about the different error approaches in swift
//1. optionals
//2. throw/catch
//3. Result
enum Result<A> {
case failure(Error)
case success(A)
}
//
// ViewController.swift
// Brews
//
// Created by Jabari Bell on 8/28/16.
// Copyright © 2016 codemitten. All rights reserved.
//
import UIKit
import Alamofire

State of things: The story functionally works. There is an issue IOS-364 that was created as a result of a conversation on IOS-125 and findings by Stephanie. Those details are on the referenced stories in the Stories of Interest section.

###Stories of Interest

  1. https://paperless.atlassian.net/browse/IOS-125 - main story
  2. https://paperless.atlassian.net/browse/IOS-364 - currently blocking the main story. There's a usability issue that Corey suggested a solution for. He made the comment on the IOS-125 story. IOS-364 is an investigation into changing the settings panel. We'll also need design direction.

###Code

#hello test

/**
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
*/
import UIKit
// Dealing with having to override init(coder:)
@alonecuzzo
alonecuzzo / stringArrayExtensions.swift
Created March 2, 2016 23:05
Some notes for sals cr
var str = "Hello, playground"
protocol TestProtocol {
typealias T
}
protocol AnotherProtocol {}
extension TestProtocol where Self.T == String {}
//convert to ruby
//: Playground - noun: a place where people can play
import UIKit
let result = [1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14, 19, 18, 17, 12, 13]
enum Direction {
case Right, Left, Up, Down
@alonecuzzo
alonecuzzo / ithunk.swift
Created February 2, 2016 20:14
Thunk Presentation
import UIKit
//POP is great, but there are some gotchas when dealing with protocols that have a Self requirement.
// Self
protocol OwlType {
func hootWithOwlType(owl: Self)
}
class GreatHornedOwl: OwlType {