This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.
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
update_fastlane | |
fastlane_version "1.57.0" | |
before_all do | |
ensure_git_status_clean | |
end | |
lane :build do |p| | |
ensure_docker_machine_available |
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
brew install apple-gcc42 openssl libyaml libffi | |
xcode-select --install | |
export CC=/usr/local/bin/gcc-4.2 | |
export CFLAGS='-g -O2' | |
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
rbenv install 1.8.7-p375 |
CFRunLoopSource
is cool. It lets you build behavior similar to the mechanisms that drive setNeedsLayout
and setNeedsDisplay
in UIKit.
I found myself in need of something like this a couple of times. It's great to know that no matter how many times I say I need to update something, I will get a single callback at the end of the run loop that gives me a chance to perform my work.
Here is a little Swift wrapper that makes the API easier to deal with.
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
import UIKit | |
enum Direction { | |
case Left, Right, Up, Down | |
var pointVector: CGPoint { | |
switch self { | |
case Left: return CGPoint(x: -1, y: 0) | |
case Right: return CGPoint(x: 1, y: 0) | |
case Up: return CGPoint(x: 0, y: -1) |
You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
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
let color = "blue" | |
let num = 42 | |
localized("Colorless green ideas sleep furiously.") | |
localized("Colorless \(color) ideas sleep furiously.") | |
localized("\(num.formatted("%05d")) colorless green ideas sleep furiously.") |
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
// | |
// UIImageView+imageFrame.swift | |
// Tindex | |
// | |
// Created by Koen Punt on 24-08-15. | |
// Copyright (c) 2015 Koen Punt. All rights reserved. | |
// | |
import UIKit |
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
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1 | |
// Author: Timo Wälisch <timo@waelisch.de> | |
import UIKit | |
import RealmSwift | |
import ObjectMapper | |
import SwiftyJSON | |
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType { | |
typealias Object = List<T> |