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
# | |
# To run, | |
# $ nix-shell ihaskell.nix --argstr ihaskellpath (IHaskell directory) | |
# | |
# inside the shell, run | |
# $ ihaskell-notebook | |
# | |
{ ihaskellpath }: | |
let pkgs = import <nixpkgs> {}; |
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
#!/bin/bash | |
cd /afs/cern.ch/work/i/ikim/public/heavyhiggs/lhc-analysis-collection/heavyhiggs | |
/afs/cern.ch/work/i/ikim/public/heavyhiggs/lhc-analysis-collection/heavyhiggs/optimize $1 | |
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
$ nixops deploy -d simplest | |
my-key-pair> uploading EC2 key pair ‘charon-xxx’... | |
testnginx..> creating EC2 instance (AMI ‘ami-xxx’, type ‘t2.micro’, region ‘us-east-1’)... | |
testnginx..> starting EC2 instance in zone ‘us-east-1a’ due to volume ‘vol-xxx’ | |
testnginx..> waiting for IP address... [pending] [pending] [pending] [pending] [pending] [pending] [running] None / 10.100.1.28 | |
testnginx..> waiting for SSH.......................... | |
testnginx..> replacing temporary host key... | |
testnginx..> attaching volume ‘vol-xxx’ as ‘/dev/xvdf’... [attaching] [attached] | |
testnginx..> setting state version to 17.09 | |
building all machine configurations... |
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
/* | |
Example usage (in configuration.nix): | |
services.phabricator.enable = true; | |
services.phabricator.baseURI = "secure.example.org"; | |
services.phabricator.baseFilesURI = "secure-files.example.org"; | |
services.phabricator.extensions = | |
{ libphutil-scrypt = "git://github.com/haskell-infra/libphutil-scrypt.git"; | |
libphutil-yubikey = "git://github.com/thoughtpolice/libphutil-yubikey.git"; |
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
{ | |
packageOverrides = pkgs : rec { | |
nabi = with pkgs; stdenv.mkDerivation { | |
name = "nabi-1.0.0-iw"; | |
src = fetchgit { | |
url = "http://github.com/wavewave/nabi.git"; | |
rev = "2fc9d36e60d36cffbdc01b1b44fe4da9c9ba5901"; | |
sha256 = "62ee6629e73b5dcf83739c786340271d58c7c99a84558a9e4e7d8e58cedb0887"; | |
}; | |
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
{ | |
packageOverrides = pkgs: rec { | |
# | |
hepNixOverlay = | |
let self = pkgs.callPackage /home/wavewave/repo/src/hep-nix-overlay {}; | |
in pkgs.recurseIntoAttrs self; | |
# | |
yesodEnv = | |
let hsenv = with (pkgs // pkgs.haskellPackages); ghcWithPackages | |
(self : [ cabalInstall |
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 Control.Monad (forever) | |
import Pipes | |
import Pipes.Core | |
import qualified Pipes.Prelude | |
list2pipe :: (Monad m) => [a] -> Producer a m () | |
list2pipe [] = return () | |
list2pipe (x:xs) = yield x >> list2pipe xs | |
tuple3 :: (Monad m) => Consumer a m (a,a,a) |
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 Control.Concurrent | |
import Control.Concurrent.STM | |
import Data.Monoid | |
import Graphics.Rendering.Cairo | |
import Graphics.UI.Gtk.Poppler.Document | |
import Graphics.UI.Gtk.Poppler.Page | |
import System.Directory | |
import System.FilePath | |
popplerGetDocFromFile :: FilePath -> IO (Maybe Document) |
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 StandaloneDeriving #-} | |
import Debug.Trace | |
data BTree a = L | |
| N a (BTree a) (BTree a) | |
deriving instance (Show a) => Show (BTree a) | |
maketree :: Int -> Int -> BTree Int |
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 DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE GADTs #-} | |
import GHC.TypeLits | |
data Tree :: * -> * where | |
Leaf :: a -> Tree a | |
Node :: Tree a -> Tree a -> Tree a |