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 ConstraintKinds #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module GenericIso |
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 | |
IMAGE=local/ubuntu-dev:16.04 | |
NAME=mydocker | |
LANG=C.UTF-8 | |
DIR=`dirname $0` | |
SETUP=mydocker-setup | |
SETUP_CMD=/root/${SETUP} | |
HOST_UID=`id -u` | |
HOST_GID=`id -g` |
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 GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
module MatrixProd2 where | |
import Data.Proxy |
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
#!/usr/bin/env stack | |
-- stack --resolver lts-4.0 --install-ghc runghc | |
module Main where | |
import Control.Monad (forM_, when) | |
import Data.List (isInfixOf) | |
import GHC.IO.Exception (ExitCode (..)) | |
import System.Process (readProcessWithExitCode) |
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
{- | |
Waifu2x.hs by @notae_c based on https://github.com/WL-Amigo/waifu2x-converter-cpp/blob/master/appendix/waifu2x-commented.py | |
MIT license, see https://github.com/nagadomi/waifu2x/blob/master/LICENSE | |
-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedLists #-} | |
{-# LANGUAGE OverloadedStrings #-} |
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
Before: | |
$ ./bashcheck | |
Vulnerable to CVE-2014-6271 (original shellshock) | |
Vulnerable to CVE-2014-7169 (taviso bug) | |
./bashcheck: line 18: 2839 Segmentation fault: 11 bash -c "true $(printf '<<EOF %.0s' {1..79})" 2> /dev/null | |
Vulnerable to CVE-2014-7186 (redir_stack bug) | |
Test for CVE-2014-7187 not reliable without address sanitizer | |
Variable function parser still active, likely vulnerable to yet unknown parser bugs like CVE-2014-6277 (lcamtuf bug) |
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/sh -xe | |
WORKDIR=~/Documents/Haskell | |
MWORKDIR=~/Documents/Haskell/music-suite | |
cabal sandbox delete | |
cabal sandbox init | |
cabal sandbox add-source \ | |
${WORKDIR}/cpfd \ | |
${WORKDIR}/muse \ |
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/sh -e | |
# | |
# Module : ghc_setup_home.sh | |
# Description : GHC/Cabal initial setup script for home directory | |
# Copyright : (c) notae@me.com, 2014 | |
# License : BSD-style | |
# Maintainer : notae@me.com | |
# Stability : experimental | |
# Portability : POSIX |
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
# with GHC 7.8.3 (Haskell Platform 2014.2.0.0) on Mac OS X 10.9.4 | |
$ cabal sandbox init | |
$ cabal install bindings-DSL | |
$ cabal configure -fCoreAudio | |
$ cabal install -fCoreAudio | |
$ cd example/ | |
$ cabal --sandbox-config-file=../cabal.sandbox.config configure | |
$ cabal --sandbox-config-file=../cabal.sandbox.config build |
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
{-| | |
Module : CFPFD1 | |
Description : Constraint Functional Programming over Multiple Finite Domain | |
Copyright : (c) notae@me.com, 2014 | |
License : BSD-style | |
Maintainer : notae@me.com | |
Stability : experimental | |
Portability : POSIX | |
This module provides interfaces for constraint programming |
NewerOlder