Skip to content

Instantly share code, notes, and snippets.

@ThomasGHenry
ThomasGHenry / blah.js
Created Jun 26, 2019
stripe async test woes
View blah.js
it('simplified test', async function() {
expect.assertions(1);
const stripe = Stripe(app.get('STRIPE_KEY'));
const ntc = new NightlyTranChecker(app);
jest
.spyOn(stripe.transfers, 'create')
.mockImplementation(() => ntc.stripe_cb(null, { whatever: 'blah' }));
@ThomasGHenry
ThomasGHenry / renamegitbranch.sh
Last active Sep 15, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View renamegitbranch.sh
OLDB=$1
NEWB=$2
git pull || exit
git branch -m ${OLDB} ${NEWB} # Rename branch locally
git push origin :${OLDB} # Delete the old branch
git push --set-upstream origin ${NEWB} # Push the new branch, set local branch to track the new remote
@ThomasGHenry
ThomasGHenry / gist:3906998fa17f546cdfa6ba1cb60f76e9
Created Sep 15, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:3906998fa17f546cdfa6ba1cb60f76e9
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote