Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am paulofaria on github.
  • I am paulofaria (https://keybase.io/paulofaria) on keybase.
  • I have a public key ASA9I3mvYfKYE0nmeOeKiAd6QQFVes_Tf9g5fVLc1F2JkAo

To claim this, I am signing this object:

04cf6f5f20811a3cc36f82de9517ef0f9cf5868e5ae2f26678c241a4ca6ee05b59696835857185f085ef40ea970e515828a8460d4b22d7d1f7dd1c7e9ff2724143
import Foundation
extension String : CodingKey {
public var stringValue: String {
return self
}
public var intValue: Int? {
return Int(self)
}
import Foundation
struct HTTPRequest {
enum Method {
case get
case post
case put
case patch
case delete
do {
let ip = try IP(localAddress: "127.0.0.1", port: 8080)
let serverSocket = try TCPServerSocket(ip: ip)
serverSocket.accept { getClientStream in
do {
let clientStream = try getClientStream()
clientStream.receive(length: Int.max) { getData in
do {
let data = try getData()
public protocol Error: ErrorProtocol {
var status: Status { get }
}
public enum ClientError: Error {
case badRequest
case unauthorized
case paymentRequired
case forbidden
case notFound

Problem

ModuleA

extension String {
    public func capitalized() -> String {
        return "ModuleA"
    }
}
#!/usr/bin/swift
#if os(Linux)
@_exported import Glibc
#else
@_exported import Darwin.C
#endif
public struct Environment {
public subscript(variable: String) -> String? {
func getDateTime() -> (String, String) {
let now = NSDate()
let dayTimePeriodFormatter = NSDateFormatter()
dayTimePeriodFormatter.dateFormat = "E, d MMM yyyy"
let date = dayTimePeriodFormatter.string(from: now)
dayTimePeriodFormatter.dateFormat = "HH:mm:ss Z"
let time = dayTimePeriodFormatter.string(from: now)
protocol A {
static var a: String { get }
}
extension A {
static var a: String {
return "a"
}
}