Skip to content

Instantly share code, notes, and snippets.

@guilhermemarconi
Last active March 25, 2019 17:42
Show Gist options
  • Save guilhermemarconi/dee58233140b47898403714edd79f03e to your computer and use it in GitHub Desktop.
Save guilhermemarconi/dee58233140b47898403714edd79f03e to your computer and use it in GitHub Desktop.
function gco
git checkout $argv
end
function gb
git branch $argv
end
function gcm
git checkout master
end
function gcd
git checkout develop
end
function gch
git checkout homolog
end
function npmpls
rm -rf node_modules/ pnpm-lock.yaml; or echo 'pnpm-lock.yaml and/or node_modules folder not found'; and pnpm i
end
function nv
npm version
end
function patch
npm version patch
end
function minor
npm version minor
end
function major
npm version major
end
function gfi
git flow init
end
function fts
git flow feature start $argv
end
function ftf
if count $argv > /dev/null
git flow feature finish $argv
else
git flow feature finish (currentBranch | sed 's/feature\///g')
end
end
function bgs
git flow bugfix start $argv
end
function bgf
if count $argv > /dev/null
git flow bugfix finish (currentBranch | sed 's/bugfix\///g')
else
git flow bugfix finish $argv
end
end
function hts
git flow hotfix start $argv
end
function htf
if count $argv > /dev/null
git flow hotfix finish $argv
else
git flow hotfix finish (currentBranch | sed 's/hotfix\///g')
end
end
function rls
git flow release start $argv
end
function rlf
if count $argv > /dev/null
git flow release finish $argv
else
git flow release finish (currentBranch | sed 's/release\///g')
end
end
function gitignore
git rm -rf --cached .
end
function bd
npm run build $argv
end
function bdc
npm run build:checkout $argv
end
function bdr
npm run build:requestly $argv
end
function srv
ws --https
end
function debug
adb forward tcp:9222 localabstract:chrome_devtools_remote; chromium-browser localhost:9222
end
function debugend
adb kill-server
end
function spd
speed-test
end
function gstash
git stash
end
function gpop
git stash pop
end
function gst
git status
end
function gcam
git commit -am $argv
end
function gca!
git commit -a --amend
end
function gc
git commit
end
function gc!
git commit --amend
end
function gcmsg
git commit -m $argv
end
function ga
git add $argv
end
function gm
git merge $argv
end
function ggpull
if count $argv > /dev/null
git pull origin $argv
else
git pull origin (currentBranch)
end
end
function ggpush
if count $argv > /dev/null
git push origin $argv
else
git push origin (currentBranch)
end
end
function dpl
npm run deploy $argv
end
function st
npm start
end
function figma
echo "pass the name of the project"
google-chrome "https://www.figma.com/files/search/$argv[1]"
end
function bitbucket
echo "pass the name of the project"
google-chrome "https://bitbucket.org/dashboard/repositories?search=$argv[1]"
end
function weather
curl -H "Accept-Language: pt-br" -Ss 'https://wttr.in?0&T&Q' | cut -c 16- | head -2 | xargs echo
end
function currentBranch
git branch | grep \* | sed 's/\* //g'
end
function tkill
tmux kill-session -t $argv
end
function scotch
if count $argv > /dev/null
set dir $argv
else
set dir 'scotchbox'
end
git clone [email protected]:scotch-io/scotch-box.git $dir
cd $dir
rm -rf .git/ .gitignore README.md
vagrant up
end
function tmuxinate
mkdir ~/dev/$argv
cd ~/dev/$argv
cat ~/.config/tmuxinator/template.yml | sed 's/my-new-project/'$argv'/g' > ~/.config/tmuxinator/$argv.yml
end
function getwp
wp core download --path='' --locale='pt_BR' $argv
end
funcsave gco
funcsave gb
funcsave gcm
funcsave gcd
funcsave gch
funcsave npmpls
funcsave nv
funcsave patch
funcsave minor
funcsave major
funcsave gfi
funcsave fts
funcsave ftf
funcsave bgs
funcsave bgf
funcsave hts
funcsave htf
funcsave rls
funcsave rlf
funcsave gitignore
funcsave bd
funcsave bdc
funcsave bdr
funcsave srv
funcsave debug
funcsave debugend
funcsave spd
funcsave gstash
funcsave gpop
funcsave gst
funcsave gcam
funcsave gca!
funcsave gc
funcsave gc!
funcsave gcmsg
funcsave ga
funcsave gm
funcsave ggpull
funcsave ggpush
funcsave dpl
funcsave st
funcsave figma
funcsave bitbucket
funcsave weather
funcsave currentBranch
funcsave tkill
funcsave scotch
funcsave tmuxinate
funcsave getwp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment