This file contains hidden or 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
import sbt._ | |
import Keys._ | |
import com.github.siasia.{WebPlugin=>WP} | |
object MyBuild extends Build { | |
val myTask = TaskKey[Unit]("my-task") | |
lazy val myProject = Project("webproject", file("."), settings =Defaults.defaultSettings ++ |
This file contains hidden or 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
import org.specs2.mutable.Specification | |
import org.specs2.matcher.MatchResult | |
// protected[specs2] trait MatchResult[T] ... | |
class DummySpec extends Specification { | |
// Is MatchResult escaping its visibility scope here? | |
// vvvvvvvvvvv | |
def intSpec: MatchResult[Int] = 1 must be equalTo 1 |
This file contains hidden or 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
import sbt._ | |
import Keys._ | |
object MyBuild extends Build { | |
lazy val beforeDeploy = TaskKey[Unit]("before-deploy", "will be invoked before deploy") | |
val externalProcess = "echo $HOME" | |
override lazy val settings: Seq[Setting[_]] = Seq[Setting[_]]( |
This file contains hidden or 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
import sbt._ | |
import Keys._ | |
// source of the actual shell modification take from Daniel C. Sobral's gist: | |
// https://gist.github.com/996474 | |
// prompt looks like: | |
// $PROJECTNAME:$GITBRANCH> | |
object ShellPrompt extends Plugin { |
This file contains hidden or 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
// | |
// RetroLogger | |
// A handy sbt-0.10.x plugin that allows you to set the log level like in the old days (aka sbt-0.7.x) | |
// "set logLevel := Level.Debug" ====> "debug" | |
// | |
// + put this file in ~/.sbt/plugins/ | |
// + add "sbtPlugin := true" to ~/.sbt/plugins/build.sbt | |
import sbt._ | |
import Keys._ |
This file contains hidden or 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
## Note: the system property `sbt.global.base` was introduced in 0.10.1 | |
## sbt-0.10.0 still uses the default global directory in ~/.sbt | |
gseitz@QBallz ~/.sbt % find . -name '*target*' -prune -o -print | |
. | |
./0.10.1 | |
./0.10.1/plugins | |
./0.10.1/plugins/build.sbt | |
./0.10.1/plugins/project |
This file contains hidden or 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
case class Foo(bar: Int) | |
This file contains hidden or 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 rhs = Apply(lensApply, lensGet :: lensSet :: Nil) | |
yields the correct | |
rhs: scalaz.Lens.apply[test.this.Foo, scala.this.Int](((t: test.this.Foo) => 3), ((t: test.this.Foo, m: scala.this.Int) => t.copy(m))) | |
val appliedLensType = TypeApply(REF(lensClass), REF(ccClazz) :: TypeTree(ccMember.symbol.tpe) :: Nil) | |
yields | |
appliedLensType: scalaz.this.Lens[test.this.Foo, scala.this.Int] |
This file contains hidden or 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
package sample | |
import java.util.{TimerTask, Timer} | |
/** | |
* Shows Java way of creating an anonymous inner class to supply the code for a TimerTask. | |
*/ | |
object TimerDemo extends Application { | |
new Timer().schedule(new TimerTask { | |
def run() { |
This file contains hidden or 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
<scheme name="oxbow" version="142" parent_scheme="Default"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2023-11-22T09:52:13</property> | |
<property name="ide">idea</property> | |
<property name="ideVersion">2023.2.5.0.0</property> | |
<property name="modified">2023-11-22T09:52:19</property> | |
<property name="originalScheme">oxbow</property> | |
</metaInfo> | |
<option name="LINE_SPACING" value="1.2" /> |