Skip to content

Instantly share code, notes, and snippets.

View DavidBindloss's full-sized avatar
🦧

David Bindloss DavidBindloss

🦧
  • David Bindloss
  • Australia
View GitHub Profile
const gt = x => y => x > y;
const lt = x => y => x < y;
const or = x => y => x || y;
const and = x => y => x && y;
const type = x => typeof x;
// like type('foo') => 'string';
// like type(undefined) => 'undefined';
@DavidBindloss
DavidBindloss / async-img.js
Created November 12, 2018 00:26
Async Image Loading
const loadImage = async src => await new Promise((resolve, reject) => Object.assign(img = new Image(), { src, onload: () => resolve(img), onerror: reject }))
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"