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
drop.get("/view") { request in | |
return try drop.view("demoView.html") | |
} |
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
drop.get("/name", ":name", handler: { | |
request in | |
if let name = request.parameters["name"]?.string { | |
return "Hello \(name)!" | |
} | |
return "Error retrieving parameters." | |
}) |
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
drop.get("/") { | |
request in | |
return "Hello World!" | |
} |
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
git_url "這邊放置你剛剛所建立的 git repo url" | |
type "development" | |
app_identifier ["這邊放置你在 App IDs 裡頭新建好的 Bundle Ifentifier"] | |
username "這邊放置你所要來處理 Certificate 相關的帳號名稱" |
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
// | |
// RxCocoaAsyncSocket.swift | |
// | |
// Created by 家齊 on 2017/7/14. | |
// Copyright © 2017年 張家齊. All rights reserved. | |
// | |
import Foundation | |
import RxSwift | |
import RxCocoa |
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
import CocoaAsyncSocket | |
let socket = GCDAsyncSocket(delegate: <#T##GCDAsyncSocketDelegate?#>, delegateQueue: <#T##DispatchQueue?#>) | |
do { | |
try socket.connect(toHost: Host, onPort: Port) | |
} catch { | |
print(error) | |
} | |
// GCDAsyncSocketDelegate |
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
Host github.com-Apple | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/Archie_Apple | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/github |
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
public func ALogDebug(_ string: Any, file: String = #file, line: Int = #line) { | |
print("📒 \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)") | |
} | |
public func ALogWarn(_ string: Any, file: String = #file, line: Int = #line) { | |
print("⚠️ \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)") | |
} | |
public func ALogInfo(_ string: Any, file: String = #file, line: Int = #line) { | |
print("ℹ️ \(file.components(separatedBy: "/").last ?? "")[\(line)]: \(string)") |
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
if a == 1 { | |
print("a 等於 1") | |
} else { | |
print("a 不等於 1") | |
} |