One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#!/bin/bash | |
#Path to swiftlint | |
SWIFT_LINT=/usr/local/bin/swiftlint | |
#if $SWIFT_LINT >/dev/null 2>&1; then | |
if [[ -e "${SWIFT_LINT}" ]]; then | |
count=0 | |
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do | |
export SCRIPT_INPUT_FILE_$count=$file_path |
function prompt_wikimatze_precmd { | |
git-info | |
} | |
function prompt_wikimatze_setup { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS | |
prompt_opts=(cr percent subst) | |
# Load required functions. |
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes. | |
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes. | |
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum. | |
enum HTTPStatusCode: Int, Error { | |
/// The response class representation of status codes, these get grouped by their first digit. | |
enum ResponseType { | |
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. | |
case informational |
disabled_rules: # rule identifiers to exclude from running | |
- colon | |
- comma | |
- control_statement | |
opt_in_rules: # some rules are only opt-in | |
- empty_count | |
# Find all the available rules by running: | |
# swiftlint rules | |
included: # paths to include during linting. `--path` is ignored if present. | |
- Source |
import AVFoundation | |
var audioPlayer: AVAudioPlayer? | |
enum AudioLoader { | |
case fromResource(URL) | |
case fromAsset(NSDataAsset) | |
} | |
enum AudioLoaderError: Error { | |
case resourceNotFound |
import Foundation | |
import UIKit | |
import WebKit | |
class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate { | |
var webView: WKWebView! | |
var activityIndicator: UIActivityIndicatorView! | |
@IBOutlet var webViewContainer: UIView! | |
import Foundation | |
protocol JSONEncodable: Encodable { } | |
extension JSONEncodable { | |
func toJSON() throws -> String? { | |
try String(data: JSONEncoder().encode(self), encoding: .utf8) | |
} | |
} |
struct Contact: Decodable, CustomStringConvertible { | |
var id: String | |
@NestedKey | |
var firstname: String | |
@NestedKey | |
var lastname: String | |
@NestedKey | |
var address: String | |
enum CodingKeys: String, NestableCodingKey { |