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
func attributedStringWithColor(_ strings: [String], color: UIColor,font : UIFont, characterSpacing: UInt? = nil) -> NSAttributedString { | |
let attributedString = NSMutableAttributedString(string: self) | |
for string in strings { | |
let range = (self as NSString).range(of: string) | |
attributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: color, range: range) | |
attributedString.addAttribute(NSAttributedString.Key.font,value: font, range: range) | |
} | |
guard let characterSpacing = characterSpacing else {return attributedString} |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
private var swtSelected = [String : Bool]() | |
func save() { | |
let preferences = UserDefaults.standard | |
let currentLevelKey = Constants.PREFERENCE_OPTIONS_CHECKED | |
preferences.set(swtSelected, forKey: currentLevelKey) | |
let didSave = preferences.synchronize() | |
if !didSave { | |
debugPrint("don't save") | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<stroke | |
android:width="2dp" | |
android:color="#d9e7f6" /> | |
</shape> | |
</item> |
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
... | |
android { | |
// GET THE DATA OF THE OPERATING SYSTEM WHERE ANDROID STUDIO IS RUN | |
String osName = org.gradle.internal.os.OperatingSystem.current().getName(); | |
String osVersion = org.gradle.internal.os.OperatingSystem.current().getVersion(); | |
signingConfigs { | |
config { |