- リーダブルコード――より良いコードを書くためのシンプルで実践的なテクニック
- Working With Unix Processes(日本語訳: なるほどUnixプロセス ― Rubyで学ぶUnixの基礎)
- Working With TCP Sockets
- 集合知プログラミング
- Effective Objective-C 2.0
- エキスパートObjective-Cプログラミング ― iOS/OS Xのメモリ管理とマルチスレッド
- 体系的に学ぶ 安全なWebアプリケーションの作り方
- Head First C――頭とからだで覚えるCの基本
- [24時間365日] サーバ/インフラを支える技術 ‾スケーラビリティ、ハイパフォーマンス、省力運用
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
typealias Parser = String -> (String, String) | |
func charParser(char: Character) -> Parser { | |
return { text in | |
if text[text.startIndex] == char { | |
return (String(char), text[advance(text.startIndex, 1)..<text.endIndex]) | |
} | |
return ("", text) | |
} | |
} |
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 Foundation | |
struct Box<T> {} | |
protocol Functor { | |
typealias A | |
typealias B | |
typealias Boxed = Box<B> | |
func fmap<B>(f: A -> B) -> Boxed |
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 Foundation | |
enum MaybeInt { | |
case Nothing | |
case Just(Int) | |
} | |
extension MaybeInt : Printable { | |
var description : String { | |
switch self { |
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
AllCops: | |
RunRailsCops: true | |
Exclude: | |
- ",/**/*" | |
- ".git/**/*" | |
- "bin/*" | |
- "db/schema.rb" | |
- "db/migrate/*.rb" | |
- "log/**/*" | |
- "public/**/*" |
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
/* <system section="theme" selected="evergreen"> */ | |
@import "/css/theme/evergreen/evergreen.css"; | |
/* </system> */ | |
#container { | |
width: 800px; | |
} | |
#container-inner { | |
margin-top: 60px; |
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
/* See Kobito.app/Contents/Resources/markdown.css for predefined style. */ | |
/* ------------------------------ | |
* HTML element | |
* ------------------------------ */ | |
html { | |
background-color: #FFFFFF; | |
padding: 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
var originalHref = document.querySelector(".articles-show-click").href; | |
if (originalHref != null) { | |
location.href = originalHref; | |
} |
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
mport Foundation | |
let components = NSURLComponents() | |
components.scheme = "http" | |
components.host = "example.com" | |
components.path = "/hoge" | |
components.query = "q=keyword" | |
println(components.URL) //=> "http://example.com/hoge?q=keyword" |
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
class Stream<T> { | |
var subscribers: [(T) -> Void] = [] | |
func subscribe(subscriber: (T) -> Void) { | |
subscribers.append(subscriber) | |
} | |
func publish(message: T) { | |
for subscriber in subscribers { | |
subscriber(message) |