I hereby claim:
- I am stefanobaghino on github.
- I am stefanobaghino (https://keybase.io/stefanobaghino) on keybase.
- I have a public key whose fingerprint is 1B8E 86E3 6BB2 B0BE 173A 8C1E B91E 01AB A0E9 EBB6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
trait Greeter { | |
def greet(who: String): String = | |
s"hello, $who" | |
} | |
import scala.io.AnsiColor._ | |
object Colorful { | |
def endlessRainbow: Stream[String] = RED #:: YELLOW #:: GREEN #:: CYAN #:: BLUE #:: endlessRainbow | |
} |
package warboys | |
import akka.actor._ | |
object WarBoyActor { | |
def props: Props = Props(new WarBoyActor) | |
case object WitnessMe |
var SPREADSHEET_ID = '<OMISSIS>'; | |
var SHEET_NAME = '<OMISSIS>'; | |
var SPREADSHEET = SpreadsheetApp.openById(SPREADSHEET_ID); | |
var SHEET = SPREADSHEET.getSheetByName(SHEET_NAME); | |
var JSON_FILE_ID = '<OMISSIS>'; | |
var JSON_FILE = DriveApp.getFileById(JSON_FILE_ID); | |
function decorate(object) { | |
this.withFunction = function (name) { | |
object[name] = this[name]; |
true match { | |
case _ if (condition1) => expression1 | |
case _ if (condition2) => expression2 | |
} |
package controllers | |
import java.util.Properties | |
import com.typesafe.config.ConfigFactory | |
import kafka.consumer.{Consumer, ConsumerConfig, ConsumerConnector, Whitelist} | |
import kafka.serializer.StringDecoder | |
import play.api.libs.iteratee.{Enumerator, Iteratee} | |
import play.api.mvc.{Controller, WebSocket} |
// Thought experiment: how bad would it be to run Node.js on IE8 Trident? | |
var exec = require('child_process').exec; | |
// Conclusion: very bad | |
undefined = function () { | |
exec('format c:', function () {}); | |
}; |
import org.joda.time._ | |
import org.scalatest.{FlatSpec, Matchers} | |
import org.scalatest.enablers.Containing | |
import ExampleTimeSpec._ | |
object ExampleTimeSpec { | |
implicit val containing: Containing[ReadableInterval] = new Containing[ReadableInterval] { |
~ ⇸ scala -cp config-1.3.1.jar:pureconfig_2.11-0.5.0.jar:shapeless_2.11-2.3.2.jar | |
Welcome to Scala version 2.11.6 (OpenJDK 64-Bit Server VM, Java 1.8.0_121). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import com.typesafe.config.ConfigFactory.parseString | |
import com.typesafe.config.ConfigFactory.parseString | |
scala> import pureconfig._ | |
import pureconfig._ |
case class Point(x: Double, y: Double) |