Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Halligon AliSoftware

View GitHub Profile
@sjoerdvisscher
sjoerdvisscher / minimal.swift
Created Jun 28, 2017
Using Decodable to generate a minimal value
View minimal.swift
struct MinimalDecoder : Decoder {
var codingPath = [CodingKey?]()
var userInfo = [CodingUserInfoKey : Any]()
public func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> {
return KeyedDecodingContainer(MinimalKeyedDecodingContainer<Key>(decoder: self))
}
public func unkeyedContainer() throws -> UnkeyedDecodingContainer {
return DecodingContainer(decoder: self)
@DaveWoodCom
DaveWoodCom / fixXcode6OnElCapitan.sh
Last active Dec 6, 2020
Script to fix Xcode 6.x so that it will run on El Capitan
View fixXcode6OnElCapitan.sh
#!/bin/bash
## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/
##
## Permission is hereby granted, free of charge, to any person obtaining a copy of this
## software and associated documentation files (the "Software"), to deal in the Software
## without restriction, including without limitation the rights to use, copy, modify,
## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to the following
## conditions: