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
    
  
  
    
  | // | |
| // UIImage+Extensions.swift | |
| // | |
| // Created by Daniel Tartaglia on 4/25/16. | |
| // Copyright © Daniel Tartaglia. MIT License. | |
| // | |
| import UIKit | |
  
    
      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
    
  
  
    
  | // | |
| // Signal.swift | |
| // | |
| // Created by Daniel Tartaglia on 9/6/15. | |
| // Copyright © 2016 Daniel Tartaglia. MIT License. | |
| // | |
| public protocol Disposable { | |
| func dispose() | |
| } | 
  
    
      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 bash | |
| function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" > "$1"; } | |
| function version_eq() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$1"; } | |
| function version_lt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" < "$1"; } | |
| RUBY_VERSION=$(/usr/bin/ruby -v | awk '{print $2}' | cut -d'p' -f1) | |
| echo "ruby version is ${RUBY_VERSION}" | 
  
    
      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
    
  
  
    
  | // Swift3 gets rid of dispatch_once and recommends replacing it with a lazy global. | |
| // That's very straightforward when dispach_once is used to initialize something, but | |
| // isn't an exact match when you want something to execute once, and then become a noop | |
| // in a thread-safe way. | |
| // The following approach seems completely "correct" and I guess actually a bit elegant, | |
| // if by "elegant" you mean "terse and not immediately obvious to the reader, which makes | |
| // you look very clever." | |
| var doOnce: () -> Void = { | 
  
    
      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
    
  
  
    
  | // Swift3 gets rid of dispatch_once and recommends replacing it with a lazy global. | |
| // That's very straightforward when dispach_once is used to initialize something, but | |
| // isn't an exact match when you want something to execute once, and then become a noop | |
| // in a thread-safe way. | |
| // The following approach seems completely "correct" and I guess actually a bit elegant, | |
| // if by "elegant" you mean "terse and not immediately obvious to the reader, which makes | |
| // you look very clever." | |
| var doOnce: () -> Void = { | 
NewerOlder