Skip to content

Instantly share code, notes, and snippets.

@Wizek
Wizek / nix-package-search
Created December 3, 2017 04:07 — forked from olejorgenb/nix-package-search
nix-package-search
@Wizek
Wizek / NamedDefaults.hs
Created April 24, 2018 06:16 — forked from int-index/NamedDefaults.hs
named-defaults
{-# LANGUAGE KindSignatures, DataKinds, FlexibleInstances, FlexibleContexts,
FunctionalDependencies, TypeFamilies, TypeOperators,
PatternSynonyms, UndecidableInstances, ConstraintKinds,
TypeApplications, ScopedTypeVariables, CPP #-}
module NamedDefaults (FillDefaults, fillDefaults, (!.)) where
import Prelude (Maybe(..), id)
import Data.Kind (Type)
@Wizek
Wizek / Bag.purs
Created May 3, 2018 10:06 — forked from i-am-tom/Bag.purs
PureScript port of Will Jones' type-indexed config "bag".
module Main where
import Control.Alternative ((<|>))
import Control.Apply (lift2)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, logShow)
import Data.Argonaut.Core (Json)
import Data.Argonaut.Decode (class DecodeJson, decodeJson)
import Data.Argonaut.Encode (class EncodeJson, encodeJson)
import Data.Either (hush)
@Wizek
Wizek / EvilList.hs
Created October 8, 2018 12:19 — forked from ion1/0readme.md
Emulating the elegance of JavaScript's `new Array` in Haskell
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables, TypeApplications, TypeFamilies #-}
module EvilList where
import Data.Typeable
type family EvilListContent a where
EvilListContent Int = ()
EvilListContent a = a
@Wizek
Wizek / stress-memory-1.js
Last active August 19, 2020 14:23 — forked from Eomm/stress-memory.js
Check when your server goes out of memory
/**
node --max-old-space-size=4048 --initial-old-space-size=4048 --max-heap-size=4048 stress-memory-1.js
x64
rss 7.62 GB
heapTotal 3.74 GB
heapUsed 3.73 GB
*/