I hereby claim:
- I am imacg on github.
- I am imacg (https://keybase.io/imacg) on keybase.
- I have a public key ASB-guKysYLjYWlTY5bzYx438Uh0oYJd_YzNUC9ffKwRHAo
To claim this, I am signing this object:
with import <nixpkgs> {}; | |
let | |
hosts = { "trow.test" = "127.0.0.1"; }; | |
resolv_hosts = writeTextFile { name = "resolv"; text = lib.concatStringsSep "," (lib.mapAttrsToList (h: a: "A ${h} ${a}") hosts); }; | |
nss_hosts = writeTextFile { name = "nss"; text = lib.concatStringsSep "," (lib.mapAttrsToList (h: a: "${a} ${h}") hosts); }; | |
in | |
mkShell { | |
shellHook = '' | |
export RESOLV_WRAPPER_HOSTS=${resolv_hosts} | |
export NSS_WRAPPER_HOSTS=${nss_hosts} |
I hereby claim:
To claim this, I am signing this object:
module Main where | |
import Control.Monad | |
import Control.Concurrent | |
import Control.Concurrent.MVar | |
import System.Mem | |
deadlocker :: IO () | |
deadlocker = void $ forkFinally deadlock exit | |
where deadlock = newEmptyMVar >>= takeMVar |
package ca.imacg.managed | |
import Managed._ | |
object Managed { | |
def resource[A](create: () => A, destroy: A => Unit = (_: A) => ()): Managed[A] = Pure(create, destroy) | |
def pure[A](v: A): Managed[A] = resource(() => v) | |
} | |
sealed trait Managed[A] { |