Skip to content

Instantly share code, notes, and snippets.

@jazzychad
jazzychad / metadata.json
Created September 29, 2015 16:00
Barcelona: La Pedrera
{
"title": "Barcelona: La Pedrera",
"visbility": "public",
"visibility": "public"
}
@jazzychad
jazzychad / metadata.json
Last active September 28, 2015 22:24
Supermoon Eclipse at 38,000 ft
{
"title": "Supermoon Eclipse at 38,000 ft",
"visbility": "public",
"visibility": "public"
}
@jazzychad
jazzychad / metadata.json
Last active September 26, 2015 18:09
Sunset at Twin Peaks
{
"title": "Sunset at Twin Peaks",
"visbility": "public",
"visibility": "public"
}
@jazzychad
jazzychad / photoblog.sh
Created September 23, 2015 21:05
Photoblog generator script
# usage: copy a bunch of jpgs into a directory
# run this script inside that directory
DATE=`date "+%Y-%m-%d"`
UUID=`uuidgen`
# use same UUID on subsequent runs of script
if [ -f "UUID" ]; then
UUID=`cat UUID`
else
@jazzychad
jazzychad / metadata.json
Last active September 23, 2015 05:29
First Post: Jules Verne
{
"title": "First Post: Jules Verne",
"visbility": "public",
"visibility": "public"
}
@jazzychad
jazzychad / SimpleJSON.swift
Last active November 8, 2015 16:14
SimpleJSON for Swift 2.0
/*
* _heavily_ inspired by http://www.atimi.com/simple-json-parsing-swift-2/
* and updated for Swift 2.0
*/
import Foundation
public enum SimpleJSON {
case Array([SimpleJSON])
case Dictionary([Swift.String: SimpleJSON])
@jazzychad
jazzychad / metadata.json
Last active March 15, 2022 19:00
Swift models as structs or classes?
{
"title": "Swift models as structs or classes?",
"timestamp": "2015-07-17T20:18:46.000Z",
"visbility": "public",
"visibility": "public"
}
// why does this not compile?
// Book implements BookRenderable
// so why does the compiler complain when Library.books is a [Book] and LibraryRenderable is looking for [BookRenderable] ??
protocol LibraryRenderable {
var address : String? { get }
var books : [BookRenderable]? { get }
}
protocol BookRenderable {
struct EmailAddress {
let address : String
let domain : String
init(address : String, domain : String) {
self.address = address.lowercaseString
self.domain = domain.lowercaseString
}
}
@jazzychad
jazzychad / metadata.json
Last active June 1, 2021 21:44
iPad Multitasking Size Classes
{
"title": "iPad Multitasking Size Classes",
"timestamp": "2015-06-20T21:30:16.000Z",
"visbility": "public",
"visibility": "public"
}