Merge pull request #1 from maxk-fortscale/fortscale_aliases

Fortscale aliases
pull/301/head
Max Kovgan 2014-08-11 12:30:13 +03:00
commit 435a967a92
3 changed files with 91 additions and 3 deletions

View File

@ -0,0 +1,15 @@
cite 'about-alias'
about-alias 'common hdfs dfs abbreviations'
# Aliases
alias hdls='hdfs dfs -ls'
alias hdchmod='hdfs dfs -chmod'
alias hdchown='hdfs dfs -chown'
alias hdchgrp='hdfs dfs -chgrp'
alias hdmkdir='hdfs dfs -mkdir -p'
alias hdfsck='hdfs fsck'
alias hdcat='hdfs dfs -cat'
alias hdget='hdfs dfs -get'
alias hdput='hdfs dfs -put'
alias hddu='hdfs dfs -du'
alias hddf='hdfs dfs -df'

View File

@ -1,15 +1,38 @@
#!/usr/bin/env bash
BASH_IT="$HOME/.bash_it"
default_aliases_list="bundler general git maven vim"
default_plugins_list="base dirs extract git java python ruby rvm sshagent ssh tmux virtualenv"
default_aliases_list="bundler general git maven vim hdfs"
default_plugins_list="base dirs extract git java python ruby rvm sshagent ssh tmux"
default_completion_list="bash-it defaults fabric gem git git_flow maven pip rake ssh tmux"
test -w $HOME/.bash_profile &&
cp $HOME/.bash_profile $HOME/.bash_profile.bak &&
echo "Your original .bash_profile has been backed up to .bash_profile.bak"
cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile
cp $HOME/.bash_it/template/bash_profile_bashit.template.bash $HOME/.bash_profile_bashit
cat >> $HOME/.bash_profile << EOF
### fortscale bashit customizations
bashit() {
case \$1 in
on)
source \${HOME}/.bash_profile_bashit
;;
off)
set | grep BASH_IT | awk '{ print "unset", \$1}' | cut -d= -f1 | while read -r line
do
\$line
done
source /etc/profile
;;
*)
echo "Unknown parameter: \$1, Usage: bashit [on|off]"
;;
esac
}
EOF
echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it"

View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
# Add rvm gems and nginx to the path
export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin
# Path to the bash it configuration
export BASH_IT=$HOME/.bash_it
# Lock and Load a custom theme file
# location /.bash_it/themes/
export BASH_IT_THEME='candy'
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com'
# Set my editor and git editor
export EDITOR='/usr/bin/vim'
export GIT_EDITOR='/usr/bin/vim'
# Set the path nginx
export NGINX_PATH='/opt/nginx'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO="t"
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/xvzf/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
### Fortscale variables:
export FORTSCALE_HOME=${HOME}/fortscale
export FORTSCALE_COLLECTOR_ROOT=fortscale-core/fortscale/fortscale-collection/target
export FORTSCALE_COLLECTOR_LOG_DIR=${FORTSCALE_HOME}/${FORTSCALE_COLLECTOR_ROOT}
#export FORTSCALE_STREAMING_ROOT=streaming
#export FORTSCALE_STREAMING_LOG_DIR=/var/log/fortscale/${FORTSCALE_STREAMING_ROOT}
# Load Bash It
source $BASH_IT/bash_it.sh