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 Combine | |
var cancellables = [AnyCancellable]() | |
extension Publisher { | |
func withLatestFrom<A, P: Publisher>( | |
_ second: P | |
) -> AnyPublisher<A, Failure> where P.Output == A, P.Failure == Failure { | |
return second | |
.map { result -> AnyPublisher<A, Failure> in |
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
//: Sierpinski triangle - A repeating series of triangles. Each iteration subdivides an equilateral triangle into 4 smaller triangles creating a fractal pattern that is mesmerizing. This type of problem is well suited for recursion! | |
import UIKit | |
class Sierpinski: UIView { | |
let background = UIColor(red: 71 / 255, green: 71 / 255, blue: 71 / 255, alpha: 1) | |
override init(frame: CGRect) { | |
super.init(frame: frame) |
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
// | |
// Grid.h | |
// Crossword | |
// | |
// Created by Eliot Fowler on 10/9/14. | |
// Copyright (c) 2014 Eliot Fowler. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import "GridSize.h" |
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 ruby | |
require 'json' | |
@filename = ARGV[0] | |
def read_puz(length, offset) | |
return IO.read(@filename, length, offset) | |
end |
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
### Keybase proof | |
I hereby claim: | |
* I am EliotFowler on github. | |
* I am eliotfowler (https://keybase.io/eliotfowler) on keybase. | |
* I have a public key whose fingerprint is 4D29 FC3C 6AB9 190B E46B 326D 644F 79BF 1925 C65B | |
To claim this, I am signing this object: |
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
module.exports = function (grunt) { | |
// Load grunt tasks automatically | |
require('load-grunt-tasks')(grunt); | |
// Time how long tasks take. Can help when optimizing build times | |
require('time-grunt')(grunt); | |
// Define the configuration for all the tasks | |
grunt.initConfig({ |
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
package models | |
import anorm._ | |
import anorm.SqlParser._ | |
import play.api.db.DB | |
import play.api.Play.current | |
case class Destination(id: Long, originalUrl: String, shortUrlHash: String) | |
object Destination { |