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 DeriveFamily { | |
def minimal: Any = macro DeriveFamilyMacros.minimal | |
} | |
object DeriveFamilyMacros { | |
class body(tree: Any) extends StaticAnnotation | |
def bodyImpl(c: Context) = { | |
import c.universe._ |
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 shapeless._ | |
import shapeless.ops.coproduct.Inject | |
import shapeless.ops.record.Selector | |
trait Distinct[U <: Coproduct] extends DepFn1[U] { | |
type Out <: Coproduct | |
} | |
trait DistinctLowPriority { | |
implicit def take[U <: Coproduct, X](implicit rest: Distinct[U]): Distinct.Aux[X :+: U, X :+: rest.Out] = |
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
::: {Lunatik}{Y0JLJZ79TJWte1v8UcDeuw}{172.31.31.81}{172.31.31.81:9300} | |
Hot threads at 2017-01-04T08:52:28.643Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: | |
::: {Ursa Major}{cFtE1408RBStaL2cnRE8eA}{172.31.19.204}{172.31.19.204:9300} | |
Hot threads at 2017-01-04T08:52:28.627Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: | |
::: {Maxam}{KXphMUJITqu2J33NAWSsHA}{172.31.37.191}{172.31.37.191:9300} | |
Hot threads at 2017-01-04T08:52:28.626Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: | |
::: {Gorilla Girl}{rAwO6sHyTta_0yFsCbHC3w}{172.31.19.202}{172.31.19.202:9300} |
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
{ | |
"cluster_name":"prod-elasticsearch", | |
"nodes":{ | |
"Y0JLJZ79TJWte1v8UcDeuw":{ | |
"name":"Lunatik", | |
"transport_address":"172.31.31.81:9300", | |
"host":"172.31.31.81", | |
"ip":"172.31.31.81", | |
"version":"2.4.1", | |
"build":"c67dc32", |
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
{ | |
"cluster_name":"prod-elasticsearch", | |
"nodes":{ | |
"Y0JLJZ79TJWte1v8UcDeuw":{ | |
"timestamp":1483519938561, | |
"name":"Lunatik", | |
"transport_address":"172.31.31.81:9300", | |
"host":"172.31.31.81", | |
"ip":[ | |
"172.31.31.81:9300", |
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 astrac.engine | |
import cats._ | |
import cats.syntax._ | |
import scala.annotation.tailrec | |
object mk4 { | |
trait State[S, D, T] { | |
def semigroup: Semigroup[S] | |
def derivate: mk4.Derivate[D, 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
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(defun ensure-package-installed (&rest packages) | |
"Assure every package is installed, ask for installation if it’s not. | |
Return a list of installed packages or nil for every skipped package." | |
(mapcar |
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 shapeless._ | |
import shapeless.ops.hlist._ | |
sealed trait SameSize[L1 <: HList, L2 <: HList] | |
object SameSize { | |
def apply[L1 <: HList, L2 <: HList] = new SameSize[L1, L2] {} | |
implicit def hnilHasSameLength = SameSize[HNil, HNil] |
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 kvstore | |
import akka.actor._ | |
import akka.util.Timeout | |
import akka.pattern.ask | |
import scala.concurrent.duration._ | |
object RetryingActor { | |
case class Start[T](target: ActorRef, message: T, rate: FiniteDuration, maxAttempts: Int) | |
case object Retry |