Skip to content

Instantly share code, notes, and snippets.

@vkbansal
Last active September 18, 2019 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkbansal/9728250d4d1748561c3724f87414a9bc to your computer and use it in GitHub Desktop.
Save vkbansal/9728250d4d1748561c3724f87414a9bc to your computer and use it in GitHub Desktop.
[Bash Snippets] Quick & dirty bash snippets #bash #snippets
# remove all the git branches with update in it
git rmf $(git ls | grep update | tr '\n' ' ')
# get version from package.json. may not work with 1.0.0-alpha.1
PKG_VERSION=$(node -e "console.log(require('./package.json').version);")
MAJOR_VERSION="$(echo $PKG_VERSION | cut -d "." -f 1)"
MINOR_VERSION="$(echo $PKG_VERSION | cut -d "." -f 2)"
PATCH_VERSION="$(echo $PKG_VERSION | cut -d "." -f 3)"
# vscode tab issue fix
sed -i -- 's/com.microsoft.VSCode/com.microsoft2.VSCode/g' /Applications/Visual\ Studio\ Code.app/Contents/Info.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment