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
//: Playground - noun: a place where people can play | |
// | |
// main.swift | |
// RoutingApproaches | |
// | |
// Created by Chris Eidhof on 01.08.18. | |
// Copyright © 2018 objc.io. All rights reserved. | |
// |
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
import UIKit | |
// Copy/paste me into a playground, I'm ready to roll! | |
// We're going to start with UIKit styling functions in the style | |
// let label = UILabel() |> | |
// textColor(.blue) >>> backgroundColor(.red) | |
// then run into difficulties with generifying those functions over protocols, | |
// and end with an alternative using <> and a nonstandard |> |
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
Welcome to Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1). Type :help for assistance. | |
1> let an_int: Int = 3 | |
an_int: Int = 3 | |
2> an_int is Int? | |
$R0: Bool = true | |
3> [an_int] is [Int?] | |
$R1: Bool = true | |
4> let list_of_ints = [an_int] | |
list_of_ints: [Int] = 1 value { | |
[0] = 3 |
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
[ | |
{ | |
"title": "Meet Me At Infinity : The Uncollected Tiptree: Fiction and Nonfiction", | |
"author": "Jr., James Tiptree", | |
"isbn": "031286938X" | |
}, | |
{ | |
"title": "Through the narrow gate : the mythological consciousness of Russell Hoban", | |
"author": "Wilkie-Stibbs, Christine", | |
"isbn": "0838633390" |
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
curl -XPOST "http://localhost:9200/my_index/my_type/_mapping" -d' | |
{ | |
"my_type": { | |
"properties": { | |
"byte_field": {"type": "byte"}, | |
"int_field": {"type": "integer"}, | |
"long_field": {"type": "long"} | |
} | |
} | |
}' |
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
# Set the prefix key to C-a instead of C-b, like GNU screen | |
set -g prefix C-a | |
bind a send-prefix | |
unbind C-b | |
set -s escape-time 1 | |
bind r source-file ~/.tmux.conf \; display "Reloaded" | |
# Intuitive vertical/horizontal split keys |