Skip to content

Instantly share code, notes, and snippets.

ochrons / WorkerMain.scala
Created May 25, 2016
Web Worker PoC in Scala.js
View WorkerMain.scala
package poc
import org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.annotation.JSExport
object WorkerGlobal extends js.GlobalScope {
def addEventListener(`type`: String, f: js.Function): Unit = js.native
View WSServer.scala
import{SocketOptions, Inet4Address, InetAddress, Socket}
import java.util.concurrent.TimeoutException
import{ActorRef, Props, ActorSystem}
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpMethods._
import akka.http.scaladsl.model._
import akka.routing.BroadcastGroup

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp
You can’t perform that action at this time.