Dock delay, git achievements and more

This commit is contained in:
Gregory Eremin
2013-04-19 22:11:41 +04:00
parent 71aa681d36
commit 7bf9111eb5
9 changed files with 45 additions and 16 deletions
+18 -5
View File
@@ -4,18 +4,31 @@ alias please="sudo"
# Ruby & Rails
alias b="bundle exec"
alias mkbundle="bundle install --path .bundle"
alias ss="git up && bundle && bundle exec rake db:migrate"
alias rc="bundle exec rails c"
alias rs="bundle exec rails s"
alias rails="bundle exec rails"
alias rake="bundle exec rake"
alias rspec="bundle exec rspec"
alias cap="bundle exec cap"
alias cucumber="bundle exec cucumber"
alias mkbundle="bundle install --path vendor/gems"
alias ss="git up && bundle --quiet && bundle exec rake db:migrate"
alias rc="rails c"
alias rs="rails s"
alias rs1="rails s -p3001"
alias rs2="rails s -p3002"
alias fs="bundle exec foreman start"
# Git
alias git="git-achievements"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gc="git commit -m"
alias gc="git ci -m"
alias ga="git add -u && git add . && git st"
alias gs="git st"
alias gd="git diff"
alias gp="git push"
alias gu="gut up"
alias gb="git br"
# OSX
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
+1
View File
@@ -0,0 +1 @@
defaults write com.apple.Dock autohide-delay -float $1 && killall Dock
+2 -1
View File
@@ -1,3 +1,4 @@
export PATH=~/.dotfiles/bin:$PATH
export PATH=~/.apps/tunneler/bin:$PATH
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=~/.misc/git-achievements:$PATH
export PATH=/Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin:$PATH
+7 -1
View File
@@ -22,6 +22,12 @@ git_dirty() {
fi
}
git_need_commit() {
git diff --stat 2>/dev/null | awk -F',' '/files? changed/ { lc += $2 + $3 } END {
if (lc > 100) print "\n%F{005}Y U NO COMMIT!?%f"
}'
}
git_prompt_info () {
ref=$($git symbolic-ref HEAD 2>/dev/null) || return
echo "${ref#refs/heads/}"
@@ -57,7 +63,7 @@ directory_name(){
echo "%F{003%}%1/%\%f"
}
export PROMPT=$'\n$(directory_name)$(git_dirty)$(need_push) '
export PROMPT=$'\n$(directory_name)$(git_dirty)$(need_push)$(git_need_commit) '
set_prompt () {
export RPROMPT="$(rb_prompt)"
}
+1
View File
@@ -23,3 +23,4 @@ compinit
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"