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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
" ========= Initial setup =========== | |
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" backspace in insert mode works like normal editor | |
set backspace=2 | |
syntax on " syntax highlighting |
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
@interface JSONFixture : NSObject | |
+ (id)fixtureDataWithName:(NSString *)fixtureName; | |
@end | |
@implementation JSONFixture | |
+ (id)fixtureDataWithName:(NSString *)fixtureName { |
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
class ArrayDataSource<CellType: UIView, ItemType>: NSObject, UITableViewDataSource, UICollectionViewDataSource { | |
var items: [ItemType] | |
var cellReuseIdentifier: String | |
var configureClosure: (CellType, ItemType) -> Void | |
init(items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) { | |
self.items = items | |
self.cellReuseIdentifier = cellReuseIdentifier | |
self.configureClosure = configureClosure | |
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
public class ArrayDataSource<CellType: UIView, ItemType> { | |
private var items: [ItemType] | |
private var cellReuseIdentifier: String | |
private var configureClosure: (CellType, ItemType) -> Void | |
private var proxy: DataSourceProxy! | |
private unowned var view: UIView | |
public init(view: UIView, items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) { | |
self.items = items | |
self.cellReuseIdentifier = cellReuseIdentifier |
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
// | |
// TableViewDataSource.swift | |
// QuickReply | |
// | |
// Created by Kristian Andersen on 31/07/14. | |
// Copyright (c) 2014 Robocat. 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
ant | |
automake | |
brew-cask | |
coreutils | |
go | |
hub | |
libyaml | |
node | |
pkg-config | |
ruby |
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
case SomeEnum { | |
case A | |
case B | |
} | |
let someValue = SomeEnum.A | |
if someValue == .A { | |
// Do something | |
} |
OlderNewer