Skip to content

Instantly share code, notes, and snippets.

View apaleslimghost's full-sized avatar
💚
a pale slim ghost

Kara Brightwell apaleslimghost

💚
a pale slim ghost
View GitHub Profile
@apaleslimghost
apaleslimghost / upload-to-s3.sh
Last active October 3, 2019 11:58 — forked from i-like-robots/upload-to-s3.sh
Upload client-side assets to S3 via AWS CLI
#!/bin/bash
DESTINATION_BUCKET="hashed-assets-eu"
DESTINATION_FOLDER="page-kit"
upload_file() {
local FILE="$1"
local ENCODING
local TYPE
@apaleslimghost
apaleslimghost / quicksort.hs
Created October 6, 2015 07:51 — forked from kangax/quicksort.hs
Haskell-inspired quick sort in ES6
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort (filter (<=x) xs)
biggerSorted = quicksort (filter (>x) xs)
in smallerSorted ++ [x] ++ biggerSorted
# ## Function: sequence
#
# Evaluates each action in sequence, left to right, collecting the
# results.
#
# + type: (Monad m) => m -> [m a] -> m [a]
export sequence = (m, ms) --> do
return ms.reduce perform, m.of []
# where:
function perform(m1, m2) => do