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
{-# LANGUAGE RecursiveDo, ScopedTypeVariables, FlexibleContexts #-} | |
import Reflex.Dom | |
import Data.Monoid | |
import Control.Monad | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
insertNew_ :: (Enum k, Ord k) => v -> Map k v -> Map k v | |
insertNew_ v m = case Map.maxViewWithKey m of |
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
import GHCJS.DOM | |
import GHCJS.DOM.Document | |
import GHCJS.DOM.Element | |
import GHCJS.DOM.Event | |
import GHCJS.DOM.EventM | |
import GHCJS.DOM.MouseEvent | |
import GHCJS.DOM.Types | |
import Control.Monad | |
import Control.Monad.IO.Class |
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
templateRenderCanvas qrcInfoD cnvInfo newBaseImage initialBaseImage = do | |
cnvRef <- liftIO $ mkCanvas' cnvInfo | |
qrcInfo <- sample $ current qrcInfoD | |
imgRef <- liftIO $ canvasDisplay cnvRef imgInfo | |
qrcRef <- liftIO $ canvasDisplay cnvRef qrcInfo | |
liftIO $ canvasAddChild cnvRef imgRef | |
liftIO $ imageAddChild imgRef qrcRef | |
return () |
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
import Reflex.Dom | |
main = mainWidget $ do | |
bChangeWidget <- button "changeWidget" | |
el "div" $ widgetHold (text "placeholder") $ fmap (\_ -> text "changed") bChangeWidget | |
return () |
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
networking.nat = { | |
enable = true; | |
internalInterfaces = ["ve-+"]; | |
externalInterface = "enp6s0"; | |
forwardPorts = [ | |
{ sourcePort = 3000; destination = "192.168.100.2:3000"; } | |
]; | |
}; | |
containers = { |
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
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file }: | |
let version = "1.1.2-1"; | |
printerName = "hl3170cdw"; | |
lprDownloadId = "007056"; | |
cupswrapperDownloadId = "007058"; | |
in stdenv.mkDerivation rec { | |
name = "${printerName}-cupswrapper-${version}"; | |
inherit version; | |
srcs = |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecursiveDo #-} | |
import Control.Monad (ap) | |
import Control.Monad.Trans (lift) | |
import Data.Semigroup (First (..)) | |
import Data.Text (Text) | |
import qualified Data.Text as T | |
import Reflex.Dom | |
newtype MonoidalWidget t m e = MonoidalWidget { unMonoidalWidget :: EventWriterT t (First e) m () } |
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
{ config, lib, pkgs, ... }: | |
#TODO: Hairpinning | |
#TODO: WiFi AP | |
# - NAT | |
# - DHCP | |
with lib; | |
let externalInterface = "enp1s0"; |
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
unpacking sources | |
unpacking source archive /nix/store/c36x4l6a4raqxc9krkf3nbrv4kwfxk3h-source | |
source root is source | |
patching sources | |
applying patch /nix/store/bn2glwzfc4dwdqzbdsyd9jawn9f694vr-1230afb211f85e0cdf5fb10c9becf318cd626d88...nixos-zfs-2018-08-13.patch | |
patching file .github/PULL_REQUEST_TEMPLATE.md | |
patching file cmd/zdb/zdb.c | |
patching file cmd/zed/agents/zfs_mod.c | |
patching file cmd/zpool/zpool_main.c | |
patching file cmd/ztest/ztest.c |
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
$ gcc acltest.c && sudo strace -f ./a.out | |
execve("./a.out", ["./a.out"], 0x7ffe03614de8 /* 17 vars */) = 0 | |
brk(NULL) = 0x1189000 | |
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/nix/store/n0axl4pks91d841aivjqm3m0gmdj3f2h-shell/lib64/tls/x86_64/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/nix/store/n0axl4pks91d841aivjqm3m0gmdj3f2h-shell/lib64/tls/x86_64/x86_64", 0x7fffea8d7150) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/nix/store/n0axl4pks91d841aivjqm3m0gmdj3f2h-shell/lib64/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/nix/store/n0axl4pks91d841aivjqm3m0gmdj3f2h-shell/lib64/tls/x86_64", 0x7fffea8d7150) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/nix/store/n0axl4pks91d841aivjqm3m0gmdj3f2h-shell/lib64/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/nix/store/n0axl4pks91d841aivjq |
OlderNewer