I hereby claim:
- I am benashman on github.
- I am benashman (https://keybase.io/benashman) on keybase.
- I have a public key whose fingerprint is EE3E 9592 B9D3 D75F 5142 142D AD57 DD3C A5E3 E2E1
To claim this, I am signing this object:
// Generate a random color | |
func randomColor() -> UIColor { | |
let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0 | |
let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from white | |
let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from black | |
return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1) | |
} | |
// Execute block after delay |
I hereby claim:
To claim this, I am signing this object:
@rounded_top_mask = CAShapeLayer.layer | |
@rounded_top_mask.path = UIBezierPath.bezierPathWithRoundedRect(@insight_header.bounds, byRoundingCorners: UIRectCornerTopLeft | UIRectCornerTopRight, cornerRadii: CGSizeMake(4, 4)).CGPath | |
@insight_header.layer.mask = @rounded_top_mask | |
.vs. | |
.insight-header { | |
border-radius: 4px 4px 0 0; | |
} |
var legitDate = function(y, m, d) { | |
var date = new Date( | |
y + "-" + ("0" + m).slice(-2) + "-" + ("0" + d).slice(-2) | |
); | |
return date; | |
}; |