Skip to content

Instantly share code, notes, and snippets.

@uchcode
uchcode / 0_reuse_code.js
Created June 27, 2016 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@uchcode
uchcode / protocol-extension-struct-example.swift
Created April 10, 2016 18:09 — forked from c9iim/protocol-extension-struct-example.swift
ユーザー定義に依存したプロトコル拡張例。依存部分の初期設定は拡張外の責務。
//: ユーザー定義に依存したプロトコル拡張例。依存部分の初期設定は拡張外の責務。
protocol FooSpec {
var fizz : Int { get }
func buzz() -> Int
}
extension FooSpec {
func buzz() -> Int {
return fizz * 2