Skip to content

Instantly share code, notes, and snippets.

View kielgillard's full-sized avatar

Kiel Gillard kielgillard

View GitHub Profile
@kielgillard
kielgillard / gist:1210230
Created September 11, 2011 22:47
Office of Environment and Heritage (OEH) test data
{
"events": [
{
"attributes": {
"severity": 1
},
"created_at": "2011-09-08",
"feed": "kiel",
"id": "257DB97C-4617-4E3B-A2F4-32E7D9C8AADD",
"lat": -28,
@kielgillard
kielgillard / enumerations in protocols
Last active August 29, 2015 14:02
Why is an enumeration type not allowed in a protocol?
// Playground - noun: a place where people can play
import UIKit
protocol Contract {
//Type not allowed here
enum Response: Int {
case Success = 0
case Failed = 1
@kielgillard
kielgillard / ing apple pay AU terms
Created January 17, 2017 22:43
ING Direct Australia's Terms and Conditions for using Apple Pay in Australia
ING DIRECT
Apple Pay Terms and Conditions
Apple Pay enables you to make contactless payments using your ING DIRECT Visa Debit or Credit Card (ING DIRECT Card) through a compatible Apple device. These Terms and Conditions apply to your use of any ING DIRECT Card with Apple Pay.
In these Terms and Conditions, "we", "us" and "our" mean ING Bank (Australia) Limited ABN 24 000 893 292 AFSL 229823, Australian Credit Licence 229823 (trading as ING DIRECT).
1. Account agreements
@kielgillard
kielgillard / crash 0
Created April 7, 2017 00:01
Starcraft 1.18 beta 1 crashes on startup
Process: StarCraft [77301]
Path: /Applications/StarCraft Public Test/StarCraft.app/Contents/MacOS/StarCraft
Identifier: com.blizzard.Starcraft
Version: 1.18.0.1273 (1.18.0.1273)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: StarCraft [77301]
User ID: 501
Date/Time: 2017-04-06 18:44:46.720 +1000
@kielgillard
kielgillard / reauthenticate.swift
Created May 8, 2020 06:35
A rough and ungeneralised custom publisher/operator for Combine. When the upstream fails with a 401 Unauthorized, subscribe to the reauthenticate publisher and if it completes with success, re-subscribe to the upstream.
//
// ViewController.swift
// Streams
//
// Created by Kiel Gillard on 17/4/20.
// Copyright © 2020 Streams. All rights reserved.
//
import UIKit
import Combine
@kielgillard
kielgillard / 0136-swiftui-animation-pt2.swift
Created March 3, 2021 05:24
0136-swiftui-animation-pt2 + env schedulers
/**
diff --git a/0136-swiftui-animation-pt2/Animations/Animations/AnimationsApp.swift b/0136-swiftui-animation-pt2/Animations/Animations/AnimationsApp.swift
index a649d86..23058ba 100644
--- a/0136-swiftui-animation-pt2/Animations/Animations/AnimationsApp.swift
+++ b/0136-swiftui-animation-pt2/Animations/Animations/AnimationsApp.swift
@@ -5,7 +5,12 @@ struct AnimationsApp: App {
var body: some Scene {
WindowGroup {
// ContentView()
- TCAContentView(store: .init(initialState: .init(), reducer: appReducer, environment: .init()))