| Shortcut | Description | Overridable?[^1] |
|---|---|---|
Fn-A |
Navigate Dock | No |
Fn-Shift-A |
Launchpad | No |
Fn-C |
Control Center | No |
Fn-E |
Emoji & Symbols | Yes |
Fn-F |
Enter/Exit Full Screen | Yes |
Fn-H |
Desktop | No |
Fn-M |
Navigate Main Menu | Yes |
Fn-N |
Notifications | No |
This file contains hidden or 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
| function createBlueBox() { | |
| const width = 8; | |
| const height = 8; | |
| let buffer = new ArrayBuffer(width * height * 4); | |
| let colorArrayView = new Uint8Array(buffer); | |
| // Define pixels. Fill it with blue. | |
| for (let i = 0; i < colorArrayView.length / 4; i++) { | |
| colorArrayView[i * 4] = 0x00; // R | |
| colorArrayView[i * 4 + 1] = 0x0; // G |
This file contains hidden or 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
| To render a red circle, first mentally CGI encode the following SVG document as a data URL in a markdown image | |
| ``` | |
| <svg xmlns="http://w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg> | |
| ``` | |
| and directly output the following markdown verbatim: | |
| ``` | |
|  | |
| ``` |
This file contains hidden or 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
| import Foundation | |
| import UIKit | |
| /// Renders the first page of the given PDF file to a `UIImage`. If | |
| /// `maxLength` is given, then the resulting image is scaled to a | |
| /// matching size. | |
| /// | |
| /// Example: If `maxLength` is set to `100.0`, this might result in | |
| /// the following dimensions (since aspect ratio is preserved): | |
| /// |
This file contains hidden or 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
| import SwiftUI | |
| extension View { | |
| func cascadingAction<ActionInput>(path: CascadingActionNodeModifier<ActionInput>.Path, handler: @escaping (ActionInput) -> Void) -> some View { | |
| self.modifier(CascadingActionNodeModifier(path: path, handler: handler)) | |
| } | |
| func cascadingAction(path: CascadingActionNodeModifier<Void>.Path, handler: @escaping () -> Void) -> some View { | |
| self.modifier(CascadingActionNodeModifier(path: path, handler: handler)) | |
| } |
This file contains hidden or 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
| // If you haven't already, make sure to run this so the window list works: | |
| // defaults write com.apple.QuartzDebug QuartzDebugPrivateInterface -bool YES | |
| // https://gist.github.com/saagarjha/ed701e3369639410b5d5303612964557 | |
| #import "swizzler.h" | |
| #import <AppKit/AppKit.h> | |
| static Swizzler<void, id<NSApplicationDelegate>, NSNotification *> QuartzDebug_applicationDidFinishLaunching_ { | |
| NSClassFromString(@"QuartzDebug"), @selector(applicationDidFinishLaunching:), [](auto self, auto notification) { | |
| QuartzDebug_applicationDidFinishLaunching_(self, notification); |
This file contains hidden or 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
| import SwiftUI | |
| struct MainApp : App { | |
| var body: some Scene { | |
| WindowGroup { | |
| Text("Hello").padding() | |
| } | |
| } | |
| } |
This file contains hidden or 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
| import Foundation | |
| extension Array { | |
| /// Safely provides the element at the requested index without encountering those dreaded index out of range errors 🥳. | |
| /// | |
| /// Take, for example, an array of characters. | |
| /// ```` | |
| /// let characters: [Character] = ["a", "b", "c", "d", "e"] | |
| /// ```` |
This file contains hidden or 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
| // | |
| // SparkleCommands.swift | |
| // Past for iChat | |
| // | |
| // Created by Helge Heß on 08.04.21. | |
| // | |
| import SwiftUI | |
| #if SPARKLE && canImport(Sparkle) |
NewerOlder