This file contains 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 akka.unfiltered | |
import akka.actor._ | |
import akka.dispatch.Future | |
import akka.pattern.ask | |
import akka.util.duration._ | |
import akka.util.Timeout | |
import unfiltered.Async | |
import unfiltered.request._ |
This file contains 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
// This is the part in the Controller that creates the EventSource connection | |
def liveListen(event: String) = Action { request => | |
AsyncResult { | |
implicit val timeout: Timeout = 5.seconds | |
(MegaRoomActor.ref ? (MegaRoomActor.Join(event)) ). | |
mapTo[Enumerator[JsValue]].map(startEventStream) | |
} | |
} |
This file contains 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 on = window.Terminal.on; | |
var isGecko = navigator.userAgent.indexOf('WebKit')==-1 && navigator.product == 'Gecko'; | |
var isChromium = window.chrome; | |
// replace bindPaste with a variant that: | |
// 1. doesn't set contentEditable back to 'inherit' | |
// 2. replaces newlines with carriage returns in the clip | |
// 3. moves the caret (i.e. the contentEditable cursor) out of sight. | |
window.Terminal.bindPaste = function(document) { |
This file contains 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
#!/bin/vbash | |
source /opt/vyatta/etc/functions/script-template | |
configure | |
loadkey vyos http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | |
set service ssh disable-password-authentication | |
commit |
This file contains 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 sample.stream | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model.headers.RawHeader | |
import akka.http.scaladsl.server.Route | |
import akka.stream.ActorFlowMaterializer | |
import akka.stream.scaladsl.{Sink, Source} | |
object Proxy extends App { |
This file contains 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
{ mkDerivation, base, exeBuildDepends, exeBuildToolDepends | |
, exeBuildTools, exeExtraLibraries, exePkgConfig, intBuildDepends | |
, intBuildToolDepends, intBuildTools, intExtraLibraries | |
, intPkgConfig, libBuildDepends, libBuildToolDepends, libBuildTools | |
, libExtraLibraries, libPkgConfig, stdenv, testBuildDepends | |
, testBuildToolDepends, testBuildTools, testExtraLibraries | |
, testPkgConfig | |
}: | |
mkDerivation { | |
pname = "example"; |
This file contains 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
# Haskell Program Coverage - Makefile | |
# | |
# This Makefile contains a few top-level build commands for easily making | |
# code coverage reports using stack and hpc. It is typically used in two | |
# ways: | |
# | |
# a) Locally, to construct an coverage overlay template to purposely ignore | |
# some part of the source code in the coverage reports. | |
# | |
# b) In a continuous integration setup, to generate reports possibly using the |