| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
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
| // PerceptionDebug | |
| // | |
| // min iOS target = 15.0 | |
| // ComposableArchitecture version = 1.7.3 | |
| import ComposableArchitecture | |
| import SwiftUI | |
| @main | |
| struct PerceptionDebugApp: App { |
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 UIKit | |
| extension UILabel { | |
| func shrinkFontSizeToFit(minimumFontSize: CGFloat? = nil, additionalAttributes: [NSAttributedString.Key: Any] = [:]) { | |
| guard self.bounds.size != .zero, let unwrappedText = self.text, let longestWord = String.findLongestWordByWidth(in: unwrappedText) else { | |
| return | |
| } | |
| var attributes = self.currentAttributes().merging(additionalAttributes, uniquingKeysWith: { _, new in new }) |
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
| static int secondsRemainingUntilRefreshTime() { | |
| final next = nextRefreshTime(DateTime.now(), 30); | |
| return next.difference(DateTime.now()).inSeconds; | |
| } | |
| static DateTime lastRefreshTime(DateTime date, int intervalSeconds) { | |
| final epochSeconds = date.millisecondsSinceEpoch ~/ 1000; | |
| final lastRefreshEpochSeconds = epochSeconds - epochSeconds.remainder(intervalSeconds); | |
| return DateTime.fromMillisecondsSinceEpoch(lastRefreshEpochSeconds * 1000); | |
| } |
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
| var jsonData = JSON.parse(responseBody); | |
| postman.setEnvironmentVariable("access_token", jsonData.access_token); | |
| postman.setEnvironmentVariable("refresh_token", jsonData.refresh_token); |