Skip to content

Instantly share code, notes, and snippets.

JP Blanchette jpblancoder

View GitHub Profile
View Current-branch-commits.gitconfig
[alias]
bname = !git rev-parse --abbrev-ref HEAD
wip = "!f() { git commit -m \"$(git bname): WIP\"; }; f"
cmb = "!f() { git commit -m \"$(git bname): $1\"; }; f"
@jpblancoder
jpblancoder / pb-release-diff.md
Created Mar 7, 2019
Diff PB release build folders
View pb-release-diff.md

Quick diff of origin build folders

  • Diff the origin build folders JS files.
git diff-tree --stat=110 -r origin/release-3_0_22 origin/release-3_0_23 -- resources/scripts/build
git diff-tree --name-status -r origin/release-3_0_22 origin/release-3_0_23 -- resources/scripts/build

Better diff of local folders

  • Track the release branches in separate local git repos, and diff the build folders.
  • This will compare the JS filenames and also the file contents.
View Github_Open-a-pull-request.gitconfig
[alias]
bname = !git rev-parse --abbrev-ref HEAD
gh = !open \"$(git remote -v | ag origin | ag push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/tree/$(git bname)\"
ghpr = !git ghpr-d
ghpr-d = !open \"$(git remote -v | ag origin | ag push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pull/new/dev...$(git bname)\"
ghpr-dd = "!f() { git diff-tree --name-status -r origin/dev \"$(git bname)\"; git diff-tree --shortstat -r origin/dev \"$(git bname)\";}; f"
ghpr-ddd = "!f() { git diff-tree --stat=110 -r origin/dev \"$(git bname)\";}; f"
ghpr-s = !open \"$(git remote -v | ag origin | ag push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pull/new/staging...$(git bname)\"
ghpr-ss = "!f() { git diff-tree --name-status -r origin/staging \"$(git bname)\"; git diff-tree --shortstat -r origin/staging \"$(git bname)\";}; f"
ghpr-sss = "!f() { git diff-tree --stat=110 -r origi
@jpblancoder
jpblancoder / mixins.scss
Created May 28, 2018
IE 11 - CSS Grid - SASS mixins
View mixins.scss
// Ensure CSS grid works with IE 11 spec.
// https://css-tricks.com/browser-compatibility-css-grid-layouts-simple-sass-mixins/
// sass-lint:disable no-vendor-prefixes, no-duplicate-properties
@mixin display-grid {
display: -ms-grid;
display: grid;
}
// $columns values should be delimited by a space
@mixin grid-template-columns($columns...) {
You can’t perform that action at this time.