Skip to content

Instantly share code, notes, and snippets.

@katsumata-ryo
Last active April 24, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katsumata-ryo/b5679fff12dde6ce189c to your computer and use it in GitHub Desktop.
Save katsumata-ryo/b5679fff12dde6ce189c to your computer and use it in GitHub Desktop.
my_bashrc
# LANG=C
export LANG=C
# sshkey read.
sshaddl=`ssh-add -L`
username = `uname -n`
case $sshaddl in
"The agent has no identities.")
ssh-add /Users/$username/.ssh/id_rsa ;;
"ssh-rsa"*)
echo "ssh-key is OK" ;;
*)
echo $sshaddl
esac
# command alias
alias gojazz='ssh -A xxx@xxxxxx.xxxxxxxx.xxx -p xxxxxx'
alias lsa='ls -a'
alias rails_s_bind='echo; echo " => http://`ipconfig getifaddr en0`:3000/"; echo ;rails s -b `ipconfig getifaddr en0`'
# les(only reading vim) setting
vimversion=`ls /usr/share/vim/ |grep 'vim[0-9]\{2\}'`
if [ $? = 0 ]; then
alias vir="/usr/share/vim/${vimversion}/macros/less.sh"
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
### git branch mark
source /usr/local/etc/bash_completion.d/git-prompt.sh
source /usr/local/etc/bash_completion.d/git-completion.bash
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\h\[\033[00m\]:\W\[\033[31m\]$(__git_ps1 [%s])\[\033[00m\]\$ '
### history
HISTSIZE=5000
HISTTIMEFORMAT='%Y-%m-%d %T(%z) '
### hub commands to git
eval "$(hub alias -s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment