$ rails g model User
belongs_to
has_one
def fib(n) | |
(0..n).inject([1,0]) { |(a,b), _| [b, a+b] }[0] | |
end |
Did you upgrade to Rails 4.0.4 yet? | |
I made a rake task for that. | |
2.1.0 or 2.2.0? | |
Did you know there's a rake task for that? | |
We should use Angular.js on this project. | |
I love the new hash syntax. | |
Did you upgrade to Rails 4.18 yet? | |
Did you see my pull request? | |
I hate the new hash syntax. | |
Did you upgrade to Rails 4.2.0 yet? |
# Command Line Tools via Xcode | |
1. Get Xcode from App Store | |
2. Open Xcode | |
3. Go to Preferences | |
4. Downloads > Components > Command Line Tools > Install | |
# or | |
xcode-select --install | |
# Homebrew |
------------ | |
Conformances | |
------------ | |
protocol AbsoluteValuable | |
Conformances: | |
Comparable | |
IntegerLiteralConvertible | |
SignedNumberType |
Cartfile
using one of the following: github "ReactiveCocoa/ReactiveCocoa" # GitHub.com
github "https://enterprise.local/ghe/desktop/git-error-translations" # GitHub Enterprise
git "https://enterprise.local/desktop/git-error-translations2.git"
git "/Users/user/foo/bar.git"
…optionally followed by one of the following version specifiers:
F# | C# | Scala | Clojure | Python | Ruby | Haskell | SQL | OCaml | Common Lisp | Erlang | Smalltalk | Scheme | Ecmascript 5 | Perl 5 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
map | Select | map | map | map | collect | map | Select | map | mapcar | map | collect: | map | map | map |
filter | Where | filter | filter | filter | select | filter | Where | filter | remove-if-not | filter | select: | filter | filter | grep |
fold | Aggregate | foldLeft | reduce | reduce | inject | foldl |
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* To use: copy this file to ~/Library/KeyBindings/ | |
* after that any Cocoa applications you launch will inherit these bindings | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* |
func passAnyObject(param: AnyObject) { | |
print(param) | |
} | |
class MyClass {} | |
struct MyStruct {} | |
let a: Int = 1 | |
let b = 2.0 |
let views = ["v1": v1, "super": self.view] | |
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[super]-(<=0)-[v1(50)]", options: .AlignAllCenterY, metrics: nil, views: views)) | |
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:[super]-(<=0)-[v1(100)]", options: .AlignAllCenterX, metrics: nil, views: views)) |