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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func passAnyObject(param: AnyObject) { | |
print(param) | |
} | |
class MyClass {} | |
struct MyStruct {} | |
let a: Int = 1 | |
let b = 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* 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. | |
* |
- Add the URL of the framework's repo to your
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------ | |
Conformances | |
------------ | |
protocol AbsoluteValuable | |
Conformances: | |
Comparable | |
IntegerLiteralConvertible | |
SignedNumberType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fib(n) | |
(0..n).inject([1,0]) { |(a,b), _| [b, a+b] }[0] | |
end |