I hereby claim:
- I am dbonates on github.
- I am dbonates (https://keybase.io/dbonates) on keybase.
- I have a public key ASCYYJZRDcLiK9_oS9HF05YlNhnuviNiefeB6tGkub1F8Qo
To claim this, I am signing this object:
| xcrun simctl io booted recordVideo /path/Video.mov |
| extension String { | |
| func isValidEmail() -> Bool { | |
| let emailRegex = "(?:[\\p{L}0-9!#$%\\&'*+/=?\\^_`{|}~-]+(?:\\.[\\p{L}0-9!#$%\\&'*+/=?\\^_`{|}" + | |
| "~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\" + | |
| "x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[\\p{L}0-9](?:[a-" + | |
| "z0-9-]*[\\p{L}0-9])?\\.)+[\\p{L}0-9](?:[\\p{L}0-9-]*[\\p{L}0-9])?|\\[(?:(?:25[0-5" + | |
| "]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-" + | |
| "9][0-9]?|[\\p{L}0-9-]*[\\p{L}0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21" + | |
| "-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])" |
| struct Station: Codable { | |
| let id: Int | |
| let name: String | |
| let logoURL: URL | |
| let thumbnailURL: URL | |
| let cityName: String | |
| let stateName: String | |
| var streamingURL: URL? = nil | |
| } |
| public extension String { | |
| // compares two strings and returns if they should be considered the same as the given string | |
| func meansTheSame(of word: String) -> Bool { | |
| return self.folding(options: .diacriticInsensitive, locale: nil).lowercased() == word.folding(options: .diacriticInsensitive, locale: nil).lowercased() | |
| } | |
| // check if string contains all terms from a given string | |
| func containTerms(from aString: String) -> Bool { | |
| let terms = aString.split(separator: " ").map(String.init) |
| #!/bin/sh | |
| # add and it as a Run Script Phase on Buidl Phases on Xcode! | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| # make sure the output directory exists | |
| mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" |
I hereby claim:
To claim this, I am signing this object:
| /Applications/Install\ macOS\ High\ Sierra\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/HSIERRA --applicationpath /Applications/Install\ macOS\ High\ Sierra\ Beta.app | |
| # See if mongo is in the launch/startup list | |
| launchctl list | grep mongo | |
| # Remove mongodb from the launch/startup | |
| launchctl remove homebrew.mxcl.mongodb | |
| # Kill the mongod process just in case it's running | |
| pkill -f mongod | |
| # Now you can safely remove mongodb using Homebrew |
| import Foundation | |
| extension String { | |
| public func tailString(from offset: Int) -> String { | |
| return offset > -1 ? "" : self.substring( | |
| from: self.index(self.endIndex, | |
| offsetBy: abs(offset) > characters.count ? -characters.count : offset) | |
| ) | |
| } | |
| import Foundation | |
| let voidChar = "░" | |
| let fillChar = "█" | |
| let max = 20 | |
| for i in 0..<max { | |
| let perc = (Float(i)/Float(max))*100 |