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 tests | |
import com.twitter.finagle.builder.ClientBuilder | |
import com.twitter.finagle.http.Http | |
import com.twitter.finatra.httpclient.RequestBuilder | |
import com.twitter.util.{Await, Future} | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
import org.scalatest.{BeforeAndAfterAll, FlatSpec, Matchers} |
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
// finagle 6.1.33 | |
class ClientObjectTests extends FlatSpec with Matchers with BeforeAndAfterAll { | |
"A client" should "be closeable" in { | |
val client = | |
ClientBuilder() | |
.dest("localhost:1") | |
.codec(Http()) | |
.hostConnectionLimit(1) | |
.build() |
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
@RunWith(classOf[JUnitRunner]) | |
class ClientObjectTests extends FlatSpec with Matchers with BeforeAndAfterAll { | |
"A client" should "be closeable" in { | |
val client = | |
ClientBuilder() | |
.dest("localhost:1") | |
.codec(Http()) | |
.hostConnectionLimit(1) | |
.build() |
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
public enum Mode { | |
Gen0, | |
Gen1 | |
} | |
//============================= | |
@Data | |
@EqualsAndHashCode(of = "id") | |
public class Node { |
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
#!/usr/bin/env bash | |
ENVIRONMENT=develop | |
MACHINE=$1 | |
shift | |
function print_help(){ |
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
" nerdtree mapping | |
map <F3> :NERDTreeToggle<CR> | |
" enabled mouse | |
set mouse=a | |
" enable osx clipboard | |
set clipboard=unnamed |
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
#compdef test | |
local arguments | |
_branch(){ | |
val=() | |
git branch | grep -v "\*" | while read -r branch ; do | |
val=($val $branch) | |
done |
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
> z;; | |
val it : int [] * int = ([|1|], 1) | |
> p;; | |
val it : int [] * int = ([|1|], 1) | |
> z.Equals(p);; |
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 Foo where | |
import Control.Monad | |
import Common.Utils | |
import Data.List | |
import Data.Maybe | |
newtype Price = Price { getPrice :: Float } deriving (Show, Eq) | |
data Buyable = Meat | Fruit deriving (Show, Eq) |
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
open System | |
type Percent = double | |
type Money = double | |
type Nth = int | |
type ProductType = | |
| Apple | |
| Orange | |
| Poo |