Skip to content

Instantly share code, notes, and snippets.

View DiegoSPB's full-sized avatar

Diego S DiegoSPB

  • LiveRamp
  • Seattle, WA
View GitHub Profile
@DiegoSPB
DiegoSPB / vim-heroku.sh
Created August 3, 2023 19:08 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@DiegoSPB
DiegoSPB / prefix_commit_with_branch_sc_prefix.sh
Created September 29, 2022 18:17
Prefix commit name with branch's prefix (sc- based)
gcmm() {
if [[ -z $1 ]]; then
echo "Error: No commit message provided."
return 1
fi
local ticket=$(git rev-parse --abbrev-ref HEAD | egrep -o "^sc-\d+")
if [[ -n "$ticket" ]]; then
git commit -m "[$ticket] $1" ${@:2}