Skip to content

Instantly share code, notes, and snippets.

@davidneedham
Last active December 20, 2015 20:48
Show Gist options
  • Save davidneedham/6192481 to your computer and use it in GitHub Desktop.
Save davidneedham/6192481 to your computer and use it in GitHub Desktop.
A .bash_profile made specifically for use on DREAMHOST.
#-------------------------------
# GIT
#-------------------------------
# A 'better' git status information
alias gss='git status -s'
# Git add, commit with message, and push
alias gacp=git_add_all_commit_push
function git_add_all_commit_push () {
git add --all;
git commit -am "$1";
git push;
}
#-------------------------------
# Drush
#-------------------------------
# Clear the cache and assume yes for all prompts
alias dcc='drush cc all -y'
# Navigate to webroot from any subdir
alias cdd='cd `drush dd`'
#-------------------------------
# Setting up the console / environment
#-------------------------------
# Changes my prompt
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
# Enables coloring of the terminal and colors them specifically
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# I prefer nano in the terminal
export EDITOR=nano
# Set up drush
alias drush='~/drush/drush'
#-------------------------------
# Scripts to run the first time
#-------------------------------
function setup_ssh () {
mkdir ~/.ssh;
chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/;
}
function setup_drush () {
wget http://ftp.drupal.org/files/projects/drush-7.x-5.9.tar.gz;
tar -zxf drush-7.x-5.9.tar.gz;
}
function optimize_php_53 () {
mkdir -p ~/.php/5.3;
echo "memory_limit = 128M
upload_max_filesize = 30M
post_max_size = 30M" >> ~/.php/5.3/phprc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment