Skip to content

Instantly share code, notes, and snippets.

View kolpav's full-sized avatar

Pavel Kolář kolpav

View GitHub Profile
@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@abesto
abesto / lzw.hs
Created June 29, 2012 08:13
Haskell LZW compression
-- Could use a few rounds of cleanup...
import Data.Char
import Data.List
dictionary :: [String]
dictionary = [[chr c] | c <- [0 .. 127]]
prefixes :: [String] -> String -> [(Int, String)]
prefixes xs y = [(i, xs !! i) | i <- [0 .. (length xs) -1], xs !! i `isPrefixOf` y]