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
main = putStrLn prelude | |
>> interact (unlines . filter (not . null) . map compile) | |
>> putStrLn afterward | |
a +++ b = a ++ "\n" ++ b | |
prelude = "#include <stdio.h>" | |
+++ "char b[1000000];" | |
+++ "int main() {" | |
+++ "char* p = b;" |
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
import Data.Array | |
import Data.Ord | |
import Data.List.Zipper | |
import Data.Aeson (encode) | |
import Data.List (minimumBy, nub) | |
import qualified Data.ByteString.Lazy.Char8 as LBS | |
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 OverloadedStrings #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
import Data.HashMap.Lazy hiding (map) | |
import Data.Ord | |
import Data.Aeson | |
import Data.List (minimumBy, nub) | |
import Data.Text (pack) | |
import qualified Data.Text as T | |
import qualified Data.ByteString.Lazy.Char8 as LBS |
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 OverloadedStrings #-} | |
import Data.HashMap.Lazy | |
import Data.Text hiding (last, minimum) | |
import Prelude hiding (length) | |
levenstein :: Text -> Text -> Int | |
levenstein a b = snd $ last levsl | |
where |
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
{ | |
"type": "object", | |
"properties": { | |
"AWSEBDockerrunVersion": { | |
"type": "integer", | |
"minimum": 1, | |
"maximum": 2 | |
}, | |
"authentication": { | |
"type": "object", |
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/bash | |
if [ ! "$1" ] | |
then | |
echo `pwd`/ | sed 's#^/Users/lyndon/#~/#' | tee /dev/stderr | tr -d '\n' | pbcopy | |
else | |
echo `pwd`/$1 | sed 's#^/Users/lyndon/#~/#' | tee /dev/stderr | tr -d '\n' | pbcopy | |
fi |
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/bash | |
set -e | |
echo "$@" | |
if [ -f .dockername ] | |
then | |
N=$(cat .dockername) | |
else |
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 RankNTypes #-} | |
{-# LANGUAGE KindSignatures #-} | |
import Control.Category ((>>>), Category()) | |
import Control.Arrow (Kleisli(..)) | |
import Control.Monad.State (runState, modify, State) | |
-- Our composition is abstract | |
-- |
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 DeriveGeneric #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
module Main where | |
import Options.Generic | |
import Options.Applicative | |
data Bla = X | Y String |
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/bash | |
set -e | |
rawname="" | |
if [ "$1" == "-h" ] || [ "$1" == "--help" ] | |
then | |
echo "Usage: jekyll-new-draft.sh [DRAFT NAME WITH SPACES]" 1>&2 | |
exit |