Skip to content

Instantly share code, notes, and snippets.

View jhigdon's full-sized avatar
🦝
trash panda coding

Jonathan Higdon jhigdon

🦝
trash panda coding
View GitHub Profile
@jhigdon
jhigdon / Makefile
Created February 2, 2022 01:33
go makefile
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
@jhigdon
jhigdon / wat.fs
Created June 18, 2019 00:39
Http.Fs ntlm / accept any cert
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
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" == "()()()"
@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
@jhigdon
jhigdon / abcdefg
Last active August 29, 2015 14:01
@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"