Skip to content

Instantly share code, notes, and snippets.

View khcrysalis's full-sized avatar
🍊

SAMSAM khcrysalis

🍊
View GitHub Profile
@khcrysalis
khcrysalis / CSCommon.h
Last active January 16, 2026 23:34
Simple codesigner using Security.framework
/*
* Copyright (c) 2006-2014 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
@khcrysalis
khcrysalis / ContentView.swift
Created July 14, 2025 02:36
Notification Center Blur (macOS) by pai.pie
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 120)
.fill(.ultraThinMaterial)
.mask(
RoundedRectangle(cornerRadius: 120)
.blur(radius: 40)
@khcrysalis
khcrysalis / OnboardingView.swift
Last active July 14, 2025 02:37
Fancy Onboarding SwiftUI View for iOS
import SwiftUI
// MARK: - View
struct OnboardingView: View {
@AppStorage("Feather.onboarding") private var _onboardingFinished: Bool = false
@State private var _page: Int = 0
private var _pageLimit: Int = 2
// MARK: Body
var body: some View {
@khcrysalis
khcrysalis / onboarding.swift
Last active July 14, 2025 02:37
Apple-style Onboarding Window Setup for macOS
func showOnboarding() {
let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 640, height: 600),
styleMask: [.fullSizeContentView, .nonactivatingPanel],
backing: .buffered,
defer: false
)
// Replace your own view here
let onboardingWindow = NSHostingView(rootView: EmptyView())
@khcrysalis
khcrysalis / SettingsLinkWrapper.swift
Created January 8, 2025 03:37
Wrapper for various ways to access settings in SwiftUI.
{
"name": "example",
"author": "ur_mom#42069",
"theme_color_map": {
"KEYBOARD": ["#000000", "#FFFFFF"],
"BACKGROUND_PRIMARY": ["#000000", "#FFFFFF"],
"BACKGROUND_SECONDARY": ["#000000", "#FFFFFF"],
"BACKGROUND_SECONDARY_ALT": ["#000000", "#FFFFFF"],
"BACKGROUND_TERTIARY": ["#000000", "#FFFFFF"],
"BACKGROUND_ACCENT": ["#000000", "#FFFFFF"],
{
"name": "Toothpaste",
"description": "For someone special.",
"version": "0.2",
"authors": [
{
"name": "flower!",
"id": "836452332387565589"
}
],