Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am chrisamanse on github.
  • I am chrisamanse (https://keybase.io/chrisamanse) on keybase.
  • I have a public key whose fingerprint is 4FF9 D1B2 11A0 F4E8 55D7 8967 E590 F793 FD03 6322

To claim this, I am signing this object:

@chrisamanse
chrisamanse / UsbongKit.swift
Created April 14, 2016 14:10
UsbongKit Refactor Concept
import Foundation
// Determines what file type (currently .utree)
public protocol UsbongTreeStoreType {
init(url: NSURL)
}
// Provides methods for parsing file
public class UsbongUTreeStoreType {
let url: NSURL
@chrisamanse
chrisamanse / Fastfile
Created January 24, 2016 13:08
Usual Fastfile
# Customise this file, documentation can be found here:
# https://github.com/KrauseFx/fastlane/tree/master/docs
# All available actions: https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# By default, fastlane will send which actions are used
# No personal data is shared, more information on https://github.com/fastlane/enhancer
@chrisamanse
chrisamanse / DefaultImplementations.swift
Last active January 19, 2016 11:59
Providing default implentations in Swift using protocol extensions
class Person {
var name = ""
}
protocol CanRun {
func run()
}
extension CanRun {
func run() {
print("Running...")
@chrisamanse
chrisamanse / Module.swift
Last active December 29, 2015 11:06
Modules for displaying modular views in sequences
import UIKit
// MARK: - Module
// Dummy protocol where all modules should conform too
public protocol Module {}
// MARK: - OptionsTypeModule
// Protocol for list type
public protocol OptionsTypeModule: Module {
var options: [String] { get set }
@chrisamanse
chrisamanse / Nodes.swift
Last active December 23, 2015 08:13
Planned code architecture for UsbongKit
import UIKit
// MARK: - Modules
// Dummy protocol where all modules should conform too
protocol Module {}
struct TextModule: Module {
var text: String = ""
}
@chrisamanse
chrisamanse / 0008-conform-nsdate-to-comparable.md
Created December 6, 2015 00:46
Swift Evolution Proposal Draft: Conforming NSDate to Comparable

Conform NSDate to Comparable

Introduction

Conform NSDate to the Comparable protocol so that developers could simply use comparison operators on NSDates instead of using compare(_:) -> NSComparisonResult method.