Skip to content

Instantly share code, notes, and snippets.

View ThomasGHenry's full-sized avatar

Thomas G Henry ThomasGHenry

View GitHub Profile
@ThomasGHenry
ThomasGHenry / gist:3906998fa17f546cdfa6ba1cb60f76e9
Created September 15, 2017 17:06 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
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
@ThomasGHenry
ThomasGHenry / renamegitbranch.sh
Last active September 15, 2017 17:08 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
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 / blah.js
Created June 26, 2019 06:52
stripe async test woes
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' }));