-
-
Save sudodoki/b0d9e9320969aad65011 to your computer and use it in GitHub Desktop.
bashrc by sudodoki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
LIGHT_BLUE="\[\033[1;34m\]" | |
BLUE="\[\033[0;34m\]" | |
RED="\[\033[0;31m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
GREEN="\[\033[0;32m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias process='ps aux | grep' | |
alias server='python -m SimpleHTTPServer' | |
alias server2='ruby -run -e httpd . -p' | |
alias cls='printf "\033c"' | |
alias postgres='su - postgres -c "postgres -D /var/lib/pgsql/data" &' | |
alias elastic='/home/sudodoki/Projects/elasticsearch-0.20.5/bin/elasticsearch' | |
PS1="$LIGHT_GREEN\u@\h$WHITE:$LIGHT_BLUE\w$LIGHT_RED\$(__git_ps1)$LIGHT_GRAY\$ " | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
PATH=$PATH:$HOME/Projects/SCALA/sbt/bin #adding sbt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .zshrc | |
autoload -U colors && colors | |
setopt prompt_subst | |
LIGHT_BLUE="%{[33;1;34m%}" | |
LIGHT_RED="%{[33;1;31m%}" | |
LIGHT_GREEN="%{[33;1;32m%}" | |
WHITE="%{[33;1;37m%}" | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias process='ps aux | grep' | |
alias server='python -m SimpleHTTPServer' | |
alias server2='ruby -run -e httpd . -p' | |
alias cls='printf "\033c"' | |
alias ember_proto=initEmberProto | |
alias npme='npm --registry http://registry.npmjs.eu' | |
alias byport='netstat -tsuapn | grep' | |
alias byport2='netstat -nlp | grep ' | |
alias present=initCleaverServer | |
initEmberProto() { | |
git clone https://github.com/stefanpenner/ember-app-kit.git $1 | |
cd $_ | |
rm -rf .git | |
} | |
initCleaverServer() { | |
git clone https://github.com/sudodoki/cleaver-template.git $1 | |
cd $_ | |
rm -rf .git | |
npm install | |
grunt | |
} | |
initCleaver() { | |
# single argument is filename | |
mkdir $1 | |
cd $_ | |
touch $1.md | |
# if we are getting title too | |
if [ $2 ] | |
then | |
echo "title: $2" >> $1.md | |
else | |
echo "title: $1" >> $1.md | |
fi | |
echo "author:" >> $1.md | |
echo " name: sudodoki" >> $1.md | |
echo " email: smd.deluzion@gmail.com" >> $1.md | |
echo " twitter: sudodoki" >> $1.md | |
echo "output: $1.html" >> $1.md | |
cleaver $1.md | |
} | |
alias present2=initCleaver | |
alias presenter='export PS1="$LIGHT_GREEN%c$LIGHT_RED😱 $LIGHT_BLUE" && export RPROMPT=""' | |
alias stop_presenter='source ~/.zshrc' | |
alias lostcommit='git fsck --lost-found' | |
node_folder() { | |
if [ "$(print -l *.js(.N) 2>&1 | wc -w)" != "0" ] || [[ -f package.json || -f Gruntfile.json || -f grunt.js || -f bower.json ]] ; then | |
ref="[node `node -v`]" | |
else | |
ref='' | |
fi | |
echo $ref | |
} | |
ruby_folder() { | |
if [ "$(print -l *.rb(.N) 2>&1 | wc -w)" != "0" ] || [[ -f Gemfile || -f Gemfile.lock || -f config.ru ]] ; then | |
xef="[ruby `~/.rvm/bin/rvm-prompt`]" | |
else | |
xef='' | |
fi | |
echo $xef | |
} | |
source ~/.nvm/nvm.sh | |
nvm use 0.10.22 | |
source /usr/share/git-core/contrib/completion/git-prompt.sh | |
git_st='$(__git_ps1)' | |
node_st='$(node_folder)' | |
ruby_st='$(ruby_folder)' | |
PS1="$LIGHT_GREEN%n@%m%{$reset_color%}:$LIGHT_BLUE%~$LIGHT_RED$git_st%{$reset_color%}$ " | |
RPROMPT="$node_st$ruby_st" | |
# PS1="$>" # For presenter mode | |
autoload -U promptinit | |
promptinit | |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib | |
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig | |
export LD_LIBRARY_PATH | |
export PKG_CONFIG_PATH | |
PATH=$PATH:$HOME/mongodb-linux-x86_64-2.4.7/bin # Add mongo stuff | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias process='ps aux | grep' | |
alias server='python -m SimpleHTTPServer' | |
alias server2='ruby -run -e httpd . -p' | |
alias cls='printf "\033c"' | |
alias npme='npm --registry http://registry.npmjs.eu' | |
alias byport='netstat -tsuapn | grep' | |
alias byport2='netstat -nlp | grep ' | |
initCleaver() { | |
# single argument is filename | |
mkdir $1 | |
cd $_ | |
touch $1.md | |
# if we are getting title too | |
if [ $2 ] | |
then | |
echo "title: $2" >> $1.md | |
else | |
echo "title: $1" >> $1.md | |
fi | |
echo "author:" >> $1.md | |
echo " name: sudodoki" >> $1.md | |
echo " email: smd.deluzion@gmail.com" >> $1.md | |
echo " twitter: sudodoki" >> $1.md | |
echo "output: $1.html" >> $1.md | |
cleaver $1.md | |
} | |
alias present2=initCleaver | |
alias presenter='export PS1="$LIGHT_GREEN%c$LIGHT_RED😱 $LIGHT_BLUE" && export RPROMPT=""' | |
alias stop_presenter='source ~/.zshrc' | |
alias lostcommit='git fsck --lost-found' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
autoload -U colors && colors | |
setopt prompt_subst | |
LIGHT_BLUE="%{[33;1;34m%}" | |
LIGHT_RED="%{[33;1;31m%}" | |
LIGHT_GREEN="%{[33;1;32m%}" | |
WHITE="%{[33;1;37m%}" | |
ZSH_THEME_RVM_PROMPT_PREFIX="[" | |
ZSH_THEME_RVM_PROMPT_SUFFIX="]" | |
ZSH_THEME_GIT_PROMPT_PREFIX=" (" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=")" | |
ZSH_THEME_GIT_PROMPT_DIRTY="${VCS_DIRTY_COLOR}*${VCS_SUFIX_COLOR}" | |
node_folder() { | |
if [ "$(print -l *.js(.N) 2>&1 | wc -w | tr -d ' ')" != "0" ] || [[ -f package.json || -f Gruntfile.json || -f grunt.js || -f bower.json ]] ; then | |
ref="[node `node -v`]" | |
else | |
ref='' | |
fi | |
echo $ref | |
} | |
ruby_folder() { | |
if [ "$(print -l *.rb(.N) 2>&1 | wc -w | tr -d ' ')" != "0" ] || [[ -f Gemfile || -f Gemfile.lock || -f config.ru ]] ; then | |
xef="$(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info)" | |
else | |
xef='' | |
fi | |
echo $xef | |
} | |
git_st='$(git_prompt_info)' | |
node_st='$(node_folder)' | |
ruby_st='$(ruby_folder)' | |
PS1="$LIGHT_GREEN%n@%m%{$reset_color%}:$LIGHT_BLUE%~$LIGHT_RED$git_st%{$reset_color%}$ " | |
RPROMPT="$node_st$ruby_st" | |
autoload -U promptinit | |
promptinit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alias byport=netstat -tsuapn | grep
alias byport2=netstat -nlp | grep