% ruby-build --version
ruby-build 20160111
% rbenv --version
rbenv 1.0.0
Failed
% ruby-build --version
ruby-build 20160111
% rbenv --version
rbenv 1.0.0
Failed
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { | |
for subview in view.subviews { | |
if subview.isKindOfClass(UITextField) { | |
subview.resignFirstResponder() | |
} | |
} | |
} |
ruby -rsecurerandom -e "puts SecureRandom.uuid" |
private enum Example: Int { | |
case FirstItem | |
case SecondItem | |
case ThirdItem | |
static var count: Int { | |
var i = 1 | |
while Example(rawValue: i) != nil { | |
i = i + 1 | |
} |
class <# ClassName #> { | |
static let sharedInstance = <# ClassName #>() | |
private init() {} | |
} |
@[self class]@ [%B/%H] |
<!-- Disables ATS for any domains --> | |
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSAllowsArbitraryLoads</key> | |
<true/> | |
</dict> |
import Foundation | |
class Const { | |
class var FeedbackSlackURL: String { | |
let url = env["FeedbackSlackURL"] as! String | |
return url | |
} | |
private class var env: NSDictionary { |
# Your keymap | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# | |
# Here's an example taken from Atom's built-in keymap: |
NSString *sql = [NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS %@ ( \ | |
item_id INTEGER PRIMARY KEY AUTOINCREMENT, \ | |
title TEXT, \ | |
on INTEGER, \ | |
sort INTEGER, \ | |
date DATETIME \ | |
);", TABLE_NAME]; |