Skip to content

Instantly share code, notes, and snippets.

@kcwill2
kcwill2 / build.sbt
Created April 11, 2016 02:56
sbt dependencies for JMonkeyEngine project
scalaVersion := "2.11.8"
resolvers += Resolver.sonatypeRepo("snapshots")
resolvers += "JCenter" at "https://jcenter.bintray.com"
resolvers += "Official Repo" at "https://updates.jmonkeyengine.org/maven/"
resolvers += "Nifty" at "http://nifty-gui.sourceforge.net/nifty-maven-repo"
@kcwill2
kcwill2 / JVM attach debugger
Last active August 29, 2015 14:08
JVM Attach debugger to remote or local application
VM Options using Windows shared memory for local-attach:
-agentlib:jdwp=transport=dt_shmem,server=y,suspend=n,address=javadebug
or using sockets for remote attach
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
@kcwill2
kcwill2 / GuiActor.scala
Last active October 30, 2015 22:10
a future pinned to the JavaFx app thread
object JavaFXExecutionContext {
implicit val javaFxExecutionContext: ExecutionContext = ExecutionContext.fromExecutor(new Executor {
def execute(command: Runnable): Unit = {
Platform.runLater(command)
}
})
}
...
@kcwill2
kcwill2 / EventBus Implementation
Last active December 15, 2015 00:28
Akka EventBus using SubchannelClassification
package event
import akka.event.ActorEventBus
import akka.event.SubchannelClassification
/**
* classifiers for the sim event dispatch
*/
class SimEventKind()