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
system ~/projects/rubyflux $ cat blah.rb | |
def method_missing(name, args) | |
puts name | |
end | |
foo | |
bar | |
baz | |
system ~/projects/rubyflux $ rake run[blah.rb] |
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
val genVersionFile = TaskKey[Unit]( | |
"gen-version-file", | |
"Generates a file in target containing the apps version" | |
) |
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
val query = ScalasticSearch.boolQuery( | |
cond ( | |
must( | |
'nickname -> "Superman", // is equivalent to... | |
term('nickname -> "Superman"), // this | |
term("nickname" -> "Superman") // or this | |
), | |
should( | |
'nickname -> "Superman", // is equivalent to... | |
term('nickname -> "Superman"), // this |
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
/* contravariance required so Empty can be used with Nodes ( Nothing <: T ) */ | |
class Tree[+T] | |
case object Empty extends Tree[Nothing] | |
case class Node[T](val elem: T, val left: Tree[T], val right: Tree[T]) extends Tree[T] | |
def inOrder[T](t: Tree[T]): List[T] = t match { | |
case Empty => Nil | |
case Node(e, left, right) => inOrder(left) ::: List(e) ::: inOrder(right) | |
} |
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
brew install growlnotify | |
cat >> ~/.bashrc <<EOF | |
#flatMapThatShit reminder | |
if [ -f /tmp/flatMapThatShit ]; then | |
kill \`cat /tmp/flatMapThatShit\` | |
fi | |
while true; do if [[ \$RANDOM%12 -eq 0 ]]; then growlnotify -a TextEdit "Is that scala?" -m "flatMap that shit"; fi; sleep 300; done & |
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
apply plugin: 'groovy' | |
sourceCompatibility = 1.5 | |
version = '0.1-SNAPSHOT' | |
repositories { | |
mavenRepo(urls: 'http://repository.codehaus.org/') | |
mavenCentral() | |
} |
NewerOlder