- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
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 | |
| extension UIImage { | |
| func tinted(withLinearGradient gradient: CGGradient, fromTop: Bool = true, blendMode: CGBlendMode = CGBlendMode.normal) -> UIImage { | |
| UIGraphicsBeginImageContextWithOptions(self.size, false, self.scale); | |
| let context = UIGraphicsGetCurrentContext()! | |
| context.translateBy(x: 0, y: self.size.height) | |
| context.scaleBy(x: 1.0, y: -1.0) | |
| context.setBlendMode(blendMode) |
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
| // | |
| // UIColor+Hex.swift | |
| // | |
| // | |
| import UIKit | |
| extension UIColor { | |
| convenience init(colorWithHexValue value: Int, alpha:CGFloat = 1.0){ | |
| self.init( |
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
| let rx_request = Observable<Value>.create { (observer) -> Disposable in | |
| let requestReference = Alamofire.request(.POST, url, parameters: payload) | |
| .responseJSON(completionHandler: { (response) in | |
| if let value = response.result.value { | |
| observer.onNext(value) | |
| observer.onCompleted() | |
| }else if let error = response.result.error { | |
| observer.onError(error) | |
| } | |
| }) |
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
| /* | |
| In response of Tom Lokhort's article. | |
| A third alternative: alternative 2 under steroïds | |
| --- | |
| Source: http://tom.lokhorst.eu/2017/07/strongly-typed-identifiers-in-swift | |
| */ | |
| struct GenericIdentifier<T>: RawRepresentable, Hashable, Equatable { | |
| let rawValue: String |
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
| #!/usr/bin/env xcrun swift -O | |
| /* | |
| gen.swift is a direct port of cfdrake's helloevolve.py from Python 2.7 to Swift 3 | |
| -------------------- https://gist.github.com/cfdrake/973505 --------------------- | |
| gen.swift implements a genetic algorithm that starts with a base | |
| population of randomly generated strings, iterates over a certain number of | |
| generations while implementing 'natural selection', and prints out the most fit | |
| string. | |
| The parameters of the simulation can be changed by modifying one of the many |
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 -e | |
| defaults write com.apple.Dock autohide-delay -float 5 | |
| defaults write com.apple.dock tilesize -int 1 | |
| killall Dock | |
| # restore defaults | |
| # defaults delete com.apple.Dock autohide-delay |
Steps to setup a new OS X laptop with a data science & computational biology development environment.
Last updated: 7 Jan 2017 macOS: Yosemite => Sierra
Sure you could try to do this from dotfiles, but historically something has broken and required manual input anyway. So, inspired by the pragmatism of paul irish bash setup script and a few other gists written in markdown like this, I rolled my own.
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
| " sVimrc | |
| let lastactivetablimit = 50 | |
| let lastclosedtablimit = 50 | |
| let scrollduration = 20 | |
| let scrollstep = 160 | |
| let homeurl = "http://google.com" | |
| let newtaburl = "http://google.com" | |
| " Shortcuts | |
| map "?" help |
OlderNewer