Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Control.Concurrent (forkIO) | |
import Control.Concurrent.STM | |
import Control.Monad (when) | |
import Control.Monad.Trans (liftIO) | |
import Network.HTTP.Types | |
import Network.Wai as Wai |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// initialize the Shanghai component which keeps track of | |
// shipping data in and out of the Port of Shanghai. | |
var shanghai = Elm.worker(Elm.Shanghai, { | |
coordinates:[0,0], | |
incomingShip: { name:"", capacity:0 }, | |
outgoingShip: "" | |
}); | |
function logger(x) { console.log(x) } | |
source :: MonadIO m => Int -> Source m BS.ByteString | |
source n = replicateM_ n $ do | |
n <- liftIO $ liftM (succ.(`mod` 15)) randomIO | |
s <- liftIO $ replicateM n (randomIO :: IO Word8) | |
yield (BS.pack s) | |
putter :: Putter BS.ByteString | |
putter s = do |
-------------------------- | |
-- CORE LIBRARY IMPORTS -- | |
-------------------------- | |
import Task exposing (Task, succeed, andThen, onError) | |
import Json.Decode exposing (Decoder, object2, (:=), string, int, list, map) | |
import Signal exposing (Signal, Mailbox, mailbox, send) | |
import List | |
--------------------------------- | |
-- THIRD PARTY LIBRARY IMPORTS -- |
#!/bin/sh | |
sudo mount -o remount,exec /tmp | |
if [ -x /usr/local/nixstrap/proot-x86_64 ] && [ -h ~/.nix-profile ]; then | |
echo "Launching shell with nix-* tools!" | |
exec /usr/local/nixstrap/proot-x86_64 -b /usr/local/nixstrap/nix-1.8-x86_64-linux:/nix bash --init-file ~/.nix-profile/etc/profile.d/nix.sh | |
fi | |
set -e |
compiler: ghc-8.2.0.20170507 | |
compiler-check: match-exact | |
resolver: lts-8.13 | |
setup-info: | |
ghc: | |
linux64: | |
8.2.0.20170507: | |
url: https://downloads.haskell.org/~ghc/8.2.1-rc2/ghc-8.2.0.20170507-x86_64-deb8-linux.tar.xz | |
content-length: 141011788 | |
sha1: ff886437c1d2ddfa5686d6c9efb0819a957c3dde |
{-# LANGUAGE StandaloneDeriving, DataKinds, PolyKinds, GADTs, RankNTypes, TypeOperators, FlexibleContexts, TypeFamilies, KindSignatures #-} | |
-- http://www.timphilipwilliams.com/posts/2013-01-16-fixing-gadts.html | |
module HRecursionSchemes where | |
import Control.Applicative | |
import Data.Functor.Identity | |
import Data.Functor.Const | |
import Text.PrettyPrint.Leijen hiding ((<>)) |
VERSION='9.4.1-rc1' | |
# Note: this ghc version requires stack 2.7.3 or newer to install correctly | |
cd /tmp | |
mkdir ghc-test && cd ghc-test | |
wget "https://raw.githubusercontent.com/DanBurton/stack-setup-info-gen/master/output/stack-ghc-$VERSION.yaml" | |
mv "stack-ghc-$VERSION.yaml" stack.yaml | |
stack setup | |
stack repl |