Skip to content

Instantly share code, notes, and snippets.

@seLain
seLain / gist:8bdf12c7196f3fccafdf067dec2696b2
Last active June 24, 2024 19:26
Fix the thing GitHub keeps saying “This branch is X commits ahead, Y commits behind”
ref stackoverflow:
https://stackoverflow.com/questions/41283955/github-keeps-saying-this-branch-is-x-commits-ahead-y-commits-behind
works by
1. git remote add upstream https://github/upstream/repo.git
2. git pull --rebase upstream master
2.1 git rebase --skip (if the conflicts are not true, skip the patches)
3. git push --force-with-lease origin master
If there are branches to fix
@jeffreytgilbert
jeffreytgilbert / chase-credit-card-page-has-no-balance.js
Created December 30, 2013 19:34
A little script to show the running balance on the chase cc page because they decided it's not important to keep a running balance...
(function(){
var amounts = document.querySelectorAll('#Posted tbody .amount');
var balance = Number(document.querySelector('#AccountDetailTable .card-accountdetailcol tbody tr td:nth-child(2)').innerText.substr(1).replace(',',''));
var iii=0;
var amount = '';
var element = null;
var elementsArray = [];
for(iii=0; iii < amounts.length; iii++) {
element = amounts[iii];