This file contains 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
local wezterm = require("wezterm") | |
local config = wezterm.config_builder() | |
local scheme = "terafox" | |
local scheme_def = wezterm.color.get_builtin_schemes()[scheme] | |
config.color_scheme = scheme | |
config.colors = { | |
tab_bar = { | |
background = "none", | |
active_tab = { |
This file contains 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
// In my core data stack | |
let container = NSPersistentCloudKitContainer(name: "DataModel") | |
let storeUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: groupIdentifier)!.appendingPathComponent("DataModel.sqlite") | |
// Enable history tracking and remote notifications | |
guard let description = container.persistentStoreDescriptions.first else { | |
fatalError("###\(#function): Failed to retrieve a persistent store description.") | |
} | |
description.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey) | |
description.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey) |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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
let nextViewController = NextViewController() | |
nextViewController.modalPresentationStyle = .custom | |
nextViewController.modalTransitionStyle = .crossDissolve | |
present(nextViewController, animated: true, completion: nil) |
This file contains 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
/* | |
These functions are neccessary for the page indicator dots to show up. | |
They are optional functions of UIPageViewControllerDataSource, so they do not come up as overrides. | |
*/ | |
func presentationCount(for pageViewController: UIPageViewController) -> Int { | |
return orderedViewControllers.count | |
} | |
func presentationIndex(for pageViewController: UIPageViewController) -> Int { | |
return 0 |
This file contains 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
func configureViews() { | |
let authorLabel = UILabel() | |
authorLabel.defaultStlye() | |
authorLabel.text = "Created by Sam Warnick" | |
let websiteButton = UIButton(type: .system) | |
websiteButton.defaultStlye() | |
websiteButton.setTitle("samwarnick.com", for: .normal) | |
websiteButton.addTarget(self, action: #selector(STNCreditsViewController.didPressWebisteButton), for: .touchUpInside) | |
websiteButton.sizeToFit() |
This file contains 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 UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
window = UIWindow(frame: UIScreen.main.bounds) | |
window?.rootViewController = YourFirstViewController() |
This file contains 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
:root { | |
--lightblue: #65def1; | |
} | |
.nav-link { | |
font-size: 20px; | |
color: #65def1; | |
color: var(--lighblue); | |
} |
This file contains 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
var 😀 = "Hello, World!" | |
print(😀) |
NewerOlder