This file contains 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
// | |
// MachVMReadWrite.swift | |
// | |
// Created by Stephan Casas on 4/25/24. | |
// | |
import Foundation; | |
/// Starting at the given address, read the byte values into the given buffer. | |
/// - Parameters: |
This file contains 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
// | |
// NSViewReader.swift | |
// | |
// Created by Stephan Casas on 4/11/24. | |
// | |
import SwiftUI; | |
import AppKit; | |
import Combine; |
This file contains 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
// | |
// NSManagedObject+DynamicBindings.swift | |
// | |
// Created by Stephan Casas on 3/31/24. | |
// | |
import SwiftUI; | |
import CoreData; | |
protocol DynamicBindings: NSManagedObject { } |
This file contains 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
// | |
// DumbHTTPServer.swift | |
// DumbHTTPServer | |
// | |
// Created by Stephan Casas on 3/29/24. | |
// | |
import SwiftUI; | |
import Combine; |
This file contains 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
// | |
// NSApplication+NSResponderDebug.swift | |
// | |
// Created by Stephan Casas on 3/18/24. | |
// | |
import Cocoa; | |
extension NSApplication { | |
This file contains 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
// | |
// CGEventSupervisor+Convenience.swift | |
// | |
// @see: https://github.com/stephancasas/CGEventSupervisor | |
// | |
// @note: This is provided as an extension because it is poorly-structured as a result of | |
// backward-compatibility consideration. There are several ways it can be improved. | |
// | |
// Created by Stephan Casas on 3/18/24. | |
// |
This file contains 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/env osascript -l JavaScript | |
ObjC.bindFunction('malloc', ['void*', ['int']]); | |
ObjC.bindFunction('memset', ['void*', ['void*', 'int', 'int']]); | |
ObjC.bindFunction('listen', ['int', ['int', 'int']]); | |
ObjC.bindFunction('socket', ['int', ['int', 'int', 'int']]); | |
ObjC.bindFunction('accept', ['int', ['int', 'void*', 'void*']]); | |
ObjC.bindFunction('bind', ['int', ['int', 'void*', 'int']]); |
This file contains 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
extension NSView { | |
var debugBorder: NSColor? { | |
set { | |
guard let newValue = newValue else { | |
self.layer?.borderColor = nil; | |
self.layer?.borderWidth = 0; | |
return; | |
} | |
This file contains 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
// | |
// ProcessSerialNumber.swift | |
// | |
// Created by Stephan Casas on 2/28/24. | |
// | |
extension ProcessSerialNumber { | |
/// Create a new `ProcessSerialNumber` using the given process identifier. | |
init?(_ pid: pid_t) { |
This file contains 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
// | |
// EquatableProcess.swift | |
// | |
// Created by Stephan Casas on 3/2/24. | |
// | |
/// A value type which records both the process identifier and the time at which the | |
/// represented instance was dispatched — providing a unique identity for a single | |
/// application instance. | |
struct EquatableProcess: Identifiable, Hashable { |
NewerOlder