View index.html
<!DOCTYPE html>
<title>Large Type</title>
<link rel="stylesheet/less" type="text/css" href="style.less">
<script type="text/javascript" src="lib/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="lib/less.min.js"></script>
<div class="out"><span contenteditable autofocus>*hello*</span></div>
View machinesbench.hs
{-#LANGUAGE NoMonomorphismRestriction #-}
module Main (main) where
import Control.Monad (void)
import Control.Monad.Identity
import Criterion.Main
import qualified Data.Conduit as C
import qualified Data.Conduit.Combinators as CC
import qualified Data.Conduit.List as C
import qualified Data.Machine as M
View monad.rkt
#lang racket/base
;; Monads in Racket, including polymorphic bind, return and fail.
;; Haskell-like do-notation.
(provide define-monad-class
(struct-out monad-class)
View closconv.lhs
This is my short-ish tutorial on how to implement closures in
a simple functional language: Foo.
First, some boilerplate.
> {-# LANGUAGE DeriveFunctor, TypeFamilies #-}
> import Control.Applicative
> import Control.Monad.Gen
> import Control.Monad.Writer
> import Data.Functor.Foldable
View autossh.service
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
View hackagedocs
#!/usr/bin/env bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='/package/$pkg-$version/docs' \
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}"
View cors.nginxconf
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
# Based on:
# *
# *
server {
View cloud-haskell-operational-transformation.hs
This is a simple simulation of OT with Cloud in which all slaves generate
and apply random operations. It should work in theory. In practice, however
I wasn't apply to test it because my installation of distributed-process is
apparently broken. Specifically, `spawn` doesn't seem to work (I tested it
with some examples from the Well-Typed blog).
This code depends on
View factor.hs
npto :: (Integral a) => a -> [a]
npto x = [2,3] ++ concat [[x*6-1,x*6+1] | x <- [1..n]]
where n = ((+1) . round . sqrt . fromIntegral $ x) `div` 6
factors :: (Integral a) => a -> [a]
factors 1 = []
factors x = least : factors (x `div` least)
where least = head $ fs ++ [x]
fs = filter ((==0) . mod x) . npto $ x
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dump;
use Data::Alias "alias";
use Scalar::Util qw(weaken isweak);
my $foo = ["a".."z"];
alias my @bar = @$foo;