Skip to content

Instantly share code, notes, and snippets.

View cassdeckard's full-sized avatar
🇵🇸
Free Palestine

Cass D cassdeckard

🇵🇸
Free Palestine
View GitHub Profile
@cassdeckard
cassdeckard / lldb_crash.swift
Created August 10, 2016 19:55
lldb crashes when I try to make Dictionary parameter in a closure a "var"
//: Playground - noun: a place where people can play
import Foundation
// OK:
var test: ([Int : Int], Int) -> [Int : Int] = { (x, y) in x }
// CRASH:
//var test2: ([Int : Int], Int) -> [Int : Int] = { (var x, y) in x }
@cassdeckard
cassdeckard / test.html
Created March 25, 2016 11:36
IE Compatibility Mode test page
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>IE Compatibility Test</title>
</head>
<body>
<h1 id="test-h1"></h1>
@cassdeckard
cassdeckard / gist:c18b1f24c7efb23735f2
Created May 11, 2015 21:00
Swift can't decide if [String] is Equatable?
import XCTest
class GenericThing<T: Equatable> {
func foo(t: T) {
NSLog("foo \(t)")
}
}
func genericFunc<T: Equatable>(left: T, right: T) {
NSLog("\(left) == \(right) ?: \(left == right)")