Skip to content

Instantly share code, notes, and snippets.

View miclaus's full-sized avatar
🕸️

Iosif Miclaus miclaus

🕸️
View GitHub Profile
@miclaus
miclaus / bsplit.js
Created July 11, 2016 20:41
FB birthday split helper in ES6
const bsplit = (birthday) => {
if ( typeof birthday === 'string' ) {
const data = birthday.split('/')
let birthdayObj = { day: null, month: null, year: null }
switch (data.length) {
case 1:
birthdayObj.year = Number( data[0] )
break
case 2:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install node
nvm ls-remote
nvm install 5.1.0
nvm use 6
# nvm use 6.9
# nvm use 6.9.1
node -v
source ~/.bashrc