A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
extension NSData | |
{ | |
/// Creates a length-delimited, byte buffer | |
var buffer : UnsafeBufferPointer<UInt8> { get { return UnsafeBufferPointer(start: UnsafePointer<UInt8>(self.bytes), count: self.length) }} | |
} | |
extension String | |
{ | |
/// Initializes a string from the given data | |
init?(data : NSData, encoding : NSStringEncoding) |
[alias] | |
llg = log --pretty=format:'%Cgreen%h%Creset %ad (%an) %s' --graph --date=relative |
struct DictionaryTwoWay<S:Hashable,T:Hashable> : DictionaryLiteralConvertible | |
{ | |
// Literal convertible | |
typealias Key = S | |
typealias Value = T | |
// Real storage | |
private var st : [S : T] = [:] | |
private var ts : [T : S] = [:] | |
extension Int | |
{ | |
func times(f :(Int) -> ()) | |
{ | |
for i in 0..<self | |
{ | |
f(i) | |
} | |
} | |
} |
I hereby claim:
To claim this, I am signing this object: