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
var stats = { | |
time : function(metric, f) { | |
f() | |
}, | |
get_time_ms: function(metric) { | |
// it's async, so everything is fast | |
return 0 | |
} | |
} |
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
<html> | |
<body> | |
0-0 | |
</body> | |
</html> |
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
[warn] /Users/mmcbride/projects/xsbt/main/Structure.scala:376: match is not exhaustive! | |
[warn] missing combination * KNil * | |
[warn] protected def convertK[M[_],R](f: (M[A],M[B]) => R) = { case a :^: b :^: KNil => f(a,b) } | |
[warn] ^ | |
[warn] /Users/mmcbride/projects/xsbt/main/Structure.scala:383: match is not exhaustive! | |
[warn] missing combination * KNil * * | |
[warn] protected def convertK[M[_],R](f: Fun[M,R]) = { case a :^: b :^: c :^: KNil => f(a,b,c) } | |
[warn] ^ | |
[warn] /Users/mmcbride/projects/xsbt/main/Structure.scala:390: match is not exhaustive! |
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
/** | |
* Autogenerated by Thrift | |
* | |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | |
*/ | |
package com.twitter.gizzard.testserver.thrift; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.Map; |
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 java.net._ | |
import java.util.UUID | |
import com.twitter.conversions.time._ | |
import com.twitter.finagle.builder.ClientBuilder | |
import com.twitter.util._ | |
import java.nio.charset.Charset | |
import org.jboss.netty.buffer.{ChannelBuffers, ChannelBuffer} | |
import org.jboss.netty.handler.codec.http._ | |
import com.twitter.finagle.stream.Stream |
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 com.twitter.sbt | |
import sbt._ | |
import sbt.Keys._ | |
import sbt.Project.Initialize | |
import sbt.Process._ | |
import scala.collection.JavaConversions._ | |
import java.io.File | |
object CompileThrift extends Plugin { |
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 com.twitter.concurrent.{ChannelSource, Channel} | |
import com.twitter.util.Future | |
class ReliableChannel[A](f: => Channel[B]) extends ChannelSource[A] { | |
this.serialized { | |
val that = f | |
val observer = that.respond { msg => | |
Future.join(this.send(msg)) | |
} | |
that.closes ensure { |
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 manager = new SimpleHttpConnectionManager(true) | |
val connectionParams = new HttpConnectionManagerParams() | |
val connectTimeoutMs = 500 | |
val socketTimeoutMs = 15000 | |
connectionParams.setConnectionTimeout(connectTimeoutMs) | |
connectionParams.setSoTimeout(socketTimeoutMs) | |
manager.setParams(connectionParams) | |
client = new HttpClient(manager) |
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 java.lang.reflect.Method | |
class Sendable(a: AnyRef) { | |
val methods = a.getClass.getDeclaredMethods | |
def wrapByte(b: Byte) = new java.lang.Byte(b) | |
def wrapShort(s: Short) = new java.lang.Short(s) | |
def wrapInt(i: Int) = new java.lang.Integer(i) | |
def wrapLong(l: Long) = new java.lang.Long(l) | |
def wrapFloat(f: Float) = new java.lang.Float(f) |
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
// generate ensime config | |
lazy val genEnsime = task (args => { | |
if (args.length == 1) { | |
genEnsimeConstructor(args(0).toString) | |
} else { | |
task { Some("Usage: gen-ensime <project package name>") } | |
} | |
}) describedAs("Generate a .ensime file for this project") | |
def genEnsimeConstructor(packageName: String) = task { |