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 Foundation | |
extension UserDefaults { | |
open func setStruct<T: Codable>(_ value: T?, forKey defaultName: String){ | |
let data = try? JSONEncoder().encode(value) | |
set(data, forKey: defaultName) | |
} | |
open func structData<T>(_ type: T.Type, forKey defaultName: String) -> T? where T : Decodable { | |
guard let encodedData = data(forKey: defaultName) 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
plugins { | |
id 'war' | |
id 'eclipse' | |
} | |
sourceCompatibility = '1.8' | |
targetCompatibility = '1.8' | |
tasks.withType(JavaCompile) { | |
options.encoding = "UTF-8" |
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
... | |
alias sim_reset="echo -ne 'xcode simulator reset'; osascript -e 'tell application \"iOS Simulator\" to quit'; osascript -e 'tell application \"Simulator\" to quit'; xcrun simctl erase all; echo ' [OK]';"; | |
... |