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 net.shrine.api | |
import cats.effect.{ConcurrentEffect, IO} | |
import javax.servlet.annotation.WebListener | |
import javax.servlet.{ServletContextEvent, ServletContextListener} | |
import net.shrine.api.http4s.servlet.syntax.ShrineServletContextSyntax | |
import org.http4s.HttpRoutes | |
import org.http4s.dsl.impl.{->, /} | |
import org.http4s.dsl.io.{GET, Ok, Root, http4sOkSyntax} |
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 net.shrine.utilities.http4sclienttest | |
import cats.effect.IO | |
import io.netty.handler.ssl.{SslContext, SslContextBuilder} | |
import org.asynchttpclient.Dsl | |
import org.asynchttpclient.netty.ssl.InsecureTrustManagerFactory | |
import org.asynchttpclient.proxy.ProxyServer | |
import org.http4s.client.Client | |
import org.http4s.client.asynchttpclient.AsyncHttpClient | |
import org.http4s.headers.Accept |
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 net.shrine | |
import com.typesafe.config.Config | |
package object config { | |
/** | |
* @author dwalend | |
* @since July 17, 2015 | |
* |
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
// pre-render d3 charts at server side | |
var d3 = require('d3') | |
, jsdom = require('jsdom') | |
, fs = require('fs') | |
, htmlStub = '<html><head></head><body><div id="dataviz-container"></div><script src="js/d3.v3.min.js"></script></body></html>' | |
jsdom.env({ | |
features : { QuerySelector : true } | |
, html : htmlStub | |
, done : function(errors, window) { |
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.util.concurrent.atomic.AtomicReference | |
import scala.util.{Failure, Success, Try} | |
import com.typesafe.config.{Config, ConfigFactory} | |
/** | |
Use to tweak a Config without clearing and reloading a new config (for testing). | |
@author dwalend | |
*/ | |
class AtomicConfigSource(baseConfig:Config) { | |
val atomicConfigRef = new AtomicReference[Config](ConfigFactory.empty()) |
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
trait TopTrait { | |
def topDef:String | |
} | |
trait BeyondTrait { | |
def innerThing:InnerTrait | |
trait InnerTrait extends TopTrait{ | |
def innerDef = "innerDef" |