Skip to content

Instantly share code, notes, and snippets.

@arondius
arondius / js-reducer.js
Created December 25, 2017 20:26
JS reducer
/* Popular Ice Cream Totals Quiz
*
* Using the data array and .reduce():
* - Return an object where each property is the name of an ice cream flavor
* and each value is an integer that's the total count of that flavor
* - Store the returned data in a new iceCreamTotals variable
*
* Notes:
* - Do not delete the data variable
* - Do not alter any of the data content
#!/usr/bin/env bash
echo "please give me the hash of the last good commit"
read hash
git bisect start master $hash
for rev in $(git rev-list $hash..dev --merges --first-parent); do
git rev-list $rev^2 --not $rev^
done | xargs git bisect skip
git bisect run /tmp/grep.sh