This file contains hidden or 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
| #!/bin/usr/env bash | |
| # Originaly from: https://www.reddit.com/r/NixOS/comments/5yxt45/simple_nix_package_search/ | |
| nq () { | |
| local CACHE="$HOME/.cache/nq-cache" | |
| if ! ( [ -e $CACHE ] && [ $(stat -c %Y $CACHE) -gt $(( $(date +%s) - 3600*24*7 )) ] ); then | |
| # read gotcha.. can't pipe to read (as usual zsh beats bash) | |
| read x MEM_AVAIL_KB UNIT < <(grep MemAvailable: /proc/meminfo) | |
| if [[ $UNIT != "kB" || $MEM_AVAIL_KB -lt 1000000 ]]; then | |
| # nix-env can easily use up to 1GB during -qa |
This file contains hidden or 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 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) |
This file contains hidden or 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
| 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) |
This file contains hidden or 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 FlexibleContexts, ScopedTypeVariables, TypeApplications, TypeFamilies #-} | |
| module EvilList where | |
| import Data.Typeable | |
| type family EvilListContent a where | |
| EvilListContent Int = () | |
| EvilListContent a = a |
This file contains hidden or 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
| /** | |
| 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 | |
| */ |
OlderNewer