Skip to content

Instantly share code, notes, and snippets.

Avatar

chessai chessai

View GitHub Profile
View .env
# Images
CHAINWEB_NODE_IMAGE=ghcr.io/kadena-io/chainweb-node:sha-8a7ef72
# latest: ghcr.io/kadena-io/chainweb-node/ubuntu:latest
# openapi-validation: # ghcr.io/kadena-io/chainweb-node:sha-8a7ef72
MINING_CLIENT_IMAGE=ghcr.io/kadena-io/chainweb-mining-client:latest
# Ports that are exposed on the host system
HOST_SERVICE_PORT=8080
HOST_STRATUM_PORT=1917
@chessai
chessai / bench_report_no_simd.html
Last active April 19, 2023 22:10
Criterion Benchmark HTML reports (Just encoding right now)
View bench_report_no_simd.html
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>criterion report</title>
<script>
/*!
* Chart.js v2.9.4
* https://www.chartjs.org
* (c) 2020 Chart.js Contributors
View gist:fcde80787c2623e05e059bffd4bd6906
/nix/store/m1kb6fz7sbilmqw96w74aswgbqc9kiim-bash-4.4-p23-dev
/nix/store/dpiqx8km6kaf9v1kpavdmmy1yb149c98-bash-4.4-p23-doc
/nix/store/fky90f457av1jf9jlrlh7r60zcd8fpfs-bash-4.4-p23-info
/nix/store/mwvrsjsca4wbnwdggdn30bdmrc8ssxf3-bash-4.4-p23-man
/nix/store/qvm6bs79rsychid8xxwpyn23kapszmk5-bash-4.4-p23
/nix/store/128cyl1jys9nb3a373cx6j1mhx2rgpga-coreutils-8.31-info
/nix/store/sc8d93z8sc776j1qh1f8cq4y3cngmsbb-coreutils-8.31
/nix/store/hsgl306w10wnrqsmrjb3824g1bhx3n1c-gnused-4.8-info
/nix/store/wf9x52iznlnb9kq8i86dd1mx56j7f6mg-gnused-4.8
/nix/store/n6zydd3937r8fx2dppw10lhz4vsxjzpf-stdenv-darwin
View Models.swift
//swiftlint:disable line_length type_name
//
// DO NOT EDIT THIS FILE
// IT HAS BEEN AUTOMATICALLY GENERATED
// BY THE FOLLOWING CODE: https://github.com/MercuryTechnologies/mercury-web-backend
// AT TIME: 2021-01-25T19:56:58 UTC
//
import Foundation
View prop.hs
{-# language QuasiQuotes #-}
import Examples.Sudoku
import Text.RawString.QQ (r)
-- | The world's hardest sudoku problem, with only 4 starting numbers.
-- Found here: youtube.com/watch?v=hAyZ9K2EBF0
ultimateProblem :: String
ultimateProblem = [r|
.........
@chessai
chessai / haskell.hs
Created January 15, 2020 03:12
Swift typegen
View haskell.hs
data M (a :: k) = MkM
getShwifty ''M
data OneTyVar a = OneTyVar
{ one :: Either (Maybe a) (Maybe a)
, two :: Maybe (Maybe (Maybe (Maybe a)))
}
getShwifty ''OneTyVar
data K a = K { getK :: a, getInt :: Int }
View Layer3JobPosting.md

Programmer: Atlanta, GA, No Remote, Full-Time

Layer 3 Communications is a professional services organization and network systems integrator. We use Haskell to build network security applications that revolve around either analyzing network data or configuring networks.

Networking knowledge can be learned on the job, and thus is not required.

Our stack:

  • Backend: Haskell
  • Frontend: Small amounts of JavaScript
  • Database: Postgres
@chessai
chessai / regex.hs
Created November 8, 2019 02:24
regex
View regex.hs
data Regex t
= RegexLiteral t t
--^ low and high, inclusive
| RegexEmpty
| RegexRejection
| RegexUnion (Regex t) (Regex t)
| RegexAppend (Regex t) (Regex t)
| RegexStar (Regex t)
instance Semiring (Regex t) where
View gist:86ead95bf00faeeb411b55a59c5c98f7
/nix/store/yhlyxjn0s57g0y18gnmak9fj33ynff5h-ghc-8.6.5-with-packages/lib/ghc-8.6.5/package.conf.d
Cabal-2.4.0.1
HUnit-1.6.0.0
QuickCheck-2.12.6.1
RSA-2.3.1
SHA-1.6.4.4
StateVar-1.1.1.1
adjunctions-4.4
aeson-1.4.4.0
ansi-terminal-0.9.1
@chessai
chessai / conv.hs
Created October 4, 2019 13:48
bytearray <===> bytestring
View conv.hs
-- | Like 'unsafeByteArrayToByteString', but might perform a copy
-- if the 'ByteArray' is not pinned.
byteArrayToByteString :: ByteArray -> ByteString
byteArrayToByteString b@(ByteArray b#)
| isTrue# (isByteArrayPinned# b#) = unsafeByteArrayToByteString b
| otherwise = runST $ do
let len = sizeofByteArray b
marr@(MutableByteArray marr#) <- newPinnedByteArray len
copyByteArray marr 0 b 0 len