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
Show hidden characters
{ | |
"extends": "airbnb", | |
"plugins": [ | |
"react" | |
], | |
"rules": { | |
"arrow-body-style": "off" | |
} | |
} |
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
const initialState = { | |
... | |
screenWidth: window.innerWidth, | |
}; | |
const sampleApp = (state = initialState, action) => { | |
switch (action.type) { | |
... | |
case 'CHANGE_SCREEN_WIDTH': | |
return Object.assign({}, state, { |
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
final class SettingsViewController: UITableViewController { | |
var dataSource: SettingsDataSource<SettingsSection<SettingItem>>! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
dataSource = SettingsDataSource<SettingsSection<SettingItem>>(sections: [ | |
SettingsSection<SettingItem>(rows: [ | |
SettingItem(title: "Colors", subTitle: nil, cellType: .Colors) |
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
protocol TableViewRowType { | |
} | |
protocol TableViewSectionType { | |
typealias Row: TableViewRowType | |
var rows: [Row] { get } | |
} | |
protocol TableViewDataSourceType { | |
typealias Section: TableViewSectionType |
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
$ git clone https://github.com/arkency/reactjs_koans.git | |
$ cd reactjs_koans | |
$ npm run setup |
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
node_modules/ | |
test/ | |
webpack.config.js | |
dist/ | |
server/ |
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
final class UserCell: UITableViewCell { | |
struct Layout { | |
static func height(vm: UserViewModel) -> CGFloat { | |
return 68.0 | |
} | |
} | |
... | |
} |
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 *) imageByTrimmingTransparentPixels { | |
int rows = self.size.height; | |
int cols = self.size.width; | |
int bytesPerRow = cols*sizeof(uint8_t); | |
if ( rows < 2 || cols < 2 ) { | |
return self; | |
} | |
//allocate array to hold alpha channel |
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
protocol InstantiateFromNibable { | |
typealias Instance | |
static func instantiateFromNib() -> Instance | |
} |
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
// | |
// FileUploader.swift | |
// ERAssistant | |
// | |
// Created by Narciso Cerezo Jiménez on 27/5/15. | |
// Copyright (c) 2015 Closure Software. All rights reserved. | |
// | |
import Foundation | |
import Alamofire |
NewerOlder