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
extension UIView { | |
struct Side: OptionSet { | |
let rawValue: Int | |
static let left = Side(rawValue: 1 << 0) | |
static let right = Side(rawValue: 1 << 1) | |
static let top = Side(rawValue: 1 << 2) | |
static let bottom = Side(rawValue: 1 << 3) | |
} |
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
class TextView: UITextView { | |
override init(frame: CGRect, textContainer: NSTextContainer?) { | |
super.init(frame: frame, textContainer: textContainer) | |
commonInit() | |
} | |
required init?(coder: NSCoder) { | |
super.init(coder: coder) | |
} |
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 CoreLocation | |
struct TimeZoneInfo: Decodable { | |
let location: CLLocation | |
let timeZone: TimeZone | |
enum CodingKeys: String, CodingKey { | |
case latitude | |
case longitude | |
case identifier = "zone" |
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
struct EventStoreNotificationInfo { | |
let changeType: Int | |
let calendarDataChanged: Bool | |
let remindersDataChanged: Bool | |
let changedObjectIDs: [NSObject] | |
let modifiedObjectIdentifiers: Set<String>? // Not included in iOS 16? | |
struct UserInfoKeys { | |
static let changeType = "EKEventStoreChangeTypeUserInfoKey" | |
static let calendarDataChanged = "EKEventStoreCalendarDataChangedUserInfoKey" |
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
# AlfredのWorkflowではPATHを通す処理が必要 | |
# (これをせずに直にフルパス打つ方法もあるがApple Siliconマシンとの互換性問題が生じる) | |
# Cocoapods | |
export PATH=/usr/local/bin:$PATH | |
# Cocoapods(ARM) | |
export PATH=/opt/homebrew/bin:$PATH | |
AIR_PODS_NAME=wAPP | |
# Bluetooth接続 |
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
tell application "System Events" to tell the front menu bar of process "SystemUIServer" | |
tell (first menu bar item whose description is "Siri") | |
perform action "AXPress" | |
end tell | |
end tell | |
delay 1 | |
tell application "System Events" to tell the process "NotificationCenter" | |
set notifyWindows to every window |
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
struct CopyableText: UIViewRepresentable { | |
let text: String | |
init(_ text: String) { | |
self.text = text | |
} | |
func makeUIView(context: Context) -> UILabel { | |
let label = CopyableLabel() | |
label.text = text |
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
lane :testflight_feedback do | |
fastlane_require 'spaceship' | |
Spaceship::Tunes.login | |
Spaceship::Tunes.select_team | |
app = Spaceship::ConnectAPI::App.find(ENV["TEST_APP_BUNDLE"]) | |
buffer = [] | |
feedbacks = app.get_beta_feedback |
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
name: Get TestFlight Feedback | |
on: | |
schedule: | |
- cron: 0 0 * * * # UTC 0:00 | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: |
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
if (navigator.credentials && navigator.credentials.preventSilentAccess) { | |
navigator.credentials.get({ | |
password: true, | |
unmediated: false, | |
federated: { | |
providers: ['https://accounts.google.com'] | |
} | |
}).then((cred) => { | |
if (cred && cred.password) { | |
window.alert(cred.password) |
NewerOlder