Skip to content

Instantly share code, notes, and snippets.

View katiesmillie's full-sized avatar

Katie Smillie katiesmillie

View GitHub Profile
@martinheld
martinheld / GraphQL introspection query via curl.md
Last active April 16, 2024 16:26
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
import Foundation
/**
Decode an array of objects while simply omitting any nested objects that themselves fail to be decoded.
Inspired by https://stackoverflow.com/a/46369152/503916
*/
struct SafeDecodableArray<T: Decodable>: Decodable {
/*
An intermediate type that always succeeds at being decoded. Necessary because when iterating the
@chriswebb09
chriswebb09 / APIClient.swift
Created April 18, 2017 04:02
Monitoring Downloads
import UIKit
typealias JSON = [String: Any]
final class iTunesAPIClient: NSObject {
var activeDownloads: [String: Download]?
weak var defaultSession: URLSession? = URLSession(configuration: .default)
// MARK: - Main session used
@khanlou
khanlou / Fonts.swift
Created October 6, 2016 21:10
Print all fonts in Swift 3
UIFont.familyNames.forEach({ familyName in
let fontNames = UIFont.fontNames(forFamilyName: familyName)
print(familyName, fontNames)
})
anonymous
anonymous / config.json
Created January 26, 2015 13:05
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#4F5664, 6.5%)",
"@brand-success": "#FFC286",