- node
- core - 0.3
- swift
- tls - 0.4
- sqlite-driver
- path-indexable - 0.3
- polymorphic - 0.3
- dashboard-example
- website
- postgresql-provider
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
#!/usr/bin/env swift | |
#if os(OSX) | |
import Darwin | |
#else | |
import Glibc | |
#endif | |
import Foundation |
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
// http://stackoverflow.com/a/33729691/2611971 | |
public class FoundationServer { | |
public static func listen(port: Int) { | |
let sock_fd = socket(AF_INET, SOCK_STREAM, 0); | |
if sock_fd == -1 { | |
perror("Failure: creating socket") | |
exit(EXIT_FAILURE) | |
} | |
var sock_opt_on = Int32(1) |
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
[queue addOperationWithBlock:^{ | |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
NSURLSession *session = [NSURLSession sharedSession]; // or create your own session with your own NSURLSessionConfiguration | |
NSURLSessionTask *task = [session dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { | |
if (data) { | |
// do whatever you want with the data here | |
} else { | |
NSLog(@"error = %@", error); |
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
public class Queue { | |
private var strand: Strand! = nil | |
private var queue: [Strand.Closure] = [] | |
private let lock = Lock() | |
public init(_ operation: Strand.Closure? = nil) throws { | |
if let operation = operation { queue.append(operation) } | |
strand = try Strand { [weak self] in | |
while let welf = self { |
Compile CLibreSSL posix_win.c
Compile CLibreSSL v3_ia5.c
Compile CLibreSSL v3_bcons.c
Compile CLibreSSL sha1_one.c
Compile CLibreSSL ncbc_enc.c
Compile CLibreSSL bs_ber.c
Compile CLibreSSL ocsp_ext.c
Compile CLibreSSL d1_enc.c
Compile CLibreSSL v3_int.c
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE
const char *swift_EnumCaseName(OpaqueValue *value, const Metadata *type) {
// Build a magic mirror. Unconditionally destroy the value at the end.
const Metadata *mirrorType;
const OpaqueValue *cMirrorValue;
std::tie(mirrorType, cMirrorValue) = unwrapExistential(type, value);