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
| struct SearchBar: UIViewRepresentable { | |
| let placeholder: String | |
| @Binding var text: String | |
| func makeCoordinator() -> SearchBarCordinator { | |
| SearchBarCordinator(text: $text) | |
| } | |
| func makeUIView(context: Context) -> some UIView { | |
| let searchBar = UISearchBar() |
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
| let calendarName = 'Peakon' | |
| let sort = function(a, b) { | |
| let aStartDate = Date.parse(a.startDate) | |
| let bStartDate = Date.parse(b.startDate) | |
| let now = new Date().getTime() | |
| return Math.abs(aStartDate - now) > Math.abs(bStartDate - now) | |
| } | |
| let calendar = await Calendar.forEventsByTitle(calendarName) |
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
| class Usbmuxd < Formula | |
| desc "USB multiplexor daemon for iPhone and iPod Touch devices" | |
| homepage "http://www.libimobiledevice.org/" | |
| revision 1 | |
| stable do | |
| url "http://www.libimobiledevice.org/downloads/libusbmuxd-1.0.10.tar.bz2" | |
| sha256 "1aa21391265d2284ac3ccb7cf278126d10d354878589905b35e8102104fec9f2" | |
| # Backport of upstream security fix for CVE-2016-5104. |
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
| class Libimobiledevice < Formula | |
| desc "Library to communicate with iOS devices natively" | |
| homepage "http://www.libimobiledevice.org/" | |
| url "http://www.libimobiledevice.org/downloads/libimobiledevice-1.2.0.tar.bz2" | |
| sha256 "786b0de0875053bf61b5531a86ae8119e320edab724fc62fe2150cc931f11037" | |
| revision 2 | |
| bottle do | |
| cellar :any | |
| sha256 "7440711e4b0b3c52a1b543b770b18de751a362086419ded9310f55fe104f546f" => :sierra |
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 ruby | |
| url = ARGV[0] | |
| system('wget -nH -r -np -k -P app.app ' + url + ' 2&>1 >/dev/null') | |
| system('xcrun simctl install booted app.app 2&>1 >/dev/null') | |
| system('rm -rf app.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
| private class ImageView : UIImageView { | |
| private class Layer: CALayer { | |
| override func addSublayer(layer: CALayer) { | |
| let configuration = layer.valueForKey("_configuration") | |
| let cornerRadiusKey = "_cornerRadius" | |
| if ((configuration?.respondsToSelector(NSSelectorFromString(cornerRadiusKey))) != nil) { | |
| configuration?.setValue(25, forKey: cornerRadiusKey) | |
| } | |
| super.addSublayer(layer) | |
| } |