Skip to content

Instantly share code, notes, and snippets.

View ArchieR7's full-sized avatar
👨‍💻

Archie Chang ArchieR7

👨‍💻
View GitHub Profile
drop.get("/view") { request in
return try drop.view("demoView.html")
}
drop.get("/name", ":name", handler: {
request in
if let name = request.parameters["name"]?.string {
return "Hello \(name)!"
}
return "Error retrieving parameters."
})
drop.get("/") {
request in
return "Hello World!"
}
git_url "這邊放置你剛剛所建立的 git repo url"
type "development"
app_identifier ["這邊放置你在 App IDs 裡頭新建好的 Bundle Ifentifier"]
username "這邊放置你所要來處理 Certificate 相關的帳號名稱"
//
// RxCocoaAsyncSocket.swift
//
// Created by 家齊 on 2017/7/14.
// Copyright © 2017年 張家齊. All rights reserved.
//
import Foundation
import RxSwift
import RxCocoa
import CocoaAsyncSocket
let socket = GCDAsyncSocket(delegate: <#T##GCDAsyncSocketDelegate?#>, delegateQueue: <#T##DispatchQueue?#>)
do {
try socket.connect(toHost: Host, onPort: Port)
} catch {
print(error)
}
// GCDAsyncSocketDelegate
Host github.com-Apple
HostName github.com
User git
IdentityFile ~/.ssh/Archie_Apple
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github
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)")
if a == 1 {
print("a 等於 1")
} else {
print("a 不等於 1")
}
func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController) {
}
func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -> Swift.Void) {
}
func paymentAuthorizationViewControllerWillAuthorizePayment(_ controller: PKPaymentAuthorizationViewController) {