Skip to content

Instantly share code, notes, and snippets.

View dennisfarandy's full-sized avatar

Dennis Farandy dennisfarandy

View GitHub Profile
@dennisfarandy
dennisfarandy / swift
Created February 12, 2016 10:57
SwiftCurry
// LEARNING CURRYING
struct structA {
let a:Int
let b:Int
init(a:Int, b:Int) {
self.a = a
self.b = b
}
}
@dennisfarandy
dennisfarandy / MultiDirectionAdjudicatingScrollView.swift
Created December 18, 2015 08:22 — forked from andymatuschak/MultiDirectionAdjudicatingScrollView.swift
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@dennisfarandy
dennisfarandy / makemake.pl
Created November 16, 2015 19:01 — forked from roop/makemake.pl
Script to create a Makefile to build your Swift project
#!/usr/bin/perl -w
use strict;
# Makefile generator for quick compilation of Swift projects
# By: Roopesh Chander
# Thanks: Andy Matuschak
# Works only for swift-only projects.
# Usage:
# > perl makemake.pl
# > make
class FooViewController: UIViewController {
let name: String
init(_ coder: NSCoder? = nil) {
name = "Bar"
if let coder = coder {
super.init(coder: coder)
} else {
super.init(nibName: nil, bundle:nil)
@dennisfarandy
dennisfarandy / ReactiveCocoaUtil.swift
Created August 5, 2015 09:31
some reactivecocoa util that colin eberhardt create, source : https://github.com/ColinEberhardt/ReactiveSwiftFlickrSearch
//
// RACSignal+Extensions.swift
// ReactiveSwiftFlickrSearch
//
// Created by Colin Eberhardt on 15/07/2014.
// Copyright (c) 2014 Colin Eberhardt. All rights reserved.
//
import Foundation
AnonymousFunction( { (number: Int) -> Bool in number < 0 } )
AnonymousFunction { (number: Int) -> Bool in number < 0 }
AnonymousFunction { (number) -> Bool in number < 0 }
AnonymousFunction { number -> Bool in number < 0 }
AnonymousFunction { number in number < 0 }
AnonymousFunction { $0 < 0 }