Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| /** | |
| * Part Zero : 10:15 Saturday Night | |
| * | |
| * (In which we will see how to let the type system help you handle failure)... | |
| * | |
| * First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0) | |
| */ | |
| import scalaz._ | |
| import Scalaz._ |
| trait MyList[+A] { | |
| def fold[B](k: Option[(A, B)] => B): B | |
| def map[B](f: A => B): MyList[B] = sys.error("Implement me in terms of fold") | |
| def flatMap[B](f: A => MyList[B]): MyList[B] = sys.error("Implement me in terms of fold") | |
| def headOption: Option[B] = sys.error("Implement me in terms of fold") | |
| def tailOption: Option[MyList[B]] = sys.error("Implement me in terms of fold") | |
| def isEmpty = sys.error("Implement me in terms of fold") | |
| def length = sys.error("Implement me in terms of fold") | |
| } |
| object GOption { | |
| def some[A](a: A): GOption[A] = new GOption[A] { | |
| def cata[B](n: => B, s: A => B): B = sys.error("Implement me") | |
| } | |
| def none[A]: GOption[A] = new GOption[A] { | |
| def cata[B](n: => B, s: A => B): B = sys.error("Implement me") | |
| } | |
| } | |
| trait GOption[+A] { |
| scala> (1 to 20).toList | |
| res1: List[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) | |
| //Simple side effects | |
| scala> res1 take 3 foreach (i => println(i)) | |
| 1 | |
| 2 | |
| 3 | |
| scala> res1 take 3 foreach println |
| { | |
| "jshint_options" : | |
| { | |
| "adsafe": false, | |
| "bitwise": false, | |
| "newcap": true, | |
| "eqeqeq": true, | |
| "immed": true, | |
| "nomen": false, | |
| "onevar": true, |
| # MAC manipulators | |
| alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
| alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
| // ---- | |
| // Sass (v3.3.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| $module: 'TestModule'; | |
| .#{$module} { | |
| color: red; | |
| // ---- | |
| // Sass (v3.3.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| $module: 'TestModule'; | |
| @mixin e($element) { | |
| .#{$module}__#{$element} { |