1
0
Fork 0

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

View File

@ -9,8 +9,7 @@
co = checkout
br = checkout -b
st = status -sb
ci = commit -m
ca = commit -am
ci = commit
up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
[color]
diff = auto
@ -30,3 +29,5 @@
prompt = false
[help]
autocorrect = 1
[achievement]
upload = true

View File

@ -2,3 +2,4 @@
.bundle
.rake_tasks
*.sublime-*
vendor/gems

View File

@ -1516,7 +1516,7 @@
<key>FocusFollowsMouse</key>
<false/>
<key>FsTabDelay</key>
<real>1</real>
<real>0.10000000149011612</real>
<key>GlobalKeyMap</key>
<dict>
<key>0x9-0x40000</key>
@ -1620,7 +1620,7 @@
<key>HideScrollbar</key>
<false/>
<key>HideTab</key>
<true/>
<false/>
<key>HighlightTabLabels</key>
<true/>
<key>HotKeyBookmark</key>
@ -1688,9 +1688,9 @@
<key>NSWindow Frame NSColorPanel</key>
<string>307 274 214 309 0 0 1440 878 </string>
<key>NSWindow Frame Preferences</key>
<string>304 393 924 485 0 0 1440 878 </string>
<string>304 393 924 485 0 0 1440 900 </string>
<key>NSWindow Frame iTerm Window 0</key>
<string>419 240 570 426 0 0 1440 878 </string>
<string>0 420 570 448 0 0 1440 878 </string>
<key>NSWindow Frame iTerm Window 1</key>
<string>0 452 570 426 0 0 1440 878 </string>
<key>NSWindow Frame iTerm Window 2</key>
@ -2479,7 +2479,7 @@
<key>SUHasLaunchedBefore</key>
<true/>
<key>SULastCheckTime</key>
<date>2013-03-13T09:26:34Z</date>
<date>2013-04-16T20:31:17Z</date>
<key>SavePasteHistory</key>
<false/>
<key>Show Toolbelt</key>
@ -2529,6 +2529,6 @@
<key>findRegex_iTerm</key>
<false/>
<key>iTerm Version</key>
<string>1.0.0.20130302</string>
<string>1.0.0.20130319</string>
</dict>
</plist>

View File

@ -1,3 +1,8 @@
export RUBYOPT="-Ku"
export RUBY_GC_MALLOC_LIMIT=60000000
export RUBY_HEAP_MIN_SLOTS=800000
export RUBY_HEAP_FREE_MIN=100000
export RUBY_FREE_MIN=200000
export RUBY_HEAP_SLOTS_INCREMENT=300000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=79000000

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
zsh/functions/dock-delay Normal file
View File

@ -0,0 +1 @@
defaults write com.apple.Dock autohide-delay -float $1 && killall Dock

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

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)"
}

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"