Skip to content

Instantly share code, notes, and snippets.

View Saafo's full-sized avatar
🤣
Keep Swift!

Saafo

🤣
Keep Swift!
View GitHub Profile
@Saafo
Saafo / .gitworkflow.zsh
Last active May 27, 2026 03:54
My custom git workflow
#!/usr/bin/env zsh
# Author: @Saafo
# License: MIT
# MARK: rebase workflow
function grc() {( set -e
case "$1" in -h|help|--help)
echo "grc: git fetch && git rebase origin/HEAD --autostash"
return;;
@Saafo
Saafo / FloatDebugMenu.swift
Last active June 15, 2025 20:09
SwiftUI Floating Debug Menu
import SwiftUI
/// Float Debug Menu
///
/// Usage: (It's simple! Just one line!)
///
/// ```swift
/// FloatDebugMenu.registerTrigger("send1", action: { /* your custom logic */})
/// FloatDebugMenu.registerTrigger("send2", action: { /* here */ })
/// ```
@Saafo
Saafo / AnimatedDarkMode.m
Created June 29, 2026 12:07
Animated Dark Mode Switch for macOS 26
#import <AppKit/AppKit.h>
#import <dispatch/dispatch.h>
#import <dlfcn.h>
#import <objc/message.h>
typedef bool (*SLSGetAppearanceThemeLegacyFunc)(void);
typedef void (*SLSSetAppearanceThemeNotifyingFunc)(BOOL, BOOL);
typedef id (*ObjCClassMessageSendFunc)(id, SEL);
typedef void (*ObjCPostChangeMessageSendFunc)(id, SEL, unsigned long long, void (^)(void));