Skip to content

Instantly share code, notes, and snippets.

View luciferous's full-sized avatar
🏠
Working from home

Neuman Vong luciferous

🏠
Working from home
View GitHub Profile
@luciferous
luciferous / gist:1846c46b9870cbd729ce
Last active December 1, 2015 07:31 — forked from anonymous/gist:7aa72601f708150a2870
HttpStreamingServer for mpeg2 videos
import com.twitter.finagle.http
import com.twitter.conversions.time._
import com.twitter.finagle.http.{Request, Response, Status}
import com.twitter.finagle.{Http, Service}
import com.twitter.io.{Buf, Reader, Writer}
import com.twitter.util.{Await, Future, Base64StringEncoder}
import sys.process._
object HttpStreamingServer extends App {
package com.twitter.finagle.util
//import language.{ higherKinds, implicitConversions }
trait Unapply[TC[_[+_]], FA] {
type F[+_]
type A
def TC: TC[F]
def apply(fa: FA): F[A]
}