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
build: | |
rm -f ./build/protonpack && go build -o build/ ./cmd/protonpack | |
CMDPATHS := $(patsubst %/, %, $(dir ./cmd/*/)) | |
buildall: | |
go build -o build/ $(CMDPATHS) | |
clean: | |
rm -fr ./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
let ntlmHttpClient = new HttpClient(new HttpClientHandler(UseDefaultCredentials = true)) | |
let createRequestWithNtlm (method: HttpMethod) (url: string) = | |
Uri (url) |> Request.createWithClient ntlmHttpClient method | |
let request1 = | |
"http://lolurl" | |
|> createRequestWithNtlm Get |
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
thing l = map (\x -> if (count x lower) > 1 then ')' else '(' ) lower | |
where lower = map toLower l | |
count n = length . filter (==n) | |
-- λ: thing "SucCess" == ")())())" | |
-- True | |
-- λ: thing "din" == "(((" | |
-- True | |
-- λ: thing "recede" == "()()()" |
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
@REM SBT launcher script | |
@REM | |
@REM Envioronment: | |
@REM JAVA_HOME - location of a JDK home dir (mandatory) | |
@REM SBT_OPTS - JVM options (optional) | |
@REM Configuration: | |
@REM sbtconfig.txt found in the SBT_HOME. | |
@REM ZOMG! We need delayed expansion to build up CFG_OPTS later | |
@setlocal enabledelayedexpansion |
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
@JSExport | |
object ScalaJSExample { | |
def fizzBuzz(a: List[Int], divisor1: Int, divisor2: Int): List[Any] = { | |
a.map { | |
x => | |
((x % divisor1 == 0, x % divisor2 == 0) match { | |
case (true, false) => "fizz" | |
case (false, true) => "buzz" | |
case (true, true) => "fizzbuzz" |