(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#include <node.h> | |
#include "Test.h" | |
namespace demo { | |
using v8::FunctionCallbackInfo; | |
using v8::Isolate; | |
using v8::Local; | |
using v8::Object; |
#!/bin/bash | |
set -x | |
CURRENT=`pwd` | |
__pr="--print-path" | |
__name="xcode-select" | |
DEVELOPER=`${__name} ${__pr}` | |
GMP_VERSION="5.1.3" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
When you get an error code in with the domain kCFStreamErrorDomainSSL, you can generally find the error codes in SecureTransport.h which is in /System/Library/Frameworks/Security.framework. Here are the error codes: | |
enum { | |
errSSLProtocol = -9800, /* SSL protocol error */ | |
errSSLNegotiation = -9801, /* Cipher Suite negotiation failure */ | |
errSSLFatalAlert = -9802, /* Fatal alert */ | |
errSSLWouldBlock = -9803, /* I/O would block (not fatal) */ | |
errSSLSessionNotFound = -9804, /* attempt to restore an unknown session */ | |
errSSLClosedGraceful = -9805, /* connection closed gracefully */ | |
errSSLClosedAbort = -9806, /* connection closed via error */ |
extension String { | |
func size(withAttributes attrs: [String:AnyObject], constrainedTo box: NSSize) -> NSRect { | |
let storage = NSTextStorage(string: self) | |
let container = NSTextContainer(containerSize: NSSize(width: box.width, height: box.height)) | |
let layout = NSLayoutManager() | |
layout.addTextContainer(container) | |
storage.addLayoutManager(layout) | |
storage.addAttributes(attrs, range: NSMakeRange(0, storage.length)) | |
container.lineFragmentPadding = 0.0 | |
let _ = layout.glyphRangeForTextContainer(container) |
#!/bin/sh | |
modulesDirectory=$DERIVED_FILES_DIR/modules | |
modulesMap=$modulesDirectory/module.modulemap | |
modulesMapTemp=$modulesDirectory/module.modulemap.tmp | |
mkdir -p "$modulesDirectory" | |
cat > "$modulesMapTemp" << MAP | |
module sqlite3 [system] { |
#!/usr/bin/env ruby | |
device_types_output = `xcrun simctl list devicetypes` | |
device_types = device_types_output.scan /(.*) \((.*)\)/ | |
runtimes_output = `xcrun simctl list runtimes` | |
runtimes = runtimes_output.scan /(.*) \(.*\) \((com.apple[^)]+)\)$/ | |
devices_output = `xcrun simctl list devices` | |
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/ |
// Note: This must be used in an Xcode project that contains a bridging header | |
// that includes <asl.h> | |
import Foundation | |
/// Provides high-level methods to access the raw data in | |
/// an ASL message. | |
struct SystemLogEntry { | |
/// Key-value pairs read from ASL message | |
let data: [String : String] |