1
0
Fork 0

Mostly git and ruby stuff

This commit is contained in:
Gregory Eremin 2013-02-22 16:32:41 +04:00
parent 3a950f2ed9
commit a4c14bc74a
13 changed files with 47 additions and 20 deletions

View File

@ -11,6 +11,7 @@
st = status -sb
ci = commit -m
ca = commit -am
up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
[color]
diff = auto
status = auto

View File

@ -1,3 +1,5 @@
.DS_Store
.bundle
.rake_tasks
*.sublime-project
*.sublime-workspace

View File

@ -1,4 +1,5 @@
AwesomePrint.defaults = {
indent: -2,
index: false
index: false,
raw: true
}

9
ruby/irbrc Normal file
View File

@ -0,0 +1,9 @@
require 'irb'
require 'irb/completion'
require 'irb/ext/save-history'
require 'rubygems'
require 'ap'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:AUTO_INDENT] = true
AwesomePrint.irb!

View File

@ -5,11 +5,12 @@ ln -s ~/.dotfiles/git/gitconfig ~/.gitconfig
ln -s ~/.dotfiles/git/gitignore ~/.gitignore
# ZSH
ln -s ~/.dotfiles/zsh/.zshrc
ln -s ~/.dotfiles/zsh/zshrc ~/.zshrc
# Ruby
ln -s ~/.dotfiles/ruby/.gemrc
ln -s ~/.dotfiles/ruby/.aprc
ln -s ~/.dotfiles/ruby/gemrc ~/.gemrc
ln -s ~/.dotfiles/ruby/irbrc ~/.irbrc
ln -s ~/.dotfiles/ruby/aprc ~/.aprc
# THE VIM
ln -s ~/.dotfiles/vim ~/.vim

View File

@ -4,8 +4,8 @@
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_face": "Inconsolata",
"font_size": 16.0,
"font_face": "Source Code Pro",
"font_size": 14.0,
"highlight_line": true,
"ignored_packages": ["Vintage"],
"line_padding_bottom": 1,
@ -16,6 +16,6 @@
"translate_tabs_to_spaces": true,
"tree_animation_enabled": false,
"trim_trailing_white_space_on_save": true,
"folder_exclude_patterns": [".git", ".bundle"],
"folder_exclude_patterns": [".git", ".bundle", ".sass-cache"],
"file_exclude_patterns": [".DS_Store"]
}

View File

@ -4,8 +4,8 @@
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_face": "Inconsolata",
"font_size": 16.0,
"font_face": "Source Code Pro",
"font_size": 14.0,
"highlight_line": true,
"ignored_packages": ["Vintage"],
"line_padding_bottom": 1,
@ -16,6 +16,6 @@
"translate_tabs_to_spaces": true,
"tree_animation_enabled": false,
"trim_trailing_white_space_on_save": true,
"folder_exclude_patterns": [".git", ".bundle"],
"folder_exclude_patterns": [".git", ".bundle", ".sass-cache"],
"file_exclude_patterns": [".DS_Store"]
}

4
vim/.netrwhist Normal file
View File

@ -0,0 +1,4 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =2
let g:netrw_dirhist_1='/Users/chez/Code/commentatr/config/locales/activerecord/admin_user'
let g:netrw_dirhist_2='/Users/chez/Code/commentatr/config/locales/activerecord/blog'

1
vim/vim Symbolic link
View File

@ -0,0 +1 @@
/Users/chez/.dotfiles/vim

View File

@ -3,12 +3,21 @@ alias b='bundle exec'
alias please='sudo'
alias mkbundle='bundle install --path .bundle'
# Git
alias glog="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 ga="git add -u && git add . && git st"
alias gs="git st"
# Services start-ups and shut-downs
alias mysql-start="mysql.server start"
alias mysql-stop="mysql.server stop"
alias mysql-restart="mysql.server restart"
alias postgres-start="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
alias postgres-stop="pg_ctl -D /usr/local/var/postgres stop -s -m fast"
alias redis-start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist"
alias redis-stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist"
alias redis-restart="redis-stop && redis-start"

View File

@ -1,18 +1,19 @@
autoload colors && colors
# cheers, @ehrenmurdick
# http://github.com/ehrenmurdick/config/blob/master/zsh/prompt.zsh
# Using git from Homebrew instead of default one
git=/usr/local/bin/git
git_branch() {
echo $(/usr/bin/git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})
echo $($git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})
}
git_dirty() {
st=$(/usr/bin/git status 2>/dev/null | tail -n 1)
st=$($git status 2>/dev/null | tail -n 1)
if [[ $st == "" ]]
then
echo ""
else
if [[ $st == "nothing to commit (working directory clean)" ]]
if [[ "$st" =~ ^nothing ]]
then
echo " %F{002}($(git_prompt_info))%f"
else
@ -22,14 +23,12 @@ git_dirty() {
}
git_prompt_info () {
ref=$(/usr/bin/git symbolic-ref HEAD 2>/dev/null) || return
echo "${ref#refs/heads/}"
ref=$($git symbolic-ref HEAD 2>/dev/null) || return
echo "${ref#refs/heads/}"
}
unpushed () {
if [[ -a .git ]]; then
git diff origin/master..HEAD
fi
$git cherry -v @{upstream} 2>/dev/null
}
need_push () {