First let's have a broken sequence of files:
➜ touch page-{1,2,5}.jpg
➜ ls
page-1.jpg page-2.jpg page-5.jpg show-missing.sh
-- Simple version | |
deck :: [(String, Int)] | |
deck = | |
[ (s,n) | |
| s <- ["Spade","Heard","Club","Diamond"] | |
, n <- [1..13] | |
] |
SOURCES_ELM=$(shell find src -name '*.elm') | |
NIX_BRANCH=nixos-18.09 | |
.PHONY: shell | |
shell: | |
nix-shell | |
.PHONY: format | |
format: |
package main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
) | |
func loggingHandler(h http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
#!/bin/bash | |
cowstring=$(find /usr/share/cowsay -name '*.cow' -exec basename {} \; | sed 's#\.cow$##') | |
IFS=' ' read -r -a cowarray <<< $cowstring | |
cowcount=$(echo "$cowstring" | wc -w) | |
mycow=${cowarray[$[ ( $RANDOM % $cowcount ) + 1 ]]} | |
cowsay -f $mycow "Did you mean: 'code'?" |
module Main exposing (..) | |
import Html exposing (Html) | |
import Html.App as App | |
import Time exposing (Time, second) | |
import Date exposing (Date) | |
import Date.Extra as Dx | |
main : Program Never |
module GroupBy exposing (..) | |
groupBy : List v -> (v -> k) -> List (k, List v) | |
groupBy items f = | |
case items of | |
[] -> [] | |
(x::xs) -> | |
let key = f x | |
rest = groupBy xs f | |
in insertTo rest key x |
elm-stuff |
module Main where | |
import System.Environment | |
import System.IO | |
import Data.Char | |
import qualified Data.List as L | |
import qualified Data.Map.Strict as M | |
import qualified Data.Set as S | |
------------------------------------------ |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
hosts = { | |
"ctrl" => "192.168.101.11", | |
"db-1" => "192.168.101.12", | |
"cache-1" => "192.168.101.13", | |
"cache-2" => "192.168.101.14", | |
"web-1" => "192.168.101.15", | |
"web-2" => "192.168.101.16" |