Skip to content

Instantly share code, notes, and snippets.

View oscb's full-sized avatar

Oscar Bazaldua oscb

View GitHub Profile
@joethephish
joethephish / PromptWindowController.swift
Last active July 12, 2025 17:33
Substage's flippy out command bar
import AppKit
import SwiftUI
class PromptWindowController: NSWindowController, NSWindowDelegate {
// Essential properties
private var promptWindowContext: PromptWindowContext
private let finderContext: FinderContext
init() {
@mykolaharmash
mykolaharmash / ColorSlider.swift
Last active May 29, 2025 20:27
Color Slider Component (SwiftUI)
// A Color Slider that is similar to one in
// iOS 18+ when configuring a tinted Home Screen
// Full video-walktrough on building this component: https://youtu.be/VFVyN5hNW24
import SwiftUI
fileprivate let SLIDER_HEIGHT = 34.0
fileprivate let KNOB_DIAMETER = SLIDER_HEIGHT + 4.0
struct ColorSlider: View {
@brennanMKE
brennanMKE / EventEmitter.swift
Last active November 14, 2025 08:49
React Native Event Emitter for RCTEventEmitter in Objective-C and Swift
class EventEmitter
/// Shared Instance.
public static var sharedInstance = EventEmitter()
// ReactNativeEventEmitter is instantiated by React Native with the bridge.
private static var eventEmitter: ReactNativeEventEmitter!
private init() {}