Skip to content

Instantly share code, notes, and snippets.

@seanwoodward
seanwoodward / alignment-guides-tool.swift
Last active March 10, 2025 05:01 — forked from swiftui-lab/alignment-guides-tool.swift
A few updates to such a great example
// The SwiftUI Lab
// Website: https://swiftui-lab.com
// Article: https://swiftui-lab.com/alignment-guides
import SwiftUI
import Observation
extension EnvironmentValues {
@Entry var alignmentModel: Model = Model()
}
@seanwoodward
seanwoodward / uuid.sh
Created November 3, 2023 10:15 — forked from ultim8k/uuid.sh
Generate UUID in BASH/ZSH
### Source: https://coderwall.com/p/t_sz3q/generate-uuid-at-shell-prompt
# alias uuid="python -c 'import sys,uuid; sys.stdout.write(str(uuid.uuid4()))' | pbcopy && pbpaste && echo"
alias uuid="uuidgen | tr -d '\n' | tr '[:upper:]' '[:lower:]' | pbcopy && pbpaste && echo"
@seanwoodward
seanwoodward / custom-shortcuts.txt
Last active October 15, 2021 16:40 — forked from CodeSlicing/custom-shortcuts.txt
Dictionary entries for CodeSlicing episode on custom shortcuts
<key>User Defined</key>
<dict>
<key>Insert New Line Above Current Line</key>
<string>moveUp:, moveToEndOfParagraph:, insertParagraphSeparator:</string>
<key>Insert New Line Below Currnt Line</key>
<string>moveToEndOfParagraph:, insertParagraphSeparator:</string>
<key>Duplicate Current Line Down</key>
<string>selectParagraph:, delete:, yank:, moveToBeginningOfParagraph:, yank:, moveUp:, moveToEndOfParagraph:</string>
</dict>
@seanwoodward
seanwoodward / PersistentContainer.swift
Created February 14, 2017 14:15 — forked from zwaldowski/PersistentContainer.swift
NSPersistentContainer backport to iOS 7 with Swift 3
import CoreData
@objc(_PersistentStoreDescription) private protocol AnyPersistentStoreDescription: NSObjectProtocol, NSCopying {
var type: String { get set }
var configuration: String? { get set }
@objc(URL) var url: URL? { get set }
var options: [String : NSObject] { get }
func setOption(_ option: NSObject?, forKey key: String)