Skip to content

Instantly share code, notes, and snippets.

View butchhoward's full-sized avatar

Butch Howard butchhoward

View GitHub Profile
@butchhoward
butchhoward / gist:599743312208cabada9a89d622931d8a
Last active September 22, 2020 21:14
git branch rename master to trunk
# on a local clone when the remote has NOT been updated to the new branch name yet
git checkout master
git branch -m master trunk
git fetch
git branch --unset-upstream
git branch -u origin trunk
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/trunk
# change the DEFAULT BRANCH on GitHub to trunk before pushing or it will reject the push
git push origin --delete master

Keybase proof

I hereby claim:

  • I am butchhoward on github.
  • I am butchhoward (https://keybase.io/butchhoward) on keybase.
  • I have a public key ASCc4MRnvr0kGRqnF68CfSdQvYRpKb1SIX8YsHs5HsOwBgo

To claim this, I am signing this object:

@butchhoward
butchhoward / gist:ec971481c1c9d03c31d7a34ac17e9bab
Created November 16, 2017 23:00
google bookmarks - make bookmark links open in a new tab
function MakeBookmarkLinksOpenInNewWindow() {
if (window.location.href.includes('/bookmarks/')) {
var links = document.getElementsByTagName("a");
for (var i = 0; i < links.length; i++) {
if (links[i].href.startsWith("https://www.google.com/url")) {
links[i].target = "_blank";
}
}
}
}
@butchhoward
butchhoward / gist:0904de116249d3ac33a33b687ca28d4f
Last active November 16, 2017 23:01
github pull request list - make links open in a new tab
function MakeLinksOpenInNewWindow() {
if (window.location.href.includes('/pulls')) {
var links = document.querySelectorAll('li div div a');
for (var i = 0; i < links.length; i++) {
links[i].target = "_blank";
}
}
}
MakeLinksOpenInNewWindow();
Given a file that looks like this:
```
017-05-03 08:12:39,911:root:INFO:Begin loading
2017-05-03 09:02:43,396:root:INFO:End loading
2017-05-04 07:57:09,480:root:INFO:Begin loading
2017-05-04 08:47:47,099:root:INFO:End loading
2017-05-05 08:06:18,223:root:INFO:Begin loading
2017-05-05 08:57:09,491:root:INFO:End loading
2017-05-06 08:02:11,492:root:INFO:Begin loading
2017-05-06 08:53:30,432:root:INFO:End loading