Skip to content

Instantly share code, notes, and snippets.

/* promises */
doSomething()
.then(doSomethingElse)
.catch(handleError);
/* await */
let result;
try {
result = await doSomething();
} catch (error) {
@radfahrer
radfahrer / clean_merged_branches.sh
Last active December 20, 2015 10:39
cleanup merged branches
#!/usr/bin/env sh
git checkout master
for BRANCH in $(git branch --merged | grep -v "*")
do
git branch -d $BRANCH
done
git remote prune origin