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
import akka.actor._ | |
import akka.http.model.HttpMethods._ | |
import akka.http.model._ | |
import akka.stream.scaladsl._ | |
import akka.stream.scaladsl.Flow | |
import play.modules.reactivemongo.json.BSONFormats | |
import reactivemongo.bson.BSONDocument | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import play.api.libs.json._ |
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
<!DOCTYPE html> | |
<html ng-app="helloworld"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Minimal angular.js</title> | |
<link rel="stylesheet" href="css/foundation.css" /> | |
<style> | |
.tile { | |
background: #ffeeee; | |
} |
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 main | |
import ( | |
"encoding/json" | |
"fmt" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
"io" | |
"math/rand" | |
"net/http" |
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
object ReadSample extends App { | |
/** | |
* The readable trait defines how objects can be converted from a string | |
* representation to the objects instance. For most of the standard types | |
* we can simply use the toType function of String. | |
*/ | |
trait Readable[T] { | |
def read(x: String): T | |
} |
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
import java.net.{SocketOptions, Inet4Address, InetAddress, Socket} | |
import java.util.concurrent.TimeoutException | |
import akka.actor.{ActorRef, Props, ActorSystem} | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model.HttpMethods._ | |
import akka.http.scaladsl.model._ | |
import akka.http.scaladsl.model.ws._ | |
import akka.io.Inet | |
import akka.routing.BroadcastGroup |
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
* { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
span { | |
font-size: smaller; | |
} |
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 org.smartjava.dw | |
import java.io.{File, FileInputStream} | |
import com.github.mtailor.srtdissector.SrtDissector | |
import scala.annotation.tailrec | |
import scala.collection.immutable.ListMap | |
import scala.io.Source | |
import scala.util.{Failure, Success} |
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 Boot | |
import akka.actor.{Cancellable, Actor, ActorSystem, Props} | |
import akka.stream.{OverflowStrategy, ActorFlowMaterializer} | |
import akka.stream.actor.ActorSubscriberMessage.{OnComplete, OnNext} | |
import akka.stream.actor.{ActorSubscriber, OneByOneRequestStrategy, RequestStrategy} | |
import akka.stream.scaladsl._ | |
import org.akkamon.core.exporters.StatsdExporter | |
import org.akkamon.core.instruments.{CounterTrait, LoggingTrait, TimingTrait} |
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
import java.io.File | |
import akka.actor._ | |
import akka.routing.{Routee, RemoveRoutee, ActorRefRoutee, AddRoutee} | |
import akka.stream.actor.ActorPublisher | |
import org.akkamon.core.ActorStack | |
import org.akkamon.core.instruments.CounterTrait | |
import play.api.libs.json.Json | |
import scala.annotation.tailrec | |
import scala.concurrent.duration._ |
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 handlers | |
import ( | |
"net/http" | |
"github.com/josdirksen/slackproxy/config" | |
"strings" | |
"net/url" | |
) | |
// Define a simple interface. Which provides access to the command that needs to be | |
// executed and the response writer, so that the handler can send information back. |
NewerOlder