Skip to content

Instantly share code, notes, and snippets.

@dominiccooney
dominiccooney / where.cmd
Created October 16, 2009 04:54
'which' for .bat files
REM Raymond Chen's replacement for Unix 'which'
@for %%e in (%PATHEXT%;.DLL) do @for %%i in (%1%%e) do @if NOT "%%~$PATH:i"==""
echo %%~$PATH:i
@dominiccooney
dominiccooney / find-svn-commit.sh
Created October 11, 2009 00:19
Find the git commit of an svn revision
#!/bin/bash
# Parses git log and finds the commit with the specified svn change
# number.
git log | awk "/^commit / {c=\$2} /git-svn-id:.*@$1 / {print c}"
# This is obsoleted by git svn find-rev rNNNN
@dominiccooney
dominiccooney / GWT Notes
Created May 4, 2009 21:44
GWT Development Tips
An Ant rule for restarting Tomcat when building a GWT app:
<target name="deploy" depends="war" description="Copy WAR file to Tomcat">
<property name="apache.home"
location="/home/dominicc/apache-tomcat-6.0.18" />
<exec executable="${apache.home}/bin/shutdown.sh" />
<delete dir="${apache.home}/webapps/TestApp" failonerror="false" />
<copy todir="${apache.home}/webapps" file="TestApp.war" />
<exec executable="${apache.home}/bin/startup.sh" />
</target>