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
/* | |
from https://golang.org/src/crypto/tls/generate_cert.go | |
*/ | |
// Copyright 2009 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// +build ignore |
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 draft | |
import arrow.* | |
import arrow.core.* | |
import arrow.data.* | |
import arrow.syntax.option.* | |
import arrow.typeclasses.* | |
import arrow.instances.* | |
typealias Stack = Option<Nel<String>> |
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
empty |
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 env = require('node-env-file'); | |
var Github = require('github-api'); | |
var Q = require('q'); | |
env(__dirname + '/.env'); | |
var github = new Github({ | |
username: "evantill", | |
password: process.env.GITHUB_PASSWORD, | |
auth: "basic" |
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
//scalaVersion := "2.10.3" | |
object CompileError { | |
import collection.immutable.Queue | |
type IntQueue = Queue[Int] | |
val IntQueue = Queue | |
val q: IntQueue = IntQueue.empty[Int] | |
def add(elem:Int):IntQueue = q.enqueue(elem) |
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 scalaio | |
import shapeless._, poly._ | |
object list extends (Id ~> List) { | |
def apply[T](t : T) = List(t) | |
} | |
object headOption extends (List ~> Option) { | |
def apply[T](l : List[T]) = l.headOption |
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
trait SprayContribForRequestTransformer { | |
object HttpRequestBuilderLens { | |
val queryLens = new Lens[Uri, Query] { | |
def get(c: Uri): Query = c.query | |
def set(c: Uri)(f: Query): Uri = c.copy(query = f) | |
} | |
val uriLens = new Lens[HttpRequest, Uri] { |
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
/** | |
* Created with IntelliJ IDEA. | |
* User: evantill | |
* Date: 01/07/13 | |
* Time: 12:22 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
object PointBarre extends App { | |
case class Point2D(x: Int, y: Int) { |
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 puzzle | |
import scalaz._ | |
import Scalaz._ | |
import scala.language.higherKinds | |
/** | |
* Created with IntelliJ IDEA. | |
* User: evantill | |
* Date: 11/06/13 |
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 scalaz.Order | |
import scalaz.syntax.order._ | |
case class MyRange[A: Order](l: A, h: A){ | |
def myMethod(b: MyRange[A]): MyRange[A] = { | |
MyRange[A](l min b.l, h max b.h) | |
} | |
} | |
object MyRange { |
NewerOlder