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
class Project(info: ProjectInfo) extends DefaultWebProject(info) { | |
val mavenLocal = "Local Maven Repository" at "file:///"+Path.userHome+"/.m2/repository" | |
} |
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
package org.doxla.junit4; | |
import java.io.IOException; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; |
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
// where ten().getValue() returns the Integer 10 in 200 millis | |
@Test public void withoutEventuallyWeGetNull() throws Exception { | |
assertThat(ten().getValue(), nullValue()); | |
} | |
@Test public void withEventuallyICanAssertWhatTheValueWillEventuallyReturn() throws Exception { | |
assertThat(eventually(ten()).getValue(), willReturn(10)); | |
} |
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
var sys=require('sys'), http = require('http'); | |
var connection = http.createClient(80, "search.twitter.com"); | |
function TweetSearcher(search, pollTime, newTweetEventHandler) { | |
this.search = search; | |
this.pollTime = pollTime; | |
this.since = 0; | |
this.newTweet = newTweetEventHandler | |
} |
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
package org.doxla.privet.akka.strategy.simple | |
import akka.actor.{Actor, ActorRef, FSM} | |
import akka.actor.FSM._ | |
import akka.util.duration._ | |
import org.doxla.privet.akka.bet._ | |
sealed trait TradingState | |
case object NoBetsPlaced extends TradingState | |
case object BackPlaced extends TradingState |
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
curl --data "days=0&format=bleb&channels=bbc1,bbc2,itv1,ch4,five,4music,bbc1ènèireland,bbc1èscotland,bbc1èwales,bbc2ènèireland,bbc2èscotland,bbc2èwales,bbc3,bbc4,bbc7,bbcè6music,bbcèhd,bbcènews24,bbcèparliament,bbcèradio1,bbcèradio1èxtra,bbcèradio2,bbcèradio3,bbcèradio4,bbcèradio5èlive,bbcèradio5èliveèsportsèextra,bbcèradioèscotland,bbcèworldèservice,boomerang,bravo,britishèeurosport,cartoonènetwork,cbbc,cbeebies,challenge,citv,dave,discovery,discoveryèrealètime,disney,e4,extremeèsports,filmèfour,fiveèus,fiver,fx,idealèworld,itv2,itv3,itv4,livingètv,menèandèmotors,more4,mtv,nickèjunior,nickelodeon,oneword,paramount,paramount2,qvc,s4c,s4c2,scifi,skyèmoviesèactionèthriller,skyèmoviesèclassics,skyèmoviesècomedy,skyèmoviesèdrama,skyèmoviesèfamily,skyèmoviesèhd1,skyèmoviesèhd2,skyèmoviesèindie,skyèmoviesèmodernègreats,skyèmoviesèpremiere,skyèmoviesèsci-fièhorror,skyènews,skyèone,skyèsports1,skyèsports2,skyèsports3,skyèsportsènews,skyèsportsèxtra,skyèthree,skyètravel,skyètwo,tcm,teachersètv,tmf,ukègold,uktvèstyle,v |
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
import sbt._ | |
class Plugins(info: ProjectInfo) extends PluginDefinition(info) | |
{ | |
val sbtGitHubPlugin = "com.github.oxlade39" % "sbt-github-plugin" % "2.0.1" from "http://cloud.github.com/downloads/oxlade39/sbt-github-plugin/sbt-github-plugin-2.0.1.jar" | |
} |
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
object HomepageSpec extends ScalatraSpecification { | |
addFilter(classOf[ScalatraEntrypoint], "/*") | |
"Homepage" should { | |
"respond to GET /" in { | |
get("/") { | |
status mustEqual(200) | |
} | |
} |
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
class ScalaSpec extends FlatSpec with MustMatchers { | |
behavior of "a PartialFunction" | |
it should "chain" in { | |
var pf: PartialFunction[String, String] = { | |
case "1" => "2" | |
} | |
pf = pf andThen { |
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
#!/usr/bin/env scala | |
!# | |
JekyllBlogPost.createFile | |
object JekyllBlogPost { | |
import java.io.File | |
import java.io.FileWriter | |
import java.util.Date |
OlderNewer