Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael McGuire michaelmcguire

View GitHub Profile
@michaelmcguire
michaelmcguire / FB11765100.swift
Created November 8, 2022 00:24
FB11765100: Crash lldb in Xcode 14.1 Playground
View FB11765100.swift
import SwiftUI
import PlaygroundSupport
/* lldb Crash:
The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticsReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
*/
let imageContent = HStack {
Image(systemName: "ellipsis").resizable().aspectRatio(contentMode: .fit)
}
PlaygroundPage.current.setLiveView(imageContent.frame(width: 500, height: 500))
View keybase.md

Keybase proof

I hereby claim:

  • I am michaelmcguire on github.
  • I am monocularvision (https://keybase.io/monocularvision) on keybase.
  • I have a public key ASBerh7hoJfFbG-pSI1rV9GRG4qazNdsQZ0yqndkIbENkAo

To claim this, I am signing this object:

View Build Swift development docker image
docker build \
-t monocularvision/swift-development:2017-07-28-a \
--build-arg=SWIFT_BRANCH=development \
--build-arg SWIFT_VERSION=swift-DEVELOPMENT-SNAPSHOT-2017-07-28-a \
https://github.com/swiftdocker/docker-swift.git
@michaelmcguire
michaelmcguire / gist:25ae4d84d9bb139495cf
Created June 29, 2015 19:23
Getting device list in Swift using libimobiledevice
View gist:25ae4d84d9bb139495cf
import Foundation
var i: CInt = 0
var device_list: UnsafeMutablePointer<UnsafeMutablePointer<Int8>> = nil
idevice_get_device_list(&device_list, &i)
print("number of devices: \(i)")
let array = Array(UnsafeBufferPointer(start: device_list, count: Int(i)))
@michaelmcguire
michaelmcguire / gist:5fdc7aef84b35699dba4
Last active August 29, 2015 14:07
NSKeyedArchiver breaking a Swift object
View gist:5fdc7aef84b35699dba4
// Crash reproduction
// Xcode 6.1 GM
// Create new project, Single View Application, Language: Swift
// Copy code below into ViewController.swift
import UIKit
class MyClass : NSObject, NSCoding {
var myDictionary = [Int:Int]()