The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| # | |
| # This script will install the following Textmate bundles | |
| # | |
| # Languages | |
| # - c https://github.com/textmate/c.tmbundle | |
| # - coffeescript https://github.com/jashkenas/coffee-script-tmbundle | |
| # - context free https://github.com/textmate/context-free.tmbundle | |
| # - erlang https://github.com/textmate/erlang.tmbundle | |
| # - haskell https://github.com/textmate/haskell.tmbundle.git | |
| # - html https://github.com/textmate/html.tmbundle |
| package s | |
| object Test { | |
| // Observe that x.companion is statically typed such that foo is callable | |
| def f1() = { | |
| val x = new Foo | |
| println(x) // Foo instance | |
| println(x.companion) // Foo companion | |
| println(x.companion.foo) // I'm foo! |
| #!/usr/bin/env bash | |
| # | |
| # A wrapper for brew and brew cask. | |
| # | |
| Brew=/usr/local/bin/brew # hard to avoid hardcoding path if we want to call this "brew" | |
| Cask="$Brew cask" | |
| CaskRegex="^ [-] ([a-z]*):.*" | |
| brewCommands () { $Brew commands | egrep -v commands$ | sort -u; } |
| class SimpleFile | |
| class ExtendedFile extends SimpleFile | |
| implicit class Predicate[-A](val fn: A => Boolean) { | |
| def &&[B <: A](other: Predicate[B]): Predicate[B] = Predicate { (x: B) => | |
| fn(x) && other.fn(x) | |
| } | |
| } |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python