This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Content: View { | |
| @State var isExpanded = false | |
| @State var wifiEnabled = true | |
| @State var spacing: CGFloat = 12 | |
| var body: some View { | |
| VStack(spacing: self.spacing) { | |
| HStack(spacing: self.spacing) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import PlaygroundSupport | |
| struct Desktop: View { | |
| var body: some View { | |
| ZStack { | |
| // Image(uiImage: #imageLiteral(resourceName: "IMG_6281.JPG")) | |
| Color(UIColor.systemBlue) | |
| macOS() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import PlaygroundSupport | |
| // constants | |
| let deviceWidth: CGFloat = 320 | |
| let deviceHeight: CGFloat = 568 | |
| let hasFaceID = true // false for TouchID | |
| struct Device: View { | |
| var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/awk -f | |
| # This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
| # My copy here is written in awk instead of C, has no compelling benefit. | |
| # Public domain. @thingskatedid | |
| # Run as awk -v x=xyz ... or env variables for stuff? | |
| # Assumptions: the data is evenly spaced along the x-axis | |
| # TODO: moving average |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import InterposeKit | |
| import OSLog | |
| /// Hack tow work around Assertion failure in -[NSTouchBarLayout setLeadingWidgetWidth:], NSTouchBarLayout.m:78 | |
| /// This sometimes happens when macOS restores a window. | |
| /// This even runs if there is no OS-level touch bar. | |
| class MacOSWorkarounds { | |
| static let logger = Logger(category: "MacOSWorkarounds") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import Darwin; | |
| @import ObjectiveC; | |
| @import CloudKit; | |
| extern bool GEOConfigGetBOOL(int feature, void* something); | |
| // Hooks feature flags in a resigned Maps.app to return true. | |
| // Usage: | |
| // clang -shared -fmodules -o libmaps_inject.dylib maps_inject.m \ | |
| // "$(xcrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>UnifiedBar</key> | |
| <dict> | |
| <key>DisclosureRequired</key> | |
| <string>ace440ac-b4f6-4b43-aade-02bba1589aef</string> | |
| <key>Enabled</key> | |
| <false/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <!-- not sure which one it is, so set both --> | |
| <key>Ensemble</key> | |
| <dict> | |
| <key>Enabled</key> | |
| <true/> | |
| </dict> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612) | |
| // clang -fmodules -shared -Wall -Os -o libsafariinject.dylib safariinject.m | |
| // | |
| // If SIP off: | |
| // DYLD_INSERT_LIBRARIES=$PWD/libsafariinject.dylib /Applications/Safari.app/Contents/MacOS/Safari | |
| // | |
| // If SIP on, you can demo this by manually removing Safari's code signing signature, but many | |
| // features (eg saved logins) won't be readable by the resigned app: | |
| // cp -a /Applications/Safari.app ./ | |
| // codesign --remove Safari.app/Contents/MacOS/Safari |