Skip to content

Instantly share code, notes, and snippets.

View ianbunn's full-sized avatar
🤙

ian ianbunn

🤙
View GitHub Profile
@ianbunn
ianbunn / mapFilterReduceAndOtherArrayIterators.js
Created August 12, 2019 21:43
Map, filter, reduce and other array iterators in JS
// const cities = ['ROME', 'PARIS', 'LONDON', 'LOS ANGELES', 'VIENNA'];
// cities.forEach((value, index, array) => {
// console.log(`${index + 1} ${value}`); //output: 1 ROME, 2 PARIS, 3 LONDON, 4 LOS ANGELES, 5 VIENNA
// });
// //we can use it to invert the "cities" array...even though with reverse() would be better 😉
// const invertedCities = [];
// cities.forEach((value, index, array) => invertedCities.unshift(value));
// console.log(invertedCities); //output: ["VIENNA", "LOS ANGELES", "LONDON", "PARIS", "ROME"]
@ianbunn
ianbunn / Blockstack ID
Created June 24, 2019 14:42
Blockstack
Verifying my Blockstack ID is secured with the address 1FMn8wNTyf3nSjB7trqQuyGX17uEDVkgTo https://explorer.blockstack.org/address/1FMn8wNTyf3nSjB7trqQuyGX17uEDVkgTo
@ianbunn
ianbunn / forked-update.md
Last active April 6, 2019 06:04 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream