Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active May 10, 2024 17:04
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 7, 2024 09:05
Swift Concurrency Manifesto
@fikeminkel
fikeminkel / DNSTxtRecord.swift
Created April 26, 2017 20:56
Swift 3.1 DNS TXT record lookup
import dnssd
struct DNSTxtRecord {
typealias DNSLookupHandler = ([String: String]?) -> Void
static func lookup(_ domainName: String, completionHandler: @escaping DNSLookupHandler) {
var mutableCompletionHandler = completionHandler // completionHandler needs to be mutable to be used as inout param
let callback: DNSServiceQueryRecordReply = {
(sdRef, flags, interfaceIndex, errorCode, fullname, rrtype, rrclass, rdlen, rdata, ttl, context) -> Void in