I hereby claim:
- I am tomconroy on github.
- I am tomconroy (https://keybase.io/tomconroy) on keybase.
- I have a public key whose fingerprint is 37C0 0637 8814 278E B2A6 62DF 029F E0AE AED1 EA5E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| func encode<T>(var value: T) -> NSData { | |
| return withUnsafePointer(&value) { p in | |
| NSData(bytes: p, length: sizeofValue(value)) | |
| } | |
| } | |
| func decode<T>(data: NSData) -> T { | |
| let pointer = UnsafeMutablePointer<T>.alloc(sizeof(T)) | |
| data.getBytes(pointer, length: sizeof(T)) | |
| return pointer.move() |
| $max: 32; | |
| $min: 12; | |
| @for $i from 1 through 6 { | |
| h#{$i} { | |
| font-size: #{$max - ($max - $min) * (($i - 1) / 5)}px; | |
| } | |
| } |
| class Event <T:Any> { | |
| var handlers = Array<(T) -> Void>() | |
| func listen(handler: (T) -> Void) { | |
| handlers.append(handler) | |
| } | |
| func emit(object: T) { | |
| for handler in handlers { | |
| handler(object) |
| # Usage: | |
| # 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/submodule_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, SubmoduleStrategy | |
| module SubmoduleStrategy | |
| # do all the things a normal capistrano git session would do |