Skip to content

Instantly share code, notes, and snippets.

View AbodiDawoud's full-sized avatar
:octocat:

Abodi AbodiDawoud

:octocat:
View GitHub Profile
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, DBGInterfaceStyleOverride) {
DBGInterfaceStyleOverrideNone = 0,
DBGInterfaceStyleOverrideLight,
DBGInterfaceStyleOverrideDark,
};
#ifdef __cplusplus
extern "C" {
import SwiftCompilerPlugin
import SwiftSyntax
import SwiftSyntaxBuilder
import SwiftSyntaxMacros
/// Implementation of `syscall` macro, which takes an Int (the syscall number) and zero or more arguments to the syscall, and returns and Int
/// It expands to include manual `dlsym`, and casting to a C function which has 7 filler arguments so that the syscall arguements are on the stack
public struct SyscallMacro: ExpressionMacro {
public static func expansion(
of node: some FreestandingMacroExpansionSyntax,
@AbodiDawoud
AbodiDawoud / UIBlurEffects.txt
Created November 9, 2025 02:40
Private blur effects on iOS
Style 0: <UIBlurEffect: 0x60000004c860> style=UIBlurEffectStyleExtraLight
Style 1: <UIBlurEffect: 0x60000004c870> style=UIBlurEffectStyleLight
Style 2: <UIBlurEffect: 0x60000004c880> style=UIBlurEffectStyleDark
Style 3: <UIBlurEffect: 0x60000000ed40> style=UIBlurEffectStyleExtraDark
Style 4: <UIBlurEffect: 0x60000000ed50> style=UIBlurEffectStyleRegular
Style 5: <UIBlurEffect: 0x60000000ed60> style=UIBlurEffectStyleProminent
Style 6: <UIBlurEffect: 0x60000004c890> style=UIBlurEffectStyleSystemUltraThinMaterial
Style 7: <UIBlurEffect: 0x60000004c8a0> style=UIBlurEffectStyleSystemThinMaterial
Style 8: <UIBlurEffect: 0x60000004c8b0> style=UIBlurEffectStyleSystemMaterial
Style 9: <UIBlurEffect: 0x60000004c8c0> style=UIBlurEffectStyleSystemThickMaterial
@AbodiDawoud
AbodiDawoud / YouTubeURLSchemes.swift
Last active December 28, 2025 17:45
YouTube url schemes for iOS
import SwiftUI
#Preview {
Form {
Section {
Button("Search on YouTube") {
UIApplication.shared.open(URL(string: "youtube://results?search_query=SwiftUI")!)
}
Button("Search on YouTube V2") {
//
// UIScreen++.swift
// UIScreen++
import SwiftUI
extension UIScreen {
var name: String {
import SwiftUI
import CryptoKit
extension Color {
public static var selectedControlColor: Color {
Color(NSColor.selectedControlColor)
}
public static var controlAccentColor: Color {
Color(NSColor.controlAccentColor)
import SwiftUI
struct JiggleViewModifier: ViewModifier {
let amount: Double
@State private var isJiggling = false
func body(content: Content) -> some View {
content
.rotationEffect(.degrees(isJiggling ? amount : 0))
import SwiftUI
@available(iOS 13.0, *)
public extension SwiftUI.Color {
// MARK: - Hex Code Color
init(hex: String) {
let scanner = Scanner(string: hex)
_ = scanner.scanString("#")
var rgb: UInt64 = 0
@AbodiDawoud
AbodiDawoud / AppStore-Apps.txt
Last active December 21, 2025 01:21
Apple made seed apps
Seed: https://apps.apple.com/us/app/seed/id6449049254
Find My Certification Asst.: https://apps.apple.com/us/app/find-my-certification-asst/id1532296125
Car Keys Test: https://apps.apple.com/us/app/car-keys-tests/id1635860023
MagSafe Certification Asst.: https://apps.apple.com/us/app/magsafe-certification-asst/id1533467908
Accessory Developer Assistant: https://apps.apple.com/us/app/accessory-developer-assistant/id1635862694
@AbodiDawoud
AbodiDawoud / EmphasizedTextStyles.swift
Created January 30, 2025 21:18
Emphasized SwiftUI text styles
import SwiftUI
struct EmphasizedTextStyleDemoView: View {
var body: some View {
Form {
Text("Emphasized Large Title")
.font(Font(UIFont.preferredFont(forTextStyle: .emphasizedLargeTitle)))
Text("Emphasized Title 1")