Skip to content

Instantly share code, notes, and snippets.

View alexkaessner's full-sized avatar

Alexander Käßner alexkaessner

View GitHub Profile
@martinhoeller
martinhoeller / NSColor+Values.swift
Last active April 8, 2024 08:45
NSColor Catalog Colors
import Cocoa
import Foundation
var colors: [NSColor] = [.labelColor, .secondaryLabelColor, .tertiaryLabelColor, .quaternaryLabelColor, .textColor, .placeholderTextColor, .selectedTextColor, .textBackgroundColor, .selectedTextBackgroundColor, .keyboardFocusIndicatorColor, .unemphasizedSelectedTextColor, .unemphasizedSelectedTextBackgroundColor, .linkColor, .separatorColor, .selectedContentBackgroundColor, .unemphasizedSelectedContentBackgroundColor, .selectedMenuItemTextColor, .gridColor, .headerTextColor, .controlAccentColor, .controlColor, .controlBackgroundColor, .controlTextColor, .disabledControlTextColor, .selectedControlColor, .selectedControlTextColor, .alternateSelectedControlTextColor, .windowBackgroundColor, .windowFrameTextColor, .underPageBackgroundColor, .findHighlightColor, .highlightColor, .shadowColor
]
for color in colors {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
@ghermanowski
ghermanowski / CaptureTextFromCamera.md
Created June 9, 2022 17:32
How to Capture Text from the Camera in SwiftUI 3

How to Capture Text from the Camera in SwiftUI 3

To create a button for this purpose, you need a class that adopts the protocols UIResponder and UIKeyInput. The required variable hasText and method deleteBackward are not used so you can just ignore them.

class ScanTextResponder: UIResponder, UIKeyInput {
	init(title: Binding<String>) {
		_title = title
	}
@merlinmann
merlinmann / wisdom.md
Last active April 17, 2024 21:52
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.