Skip to content

Instantly share code, notes, and snippets.

View pbonneville's full-sized avatar

Paul Bonneville pbonneville

View GitHub Profile
@pbonneville
pbonneville / gist:a26176b2477c43f597a00ca0fa6e3f28
Created February 28, 2018 22:27 — forked from tobyhede/gist:3179978
Ruby/Rails date format cheat sheet
From http://linux.die.net/man/3/strftime
%a - The abbreviated weekday name (``Sun'')
%A - The full weekday name (``Sunday'')
%b - The abbreviated month name (``Jan'')
%B - The full month name (``January'')
%c - The preferred local date and time representation
%d - Day of the month (01..31)
%e - Day of the month without leading 0 (1..31)
%g - Year in YY (00-99)
import UIKit
@IBDesignable
class RoundedButton: UIButton {
@IBInspectable var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
layer.masksToBounds = cornerRadius > 0
}