Skip to content

Instantly share code, notes, and snippets.

View zackferrofields's full-sized avatar

Zack Ferro-Fields zackferrofields

View GitHub Profile
let return = (a: 'a) : option('a) => Some(a);
let bind = (m: option('a), f: 'a => option('b)) : option('b) =>
switch (m) {
| None => None
| Some(a) => f(a)
};
let (>>=) = bind;
@zackferrofields
zackferrofields / Dockerfile
Last active September 17, 2018 11:46
Cache a docker base image for faster Travis builds #Docker #Travis #cache
FROM zackferrofields/app:base as builder
COPY . .
RUN yarn \
&& yarn build
FROM nginx
COPY nginx/conf.d/ /etc/nginx/conf.d/
COPY nginx/default.d/dashboard.conf /etc/nginx/default.d/
COPY nginx/data/www /var/www/zackferrofields
@zackferrofields
zackferrofields / find.sh
Last active June 25, 2019 09:42
list files cheatsheet
# list files by name
#
# find $PATH -name '$FILE_NAME' -print | rev | cut -d/ -f1 | rev"
#
# eg all javascript files in "src"
#
find ./src -name '*.js' -print | rev | cut -d/ -f1 | rev