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/sh | |
set -e | |
bucket="$1" | |
if [ -z "$1" ]; then | |
echo "Using: list-public-s3-objects BUCKET" | |
exit 1 | |
fi |
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/sh | |
set -e | |
colors() { | |
cat <<EOS | |
acid | |
aero | |
alabaster | |
alizarin |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: example | |
namespace: default | |
data: | |
APPLICATION_HOST: example.com | |
LANG: en_US.UTF-8 | |
PIDFILE: /tmp/server.pid | |
PORT: "3000" |
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 cats.effect.{ContextShift, IO} | |
import cats.effect.concurrent.Ref | |
import cats.implicits._ | |
import fs2.{Chunk, Pipe, Stream} | |
class BufferedCommitter( | |
config: Config, | |
consumer: Consumer, | |
pipe: Pipe[IO, Record, Unit])(implicit cs: ContextShift[IO]) { | |
def run: IO[Unit] = |
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 cats.{Applicative, Functor} | |
import cats.data.EitherT | |
import scala.language.higherKinds | |
object EitherTF { | |
def apply[F[_], A]: EitherTPartiallyApplied[F, A] = | |
new EitherTPartiallyApplied[F, A] | |
} |
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 cats.data.EitherT | |
import cats.instances.future._ | |
import cats.syntax.all._ | |
import scala.concurrent.{ExecutionContext, Future} | |
/* | |
* Compiled with: | |
* Scala 2.12.4 | |
* cats-core 1.0.0-RC1 | |
* -Ypartial-unification |
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 ops.hlist._ | |
case class Wrap2[T, U](t: T, u: U) | |
class WrapTest[T, WL <: HList, L <: HList] { | |
def unwrap | |
(wrapped: WL) | |
(implicit comapped: Comapped.Aux[WL, ({ type l[U] = Wrap2[T, U] })#l, L]) | |
= true |
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
{ | |
"global": { | |
"responsive": true, | |
"responsiveAnimationDuration": 0, | |
"maintainAspectRatio": true, | |
"events": [ | |
"mousemove", | |
"mouseout", | |
"click", | |
"touchstart", |
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
{-# LANGUAGE Arrows #-} | |
import Control.Arrow | |
double :: Int -> Int | |
double x = x * 2 | |
triple :: Int -> Int | |
triple x = x * 3 |
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
module Test.Hspec.JSON | |
( shouldBeJson | |
) where | |
import Control.Monad (when) | |
import Control.Monad.State (StateT, get, modify, runStateT) | |
import Control.Monad.Writer (Writer, execWriter, tell) | |
import Data.ByteString.Lazy (ByteString) | |
import Data.Function (on) | |
import Data.Monoid ((<>)) |
NewerOlder