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
| Shader "Custom/BasicGradient" | |
| { | |
| Properties | |
| { | |
| _TopColor ("Top Color", Color) = (1, 1, 1, 1) | |
| _BottomColor ("Bottom Color", Color) = (1, 1, 1, 1) | |
| _RampTex ("Ramp Texture", 2D) = "white" {} | |
| } | |
| SubShader |
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
| #!/bin/sh | |
| ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools" | |
| PACKAGE_NAME="com.mobiacube.elbotola.debug" | |
| DB_NAME="default.realm" | |
| DESTINATION_PATH="/Users/Medyo/Desktop/" | |
| NOT_PRESENT="List of devices attached" | |
| ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
| if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
| echo "Make sure a device is connected" | |
| else |
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 Keycode { | |
| // Layout-independent Keys | |
| // eg.These key codes are always the same key on all layouts. | |
| static let returnKey : UInt16 = 0x24 | |
| static let enter : UInt16 = 0x4C | |
| static let tab : UInt16 = 0x30 | |
| static let space : UInt16 = 0x31 | |
| static let delete : UInt16 = 0x33 | |
| static let escape : UInt16 = 0x35 |
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
| #if DEBUG | |
| extension UIWindow { | |
| class var key: UIWindow { | |
| let selector: Selector = NSSelectorFromString("keyWindow") | |
| let result = UIWindow.perform(selector) | |
| return result?.takeUnretainedValue() as! UIWindow | |
| } | |
| } |
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
| fun Any?.toIndentString(): String { | |
| val notFancy = toString() | |
| return buildString(notFancy.length) { | |
| var indent = 0 | |
| fun StringBuilder.line() { | |
| appendln() | |
| repeat(2 * indent) { append(' ') } | |
| } |
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 | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
| let window = UIWindow(frame: UIScreen.main.bounds) |
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 AppKit | |
| private func isTestRun() -> Bool { | |
| return NSClassFromString("XCTestCase") != nil | |
| } | |
| if isTestRun() { | |
| // This skipping setting up the app delegate | |
| NSApplication.shared.run() | |
| } else { |
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
| extension UIHostingController { | |
| convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
| self.init(rootView: rootView) | |
| if ignoreSafeArea { | |
| disableSafeArea() | |
| } | |
| } | |
| func disableSafeArea() { |
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
| .onDrop(of: [.fileURL], isTargeted: nil) { providers in | |
| if let loadableProvider = providers.first(where: { $0.canLoadObject(ofClass: URL.self) }) { | |
| _ = loadableProvider.loadObject(ofClass: URL.self) { fileURL, _ in | |
| if let fileURL = fileURL, fileURL.pathExtension.lowercased() == "zip" { | |
| self.logger.info("Dropped \(fileURL.path)") | |
| DispatchQueue.main.async { | |
| importer.open(zipArchiveURL: fileURL) | |
| } | |
| } | |
| } |