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
[info] 'compiler-interface' not yet compiled for Scala 2.12.0-M4. Compiling... | |
[debug] Plain interface to Scala compiler 2.12.0-M4 with arguments: | |
[debug] -nowarn | |
[debug] -d | |
[debug] /tmp/sbt_7114f1db | |
[debug] -bootclasspath | |
[debug] /home/martynas/soft/jdk1.8.0_20/jre/lib/resources.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/rt.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/sunrsasign.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/jsse.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/jce.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/charsets.jar:/home/martynas/soft/jdk1.8.0_20/jre/lib/jfr.jar:/home/martynas/soft/jdk1.8.0_20/jre/classes:/home/martynas/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-M4.jar | |
[debug] -classpath | |
[debug] /home/martynas/.sbt/boot/scala-2.10.6/org.scala-sbt/sbt/0.13.11/xsbti/interface-0.13.11.jar:/tmp/sbt_d12c03f2/srcs/org.scala-sbt/compiler-interface/compiler-interface-0.13.11-sources.jar:/home/martynas/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.12.0 |
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
➜ ~ speaker-test -c2 -twav -Dplughw:USB | |
speaker-test 1.1.0 | |
Playback device is plughw:USB | |
Stream parameters are 48000Hz, S16_LE, 2 channels | |
WAV file(s) | |
Playback open error: -16,Device or resource busy |
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
DISPLAY=:0 gnome-terminal -x bash -c 'script -f /dev/pts/0 --command "cat>/dev/null"' && script -f /dev/pts/5 --command 'cat>/dev/null' |
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
class ActorBase extends Actor { | |
def receive = { | |
case _ => | |
} | |
} | |
class AnotherActor extends ActorBase { | |
val myReceive: Receive = { | |
case "msg" => | |
} |
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
scala> 0xFF - 1 & 0xFF | |
res10: Int = 254 | |
scala> 0xFF & 0xFF | |
res11: Int = 255 | |
scala> 0xFF + 1 & 0xFF | |
res12: Int = 0 | |
scala> 0xFF + 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
➜ projects cloc akka-clean | |
1464 text files. | |
1380 unique files. | |
326 files ignored. | |
http://cloc.sourceforge.net v 1.62 T=2.43 s (468.1 files/s, 89433.4 lines/s) | |
-------------------------------------------------------------------------------- | |
Language files blank comment code | |
-------------------------------------------------------------------------------- | |
Scala 830 21421 28420 89539 |
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
scala> val YearMonth = "([0-9]+)-([0-9]+)".r | |
YearMonth: scala.util.matching.Regex = ([0-9]+)-([0-9]+) | |
scala> val YearMonth(year, month) = "2014-11" | |
year: String = 2014 | |
month: String = 11 |
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 Request(valid: Boolean, impressions: Seq[Impression]) | |
case class Impression(rules: Seq[Rule]) | |
case class Rule(valid: Boolean) | |
case class Bid(money: Double) | |
// generate some random requests | |
val requests = Vector.fill(5) { | |
Request( |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.1"> | |
<head> | |
<title>BeyondPod Feeds</title> | |
<dateCreated>Sun, 24 Aug 2014 12:39:43 GMT+03:00</dateCreated> | |
<dateModified>Sun, 24 Aug 2014 12:39:43 GMT+03:00</dateModified> | |
</head> | |
<body> | |
<outline text="Security"> | |
<outline text="Security Now (MP3)" xmlUrl="http://leoville.tv/podcasts/sn.xml" type="rss" /> |
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 stackable | |
import akka.actor.{Props, ActorSystem, Actor} | |
object Main extends App { | |
val sys = ActorSystem("stackable") | |
val act = sys.actorOf(Props[EchoActor]) | |
act ! "BooHoo" | |
act ! "BooHoo" |