yum install -y systemd-networkd
modprobe macvlan # make sure this returns no errors
eth0.network
and mac0.{netdev,network}
go in /etc/systemd/network/
package m | |
import akka.stream.scaladsl._ | |
import akka.stream._ | |
import akka.actor._ | |
import akka.stream.stage._ | |
import scala.collection.mutable | |
trait IngestionMethods[A] { | |
def submit(value: A): Unit |
package m | |
import akka.stream.scaladsl._ | |
import akka.stream._ | |
import akka.actor._ | |
object Main extends App { | |
implicit val system = ActorSystem("hi") | |
implicit val materializer = ActorMaterializer() | |
implicit val ec = system.dispatcher |
package m | |
import akka.stream.scaladsl._ | |
import akka.stream._ | |
import akka.actor._ | |
object Main extends App { | |
implicit val system = ActorSystem("hi") | |
implicit val materializer = ActorMaterializer() | |
implicit val ec = system.dispatcher |
(defvar scala-test:main-file-format | |
"%s/src/main/scala/%s%s.scala" | |
"scala test format") | |
(defvar scala-test:test-file-format | |
"%s/src/test/scala/%s%sSpec.scala" | |
"scala test format") | |
;; (setq scala-test:main-file-format "%s/src/main/scala/%s%s.scala") | |
;; (setq scala-test:test-file-format "%s/src/test/scala/%sTest%s.scala") |
import scala.language.higherKinds | |
implicit class FlowUnmarshalling[I[P1, P2] <: FlowOps[P1, P2], M](val f: I[HttpResponse, M]) { | |
// Throws IOException on error | |
def unmarshallSuccess[T](implicit um: Unmarshaller[HttpEntity, T], ec: ExecutionContext, m: Materializer): I[HttpResponse, M]#Repr[T] = { | |
f.mapAsync(1) { response => | |
if (response.status.isSuccess) | |
um(response.entity) | |
else | |
throw new IOException("invalid status code: "+ response.status) | |
} |
# Save this file to ~/.multirust/Makefile | |
# to run, cd ~/.multirust; make toolchains/1.3.0/src | |
.PHONY: clean | |
rust.git: | |
git clone https://github.com/rust-lang/rust.git --bare | |
toolchains/nightly/src: toolchains/master/src | |
ln -sf $$(pwd)/toolchains/master/src $$(pwd)/$@ |
protected [helpers] val singleSession = databaseConnection.createSession | |
val noDataSource = new JdbcDataSource { | |
def createConnection(): Connection = throw new RuntimeException("Tried to allocate another connection in test mode. This is an issue because the test database assumes that only one database connection in used. RolledbackDatabase needs to be improved.") | |
def close(): Unit = () | |
} | |
// backend.BaseSession | |
class DelegatingSession(session: backend.SessionDef) extends backend.SessionDef { | |
override def database = session.database |
package m | |
import shapeless.HMap | |
object leData { | |
object Name | |
object Age | |
object Address | |
object Street |
// psuedo-code; will not actually compile | |
import com.spingo.op_rabbit.Json4sSupport._ // allows you to use Json4s directly to serialize / deserialize published messages | |
trait MarketOrEv | |
case class Market(mkt_id: Int, ev_id: Int, model_type:”Market”) extends MarketOrEv | |
case class Ev(ev_id: Int, model_type:”Ev”) extends MarketOrEv | |