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
/// Represents parts of time | |
struct TimeParts: CustomStringConvertible { | |
var seconds = 0 | |
var minutes = 0 | |
/// The string representation of the time parts (ex: 07:37) | |
var description: String { | |
return NSString(format: "%02d:%02d", minutes, seconds) as String | |
} | |
} |
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
// | |
// NetworkFetcher.swift | |
// | |
// Created by C. Bess on 8/7/16. | |
// Pulled from original NetworkFetcher (cleaned up and updated) | |
import Haneke | |
public class NetworkFetcher<T: DataConvertible>: Fetcher<T> { | |
let URL: NSURL |
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 List { | |
/// Return a new array from the List elements | |
func newArray() -> [T] { | |
var items = [T]() | |
for item in self { | |
items.append(item) | |
} | |
return items | |
} |
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 | |
/// Represents the Log facilities | |
struct Log { | |
/// Prints in debug only | |
static func debug(_ msg: String, line: Int = #line, fileName: String = #file, funcName: String = #function) { | |
#if DEBUG | |
let fname = (fileName as NSString).lastPathComponent | |
print("[\(fname) \(funcName):\(line)]", msg) | |
#endif |
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
// | |
// AppNotify.swift | |
// | |
// Created by Christopher Bess on 6/30/15. | |
// MIT License | |
// | |
import Foundation | |
/// Represents the app notification. |
Provides links to select Christian and biblical resources.
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 | |
# tested on debian 6.x | |
NODE_ENV="production" | |
# the name for the pid and the log file, should be unique for the environment | |
FNAME="script-name" | |
APP_DIR="/var/webapps/example.com/src/nodejs" | |
NODE_APP="server.js" | |
PORT="7707" |
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
var goodResult = ... | |
switch goodResult { | |
case let .Success(valueHere): | |
print("\(valueHere)") | |
default: | |
break | |
} | |
func myFunc() { |