For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
//: # How to retrieve a host name and associated aliases from an IP address using Core Fondation's `CFHost` in Swift 3 | |
import Foundation | |
import PlaygroundSupport | |
//: In order to get the callback working we use a simple class to implement the showcase. | |
class DNSResolve { | |
//: The IP address may be a Swift `String` thanks to the toll-free bridging to C strings. | |
let ip: String = "17.172.224.47" | |
//: We use an optional `CFHost` variable because CFHost neither comes with an initializer nor is conforming to the Nullable protocol. | |
var host: CFHost? | |
//: We use this array of `String`s to store the resolved host names. |
<style> | |
.checkbox{ | |
margin: 10px 20px; | |
input[type=checkbox] { | |
display:none; | |
} | |
input[type=checkbox] + label{ | |
border: 2px solid #FFFFFF; |
//: # How to retrieve a host name and associated aliases from an IP address using Core Fondation's `CFHost` | |
import Cocoa | |
import XCPlayground | |
//: In order to get the callback working we use a simple class to implement the showcase. | |
class DNSResolve { | |
//: The IP address may be a Swift `String` thanks to the toll-free bridging to C strings. | |
let ip: String = "17.172.224.47" | |
//: We use an optional `CFHost` variable because CFHost neither comes with an initializer nor is conforming to the Nullable protocol. | |
var host: CFHost? | |
//: We use this array of `String`s to store the resolved host names. |
#!/usr/bin/env bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Platform |
/* | |
This is a demonstration of how to implement the Optional type in Swift. | |
The name 'Maybe' is taken from Haskell, but the two cases 'None' & 'Some' | |
are the same as Swift's Optional type (Haskell uses 'Nothing' & 'Just'). | |
The Maybe type conforms to NilLiteralConvertible, as does Swift's | |
Optional type. This allows a Maybe value to be constructed from 'nil'. | |
One aspect of Swift's Optional type which can't be reproduced is | |
'implicit Optional wrapping'. Here's an example: |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |