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
| @propertyWrapper | |
| class Box<T> { | |
| var wrappedValue: T | |
| var projectedValue: Box<T> { | |
| Box(wrappedValue) | |
| } | |
| init(_ value: T) { | |
| self.wrappedValue = value |
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 | |
| import MobileCoreServices.UTCoreTypes | |
| if #available(iOS 14.1, *) { | |
| let input = Bundle.main.url(forResource: "IMG_0037", withExtension: "HEIC")! | |
| let output = FileManager().temporaryDirectory.appendingPathComponent("IMG_0037.GAIN_MAP.BMP") | |
| let source = CGImageSourceCreateWithURL(input as CFURL, nil)! | |
| // urn:com:apple:photo:2020:aux:hdrgainmap | |
| let dataInfo = CGImageSourceCopyAuxiliaryDataInfoAtIndex(source, 0, kCGImageAuxiliaryDataTypeHDRGainMap)! as Dictionary |
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
| - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | |
| NSString *tokenString; | |
| if (@available(iOS 13.0, *)) { | |
| NSUInteger dataLength = deviceToken.length; | |
| if (dataLength == 0) { | |
| return; | |
| } | |
| const unsigned char *dataBuffer = deviceToken.bytes; | |
| NSMutableString *hexString = [NSMutableString stringWithCapacity:(dataLength * 2)]; |
JSC is the JavaScript engine from Apple's JavaScriptCore (WebKit) as a console application that you can use to run script in the terminal.
For more info visit the JSC's webkit wiki page.
Using jsc is simple, the one issue is that Apple keeps changing the location for jsc. To deal with this issue I just create a symbolic link to the binary:
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
| func debounce<T>(delay: TimeInterval, function: @escaping (T) -> Void, complete: @escaping () -> Void = { }) -> (T) -> Void { | |
| let queue = DispatchQueue(label: "Debouncer") | |
| var current: DispatchWorkItem? | |
| return { input in | |
| current?.cancel() | |
| let new = DispatchWorkItem { | |
| function(input) | |
| complete() | |
| } |
📝 企業を調べる時のメモ書きです。
- https://www.wantedly.com/
- https://jobs.forkwell.com/
- https://jp.indeed.com/
- 日本だとあんまり使ってる企業がいないけど、グローバルよりで日本でもやってる面白いものがたまに見つかる
- などの各種求人サイトを見る
- Note: 📝
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
| #!/usr/bin/env sh | |
| set -e | |
| fancy_echo() { | |
| local fmt="$1"; shift | |
| printf "\n$fmt\n" "$@" | |
| } |
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
| [ | |
| {"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/236mwbxbxjfsvns4jan/236/236_hd_avspeechsynthesizer_making_ios_talk.mp4?dl=1", "title": "AVSpeechSynthesizer: Making iOS Talk", "summary": "Speech can enhance the audio experience of your app, whether you are generating spoken feedback for accessibility, or providing critical information beyond simple alerts or notifications. AVSpeechSynthesizer produces synthesized speech from text and allows you to control and monitor the progress of ongoing speech. Learn the ins and outs of AVSpeechSynthesizer and how to add computer-generated speech output to your app."}, | |
| {"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/405bjty1j94taqv8ii/405/405_hd_measuring_performance_using_logging.mp4?dl=1", "title": "Measuring Performance Using Logging", "summary": "Learn how to use signposts and logging to measure performance. Understand how the Points of Interest instrument can be used to examine logged data. Get an introduction into creating and using custo |
NewerOlder