This file contains 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
// If you want types initializable from String literals | |
// but don't want to implement three separate initializers. | |
extension ExpressibleByUnicodeScalarLiteral where Self: ExpressibleByStringLiteral, Self.StringLiteralType == String { | |
public init(unicodeScalarLiteral value: String) { | |
self.init(stringLiteral: value) | |
} | |
} |
This file contains 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
#!/bin/bash | |
# Universal Install Script | |
# https://xkcd.com/1654/ | |
pip install "$1" & | |
easy_install "$1" & | |
brew install "$1" & | |
npm install "$1" & | |
yum install "$1" & |
This file contains 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
OUT := binariy-name | |
PKG := gitlab.com/group/project | |
VERSION := $(shell git describe --always --long --dirty) | |
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/) | |
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/) | |
all: run | |
server: | |
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG} |
carlossless [09:50] So anyone used RxSwift? I’m wondering what are your thoughts and opinions vs RAC3.
jspahrsummers [10:00] @carlossless: https://github.com/ReactiveCocoa/ReactiveCocoa/blob/07813339d3c44aa02fb1b71777baa4ede0f0f77a/README.md#how-does-reactivecocoa-relate-to-rx
carlossless [10:13]
Yeah, I was looking for a more practical point of view but even so. RxSwift has UI bindings, it follows the haskell naming for most transformation and composition functions map
, filter
etc. rather than select
, where
.
carlossless [10:14]
This file contains 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
#!/bin/bash -eo pipefail | |
## Allows for creation of "Basic" DNS records in a Route53 hosted zone | |
function main() { | |
record_name=$1 | |
record_value=$2 | |
[[ -z $record_name ]] && echo "record_name is: $record_name" && exit 1 | |
[[ -z $record_value ]] && echo "record_value is: $record_value" && exit 1 |
This file contains 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
protocol OptionalType { | |
typealias T | |
var optional: T? { get } | |
} | |
extension Optional : OptionalType { | |
var optional: T? { return self } | |
} | |
extension SequenceType where Generator.Element: OptionalType { |
This file contains 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
package com.hubspot.jersey.dropwizard.managed; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.jaxrs.cfg.JaxRSFeature; | |
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; | |
import com.google.inject.Inject; | |
import com.google.inject.Provider; | |
import com.yammer.dropwizard.config.Environment; | |
import com.yammer.dropwizard.lifecycle.Managed; |
This file contains 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
// | |
// A half-baked approach (not thread-safe, poor disposable management) for creating | |
// aggregate collections from multiple signals of collection mutations. In this | |
// case we are concating multiple mutation streams into a single container. So for | |
// each inner signal we need to offset subsequent splices by the count of preceding | |
// items (which can be recovered by scanning previous splices). | |
// | |
// Example: | |
// | |
// let (first, sink1) = SignalProducer<Splice<Int>, NoError>.buffer() |