Instead of checks like:
if (value === null) {
throw new Error("missing value")
}
doSomethingThatNeedsValue(value)| import SwiftUI | |
| @main | |
| struct MenuBarApp: App { | |
| @NSApplicationDelegateAdaptor(StatusBarDelegate.self) var appDelegate | |
| var body: some Scene { | |
| WindowGroup { | |
| ContentView() |
| #!/bin/bash | |
| # Checkout master branch | |
| git checkout master | |
| # Rename "master" to "main" | |
| git branch -m master main | |
| # Unset the current upstream branch | |
| git branch --unset-upstream |
| /** | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2013 Thom Seddon | |
| * Copyright (c) 2010 Google | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| #target photoshop | |
| // $.level = 2; | |
| /* | |
| * Script by Tomek Cejner (tomek (at) japko dot info) | |
| * based on work of Damien van Holten: | |
| * http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/ | |
| * | |
| * My version adds support of nested layer groups, | |
| * and exports single layers in addition to groups. |