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
val requestCount = io.prometheus.client.Counter.build().name("http_requests").help("HTTP requests").register() | |
val requestLatency = io.prometheus.client.Histogram.build().name("http_latency").help("HTTP requests latency").labelNames("code").register() | |
/* | |
Example usage: | |
trackPrometheusMetrics { | |
complete("OK") | |
} | |
*/ |
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 android | |
import android.app.Activity | |
import android.content.Context | |
import android.hardware._ | |
/** Listen to device Orientation changes. | |
* | |
* Note: if you use libgdx your the work is already done in Gdx.input.getRotationMatrix() and Gdx.input.getPitch() | |
*/ |
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
val hotswapAgentJarPath = Def.settingKey[Option[String]]("Path to hotswap-agent.jar, enables DCEVM in run and reStart") | |
// set hotswapAgentJarPath := Some("/Users/lbedubourg/local/hotswap-agent.jar") | |
hotswapAgentJarPath := sys.env.get("HOTSWAP_AGENT_JAR") | |
def hotswapJavaOptions(path: Option[String]) = path match { | |
case None => Seq() | |
case Some(p) => Seq("-XXaltjvm=dcevm", s"-javaagent:${p}=autoHotswap=true") | |
} |
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
import promhx.*; | |
import js.Node; | |
class User { | |
public var id : Int; | |
public var name : String; | |
public function new(id, name){ | |
this.id = id; | |
this.name = name; |
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
# openFrameworks OS X makefile | |
# | |
# make help : shows this message | |
# make Debug: makes the application with debug symbols | |
# make Release: makes the app with optimizations | |
# make: the same as make Release | |
# make CleanDebug: cleans the Debug target | |
# make CleanRelease: cleans the Release target | |
# make clean: cleans everything | |
# |