Commits

tednaleid committed a168c89

updated with compinstall to open files in markdown directory

  • Participants
  • Parent commits c7473e4

Comments (0)

Files changed (3)

File zshrc_compinstall

 zstyle ':completion:*' menu select
 zstyle ':completion:*' verbose yes
 
-## GRAILS COMPLETION 
-
-source $ZSHDIR/zshrc_grails_compinstall
+source $ZSHDIR/zshrc_compdef

File zshrc_general

 
 export USER_LIB=/Users/$USER/Documents/workspace/lib
  
-export JAVA_HOME=$(/usr/libexec/java_home)
+# export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
+export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
+# export JAVA_HOME=$(/usr/libexec/java_home)
 
-export SCALA_HOME=/usr/local/scala
+export SCALA_HOME='/usr/local/scala'
 
 export SVN_EDITOR='/usr/local/bin/mate -w'
 
 export JAVA_OPTS="-Xmx2048m -XX:MaxPermSize=512m"
 
 #export GRADLE_OPTS="-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m"
-export GRADLE_HOME='/usr/local/gradle'
+export GRADLE_HOME=$HOME/.gvm/gradle/current
 export GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
 export GRADLE_REPOSITORY="$HOME/.gradle"
 
 # for X11 forwarding, (need to have X11.app running (in applications/utilities after install))
 export DISPLAY="localhost:0.0"
 
+
+export P4PORT=scmprd1.pv.local:1888
+export P4USER=vnalete
+export P4CLIENT=vnalete
+export P4HOST=blackbird.local
+#export P4CLIENT=vnalete2
+export P4EDITOR=vim
+export P4CONFIG=.p4config
+
 export WORKSPACE_DIR=~/Documents/workspace
 export CATALINA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8999,server=y,suspend=n -Djava.awt.headless=true'
 export CATALINA_HOME='/usr/local/tomcat'
 
-export GRAILS_HOME='/usr/local/grails'
-export GROOVY_HOME='/usr/local/groovy'
-export VERTX_HOME='/usr/local/vertx'
+export JBOSS_HOME='/usr/local/jboss'
+
+export GRAILS_HOME=$HOME/.gvm/grails/current
+export GROOVY_HOME=$HOME/.gvm/groovy/current
+export VERTX_HOME=$HOME/.gvm/vertx/current
+
+export PLAY_HOME='/usr/local/play'
 
 export MONGODB_HOME='/usr/local/mongodb'
 
 export RUBYOPT=rubygems
 
-PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$GROOVY_HOME/bin:$GRAILS_HOME/bin:$GRADLE_HOME/bin:$VERTX_HOME/bin:/usr/local/redis:$CATALINA_HOME/bin:${PATH}"
+PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$GROOVY_HOME/bin:$GRAILS_HOME/bin:$PLAY_HOME:$SCALA_HOME/bin:$GRADLE_HOME/bin:$VERTX_HOME/bin:/usr/local/redis:$CATALINA_HOME/bin:${PATH}"
 
 export WORDS=/usr/share/dict/words
 
     cutcol 1 $1 | sed -e 's/<\(.*\)>/\1/'
 }
 
+# cd into whatever is the forefront Finder window.
+cdf() {  # short for cdfinder
+  cd "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"
+}
+
+# fix blank subl window, from: https://gist.github.com/4500280 
+function subl() {
+    if [[ ! -p /dev/stdin ]]; then
+        command subl > /dev/null 2>&1
+    fi
+    command subl "$@"
+}
+
+alias osp="subl --project *.sublime-project"
+
 # from steve losh tweet
 alias collapse="sed -e 's/  */ /g'"
 alias cuts="cut -d' '"
 alias v='mvim'
 alias vz='v $ZSHDIR'
 
+alias sz='subl $ZSHDIR'
+
+export SUBL_PACKAGES=$HOME/Library/Application\ Support/Sublime\ Text\ 2/Packages
+
+alias ssp="subl '$SUBL_PACKAGES'"
+alias cdsp="cd '$SUBL_PACKAGES'"
+
 alias pse='ps -ef | grep'
 
 alias e='emacs'
 alias pbjsontidy='pbpaste | python -mjson.tool'
 
 
+# colorized cat
+alias c='pygmentize -O style=monokai -f console256 -g'
+
+
+# Empty the Trash on all mounted volumes and the main HDD
+# Also, clear Apple’s System Logs to improve shell startup speed
+alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
+
 # brew install xmlstarlet
 # sudo easy_install pygments
 alias xmlpretty='xml fo | pygmentize -l xml' 
 END
 }
 
+
+# from:  https://gist.github.com/SlexAxton/4989674
+
+gifify() {
+  if [[ -n "$1" ]]; then
+    if [[ $2 == '--good' ]]; then
+      ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
+      time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png  GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
+      rm out-static*.png
+    else
+      ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
+    fi
+  else
+    echo "proper usage: gifify <input_movie.mov>. You DO need to include extension."
+  fi
+}
+
 ## VERSION CONTROL ############################################################################################################
 
 alias gs="git status --short"
 
 ## GROOVY/GRAILS ############################################################################################################
 
-alias rmideacache='rm -rf ~/Library/Caches/IntelliJIdea11/caches'
+alias rmideacache='rm -rf ~/Library/Caches/IntelliJIdea12/caches'
 
-alias oi="open *.ipr"
+alias oi='open -b com.jetbrains.intellij .'
 
-alias tpush='hg commit || hg fetch && gta && hg push'
-alias tspush='hg commit || hg fetch && splitTests.groovy && hg push'
-
-alias idea='open -a /Applications/Maia-IU-95.214.app'
 alias g='grails'
 
 alias gkill='kill -9 $(jps | grep GrailsStarter | cut -f1 -d\ )'
 alias g200='switchGrails "groovy-1.8.4" "grails-2.0.0"'
 alias g201='switchGrails "groovy-1.8.6" "grails-2.0.1"'
 alias g203='switchGrails "groovy-1.8.6" "grails-2.0.3"'
+alias g203g2='switchGrails "groovy-2.0.5" "grails-2.0.3"'
 alias g204='switchGrails "groovy-1.8.6" "grails-2.0.4"'
 alias g210='switchGrails "groovy-1.8.6" "grails-2.1.0"'
 alias ggit='switchGrails "groovy-1.8.4" "grails-git"'
     }
 }
 
-wrapper(type: Wrapper)
+task wrapper(type: Wrapper) {
     gradleVersion = '1.0'
 }
 
     ls -a1 && find src    # list all created assets
 }
 
+# too annoying to have it suggest corrections for .idea when I want idea
+alias gradle='nocorrect gradle'
+#alias gradleall='gradle liquibaseDropAll liquibaseUpdate clean build war explodedWar'
+alias gradleall='gradle clean build war explodedWar'
+
 ## HADOOP ##########################################################################################################
 
 export HADOOP_VERSION=hadoop-0.20.2-cdh3u3

File zshrc_grails_compinstall

-
-_property_value() {
-    grep $1 application.properties | sed -E 's/(.*)=(.*)$/\2/'
-}
-
-_grails_version() {
-	_property_value app.grails.version
-}
-
-_grails_project_name() {
-    _property_value app.name
-}
-
-_grails_script_dirs() {
-	local SCRIPT_DIRS="$GRAILS_HOME/scripts ~/.grails/scripts ./scripts"
-	for PLUGIN_DIR in ~/.grails/$(_grails_version)/projects/$(_grails_project_name)/plugins/*/scripts; do
-		SCRIPT_DIRS="$SCRIPT_DIRS $PLUGIN_DIR"
-	done
-	echo $SCRIPT_DIRS
-}
-
-_grails_scripts() {	
-	for D in $(_grails_script_dirs); do
-		if [ -d $D ]
-			then ls -1 $D/* | grep -e ".groovy$" | sed -E 's/(.*)\/(.*)\.groovy$/\2/' | sed -E 's/([A-Z])/-\1/g' | sed -E 's/^-//' | tr "[:upper:]" "[:lower:]"
-		fi
-	done | sort | uniq | grep -vE "^_" 	
-}
-
-_grails_tests() {
-	if [ -d test ] 
-		then ls -1 test/**/*Tests.* | sed -E 's/(test\/[^\/]*\/)(.*)(Tests.*)/\2/' | uniq | tr \/ .
-    fi	
-}
-
-_grails() {
-	if (( CURRENT == 2 )); then
-		scripts=( $(_grails_scripts) )
-		_sep_parts scripts
-    else
-		tests=( $(_grails_tests) )
-       	_multi_parts . tests
-   	fi
-}
-
-compdef _grails grails
-
-_hg_commands() {
-	hg debugcomplete
-}
-
-_hg_branches() {
-    hg branches | sed -E 's/(.*) .*/\1/g'
-    hg bookmarks | sed -E 's/(.*) .*/\1/g'
-}
-
-_hg() {
-	if (( CURRENT == 2 )); then
-		hg_commands=( $(_hg_commands) )
-		_sep_parts hg_commands
-    else
-		hg_branches=( $(_hg_branches) )
-       	_sep_parts hg_branches
-   	fi
-}
-
-compdef _hg hg
-
-# speed up git autocompletion, don't care about remote files just local branches and files, otherwise have to hit ctrl-c to get completion to short circuit before heat death of universe
-__git_files () { 
-    _wanted files expl 'local files' _files
-}
-