Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mattmcmanus/dotfiles
Browse files Browse the repository at this point in the history
* 'master' of github.com:mattmcmanus/dotfiles:
  Fixing an error for bash completion
  Added symfony bash completion
  Fixing type
  Updated w2h helper script and added new node_env variable
  Added two new helper scripts
  Added RVM to path
  Moved macports export to exports file
  SVN aliases
  Disabling animations in finder
  Path and osx tweaks
  Tweaking the prompt
  • Loading branch information
mattmcmanus committed Oct 6, 2012
2 parents cac4e82 + 1e9ce17 commit 0ffaddf
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 11 deletions.
21 changes: 21 additions & 0 deletions bash_completion/symfony_complete.symlink
@@ -0,0 +1,21 @@
# Bash symfony completion
#
_symfony()
{
local cmds cur colonprefixes

cmds="$( ${COMP_WORDS[0]} | perl -ne 'if( /^([a-zA-Z0-9\-]+)/ ) { $first = $1; } elsif ( /^\s*(:[a-zA-Z0-9\-]+)/ ) { print $first . $1 . "\n"; }' )"
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
# Work-around bash_completion issue where bash interprets a colon as a separator.
# Work-around borrowed from the darcs work-around for the same issue.
colonprefixes=${cur%"${cur##*:}"}
COMPREPLY=( $(compgen -W '$cmds' -- $cur))
local i=${#COMPREPLY[*]}
while [ $((--i)) -ge 0 ]; do
COMPREPLY[$i]=${COMPREPLY[$i]#"$colonprefixes"}
done

return 0
} &&
complete -F _symfony symfony
4 changes: 4 additions & 0 deletions bin/start-dev
@@ -0,0 +1,4 @@
#!/bin/sh

sudo apachectl start
sudo /opt/local/bin/mysqld_safe5
4 changes: 4 additions & 0 deletions bin/stop-dev
@@ -0,0 +1,4 @@
#!/bin/sh

sudo apachectl stop
sudo /opt/local/bin/mysqld_safe5
23 changes: 23 additions & 0 deletions bin/w2h-fresh
@@ -0,0 +1,23 @@
#!/bin/sh

echo ' --> SVN Update'
svn up -q

echo ' --> W2H: Syncing Prod'
./symfony w2h:sync-prod -q

echo ' --> Doctrine: Migrate'
./symfony doctrine:migrate -q

echo ' --> Doctrine: Build all classes'
./symfony doctrine:build --all-classes -q

echo ' --> W2H: Project Permissions'
./symfony project:permissions -q

echo ' --> W2H: Cleaning Cache'
./symfony cc -q

echo '- - - - - - - - - - - - - - - - - - - - - - - -'
echo ' COMPLETE. So clean, so fresh. GO TO WORK!'
echo '- - - - - - - - - - - - - - - - - - - - - - - -'
13 changes: 8 additions & 5 deletions osx/set-defaults.sh
Expand Up @@ -53,6 +53,9 @@ defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
# Disable opening and closing window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Disable window animations and Get Info animations in Finder:
defaults write com.apple.finder DisableAllAnimations -bool true

# Increase window resize speed for Cocoa applications
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001

Expand Down Expand Up @@ -87,10 +90,10 @@ defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

# Map bottom right Trackpad corner to right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
#defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
#defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true

# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
Expand Down Expand Up @@ -246,4 +249,4 @@ hash tmutil &> /dev/null && sudo tmutil disablelocal

# Kill affected applications
for app in Finder Dock Mail Safari iTunes iCal Address\ Book SystemUIServer; do killall "$app" > /dev/null 2>&1; done
echo "Done. Note that some of these changes require a logout/restart to take effect."
echo "Done. Note that some of these changes require a logout/restart to take effect."
4 changes: 3 additions & 1 deletion system/aliases.symlink
Expand Up @@ -112,4 +112,6 @@ alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -proot shutdown'

# SVN
alias svn-upi='svn up --ignore-externals'
alias svn-sadd="svn stat | grep ? | awk '{ print \$2 }' | xargs svn add"
alias svn-sadd="svn stat | grep ? | awk '{ print \$2 }' | xargs svn add"
alias svn-sti='svn st --ignore-externals'
alias svn-ee='svn pe svn:externals .'
14 changes: 12 additions & 2 deletions system/bash_profile.symlink
Expand Up @@ -30,5 +30,15 @@ complete -o "nospace" -W "Finder Dock Mail Safari iTunes iCal Address\ Book Syst

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

# Macports
export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:$PATH
# {{{
# Node Completion - Auto-generated, do not touch.
shopt -s progcomp
for f in $(command ls ~/.node-completion); do
f="$HOME/.node-completion/$f"
test -f "$f" && . "$f"
done
# }}}

if [ -e ~/.symfony_complete ]; then
. ~/.symfony_complete
fi
2 changes: 1 addition & 1 deletion system/bash_prompt.symlink
Expand Up @@ -76,4 +76,4 @@ function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}

PS1="\n\[${BLUE}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$CYAN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$GREEN\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
PS1="\n\[${BLUE}\]\u\[$WHITE\] @ \[$ORANGE\]\h\[$WHITE\] : \[$CYAN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$GREEN\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
3 changes: 2 additions & 1 deletion system/bashrc.symlink
@@ -1 +1,2 @@
[ -n "$PS1" ] && source ~/.bash_profile
[ -n "$PS1" ] && source ~/.bash_profile
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
9 changes: 8 additions & 1 deletion system/exports.symlink
Expand Up @@ -14,10 +14,17 @@ export HISTCONTROL=ignoredups
# Make some commands not show up in history
export HISTIGNORE="ls:ls *:cd:cd -:pwd;exit:date:* --help"


# Node Config
PATH=$PATH:~/local/bin
PATH=~/local/bin:$PATH
PATH=$PATH:~/.dotfiles/bin
export PATH

export NODE_ENV="development"

#macports
export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:/opt/local/lib/php/pear/bin:$PATH

PREFIX=~/local
export PREFIX

Expand Down
3 changes: 3 additions & 0 deletions vim/vim.symlink/.netrwhist
@@ -0,0 +1,3 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =1
let g:netrw_dirhist_1='/opt/local/etc/php5'

0 comments on commit 0ffaddf

Please sign in to comment.