Skip to content

Instantly share code, notes, and snippets.

View cfdrake's full-sized avatar

Colin Drake cfdrake

View GitHub Profile
@cfdrake
cfdrake / pure.zsh-theme
Last active April 26, 2017 17:45
A minimally modified kasperisager/zsh-pure
#!/usr/bin/env zsh
# ------------------------------------------------------------------------------
#
# Pure - A minimal and beautiful theme for oh-my-zsh
#
# Based on the custom Zsh-prompt of the same name by Sindre Sorhus. A huge
# thanks goes out to him for designing the fantastic Pure prompt in the first
# place! I'd also like to thank Julien Nicoulaud for his "nicoulaj" theme from
# which I've borrowed both some ideas and some actual code. You can find out
//: Playground - noun: a place where people can play
/// A type which is buildable and appendable from a zero value.
protocol Monoid {
/// Returns the zero value.
static func empty() -> Self
/// Appends one Monoid value to another.
func append(_ m: Self) -> Self
}

Keybase proof

I hereby claim:

  • I am cfdrake on github.
  • I am cfdrake (https://keybase.io/cfdrake) on keybase.
  • I have a public key ASBl8RnKSX2-ovDUTxGysMUBjuGRUDYifnnvq5lukHhRego

To claim this, I am signing this object:

@cfdrake
cfdrake / oop.swift
Created March 22, 2016 00:21
Inventing Objects
//: Inventing Objects: A Playground exploring the creation of a simple object pattern
//
// Demonstrates:
// - Message Passing
// - Encapsulation
// - Composition/Inheritance/Delegation
// - Open Recursion (...in a crummy way...)
// - Encapsulated, mutable state
import Foundation