<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gone on and getcha some!</title>
	<atom:link href="http://brianin3d.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brianin3d.wordpress.com</link>
	<description>Can you get up on it? Get your back up off the wall!</description>
	<lastBuildDate>Fri, 18 Dec 2009 17:41:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='brianin3d.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/bf9f09e9b3ac1ef84596407c7166f230?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Gone on and getcha some!</title>
		<link>http://brianin3d.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brianin3d.wordpress.com/osd.xml" title="Gone on and getcha some!" />
		<item>
		<title>upload a file to crx via sling and webdav</title>
		<link>http://brianin3d.wordpress.com/2009/12/18/upload-a-file-to-crx-via-sling-and-webdav/</link>
		<comments>http://brianin3d.wordpress.com/2009/12/18/upload-a-file-to-crx-via-sling-and-webdav/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 17:41:08 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[crx]]></category>
		<category><![CDATA[sing]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=422</guid>
		<description><![CDATA[

###############################################################################################
# some variables and aliases
secret="admin:admin"
host="crunky"
port="7402"
path="content/test_2009_12_18"
base="http://${host}:${port}/${path}"
file="x.xml"
alias crx="curl -u ${secret}"

###############################################################################################
# make a directory to put junk in
crx -X MKCOL "${base}"

###############################################################################################
# put/get sling style
crx -F"sling:resourceType=application/xml" -F"content=@${file}" ${base}/sling_test.xml
crx http://crunky:7402/content/test_2009_12_18/sling_test.xml/content

###############################################################################################
# put/get webdav style
crx -T ${file} ${base}/webdav_test.xml
crx http://crunky:7402/content/test_2009_12_18/webdav_test.xml

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=422&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://brianin3d.files.wordpress.com/2009/12/crx_sling_webdav_put.png"></p>
<pre>
###############################################################################################
# some variables and aliases
secret="admin:admin"
host="crunky"
port="7402"
path="content/test_2009_12_18"
base="http://${host}:${port}/${path}"
file="x.xml"
alias crx="curl -u ${secret}"

###############################################################################################
# make a directory to put junk in
crx -X MKCOL "${base}"

###############################################################################################
# put/get sling style
crx -F"sling:resourceType=application/xml" -F"content=@${file}" ${base}/sling_test.xml
crx http://crunky:7402/content/test_2009_12_18/sling_test.xml/content

###############################################################################################
# put/get webdav style
crx -T ${file} ${base}/webdav_test.xml
crx http://crunky:7402/content/test_2009_12_18/webdav_test.xml
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=422&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/12/18/upload-a-file-to-crx-via-sling-and-webdav/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>

		<media:content url="http://brianin3d.files.wordpress.com/2009/12/crx_sling_webdav_put.png" medium="image" />
	</item>
		<item>
		<title>pull analytics &#8220;site search terms&#8221; with google data api</title>
		<link>http://brianin3d.wordpress.com/2009/12/10/pull-analytics-site-search-terms-with-google-data-api/</link>
		<comments>http://brianin3d.wordpress.com/2009/12/10/pull-analytics-site-search-terms-with-google-data-api/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 13:57:56 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[data api]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=414</guid>
		<description><![CDATA[I&#8217;d heard about the google data api, but up until recently hadn&#8217;t found much practical use for it.
Suddenly I needed to pull back the top search terms for a site monitored by google analytics. The default view only shows 500 at a time. Granted this accounted for 30% of the &#8220;unique searches&#8217;, but I wanted [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=414&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;d heard about the google data api, but up until recently hadn&#8217;t found much practical use for it.</p>
<p>Suddenly I needed to pull back the top search terms for a site monitored by google analytics. The default view only shows 500 at a time. Granted this accounted for 30% of the &#8220;unique searches&#8217;, but I wanted to see a bit more.</p>
<p>Though it was sort of hard to find, I used the example script <a href="http://code.google.com/p/ga-api-http-samples/source/browse/trunk/src/v1/dataFeed.sh?r=2">dataFeed.sh</a> to retrieve the top 10k search terms.</p>
<p>The script wants you to set the variables for username/password and &#8220;PROFILE_ID&#8221; The value for this last is the id=xxxx in the url when you cruise around the analytics site.</p>
<p>Rather than read thru the quirky documentation as to what dimensions and metrics were available, I used the <a href="http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html">Data Feed Query Explorer</a> to find the values instead:</p>
<pre>
feedUri="https://www.google.com/analytics/feeds/data\
?start-date=2009-08-01\
&amp;end-date=2009-12-04\
&amp;dimensions=ga:searchKeyword\
&amp;metrics=ga:searchDepth,ga:searchDuration,ga:searchExits,ga:searchRefinements,ga:searchUniques,ga:searchVisits\
&amp;sort=-ga:searchUniques\
&amp;max-results=40000\
&amp;ids=ga:$PROFILE_ID\
&amp;prettyprint=true"

curl $feedUri -s --header "Authorization: GoogleLogin $googleAuth"
</pre>
<p>Despite the max-results of 40k, it looks like there is a max of 10k, which is fine.</p>
<p>All in all, pretty ez. Digging it all up.. sort of sucked.</p>
<p>Hence the write up&#8230; hope it helps some buddy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/414/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=414&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/12/10/pull-analytics-site-search-terms-with-google-data-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>print all tags in xml with xsl</title>
		<link>http://brianin3d.wordpress.com/2009/12/02/print-all-tags-in-xml-with-xsl/</link>
		<comments>http://brianin3d.wordpress.com/2009/12/02/print-all-tags-in-xml-with-xsl/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 20:03:55 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=401</guid>
		<description><![CDATA[Here is tags.xsl:

&#60;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml"&#62;
    &#60;xsl:output omit-xml-declaration="yes"/&#62;
        &#60;xsl:template match="*"&#62;
        &#60;xsl:value-of select="name()"/&#62;
        &#60;xsl:value-of select="'&#10;'"/&#62;
        &#60;xsl:apply-templates/&#62;
    &#60;/xsl:template&#62;
    &#60;xsl:template match="text()"/&#62;
&#60;/xsl:stylesheet&#62;

Use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=401&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here is tags.xsl:</p>
<pre>
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml"&gt;
    &lt;xsl:output omit-xml-declaration="yes"/&gt;
        &lt;xsl:template match="*"&gt;
        &lt;xsl:value-of select="name()"/&gt;
        &lt;xsl:value-of select="'&#10;'"/&gt;
        &lt;xsl:apply-templates/&gt;
    &lt;/xsl:template&gt;
    &lt;xsl:template match="text()"/&gt;
&lt;/xsl:stylesheet&gt;
</pre>
<p>Use it like this:  xsltproc tags.xsl individual_files/wikipedia.split.0000* | sort | uniq -c | sort -n</p>
<p>For example&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/401/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=401&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/12/02/print-all-tags-in-xml-with-xsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>bash: string to integer conversion</title>
		<link>http://brianin3d.wordpress.com/2009/11/11/bash-string-to-integer-conversion/</link>
		<comments>http://brianin3d.wordpress.com/2009/11/11/bash-string-to-integer-conversion/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:25:00 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=395</guid>
		<description><![CDATA[Bash arrays are odd, globally scoped critters which can only be indexed by integer values&#8230; but the values don&#8217;t have to be contiguous so they are sort of like hash maps&#8230; 
All you need is something to convert strings to integers, for example:

_map_string_to_integer() {
	echo ${*} &#124; od -t u1 &#124; sed 's,[^ ]*,,;s, ,,g;' &#124; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=395&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Bash arrays are odd, globally scoped critters which can only be indexed by integer values&#8230; but the values don&#8217;t have to be contiguous so they are sort of like hash maps&#8230; </p>
<p>All you need is something to convert strings to integers, for example:</p>
<pre>
_map_string_to_integer() {
	echo ${*} | od -t u1 | sed 's,[^ ]*,,;s, ,,g;' | tr -d '\n'
	echo
}
</pre>
<p>And you can use it like this:</p>
<pre>
% fun[$(_map_string_to_integer this)]="is neat"
% echo ${fun[$(_map_string_to_integer this)]}
is neat
</pre>
<p>if that is of any use to anyone&#8230;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=395&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/11/11/bash-string-to-integer-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>some improvement</title>
		<link>http://brianin3d.wordpress.com/2009/11/06/some-improvement/</link>
		<comments>http://brianin3d.wordpress.com/2009/11/06/some-improvement/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 15:15:22 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[carlin]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/2009/11/06/some-improvement/</guid>
		<description><![CDATA[Heard during the Georg Carlin interview:

The famous cellist Pablo Casals was in his 90s still doing the occasional recital. Someone asked him at that time, &#8216;Señor Casals, why after all you&#8217;ve achieved and such longevity do you practice three or four hours a day?&#8217; He said, &#8216;Well, I&#8217;m starting to notice some improvement.&#8217;

   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=394&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Heard during the <a href="http://www.youtube.com/watch?v=T1Vlv7nt9xY&amp;feature=PlayList&amp;p=ejqVycMWR4A">Georg Carlin interview</a>:</p>
<blockquote><p>
The famous cellist Pablo Casals was in his 90s still doing the occasional recital. Someone asked him at that time, &#8216;Señor Casals, why after all you&#8217;ve achieved and such longevity do you practice three or four hours a day?&#8217; He said, &#8216;Well, I&#8217;m starting to notice some improvement.&#8217;
</p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/394/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/394/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=394&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/11/06/some-improvement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>4 useful shell scripts for maven</title>
		<link>http://brianin3d.wordpress.com/2009/11/02/4-useful-shell-scripts-for-maven/</link>
		<comments>http://brianin3d.wordpress.com/2009/11/02/4-useful-shell-scripts-for-maven/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 20:22:10 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=387</guid>
		<description><![CDATA[yeah maven 
Maven (2 of course) is the jam when it comes to Java build systems. 
Ant is some old timey donkey-mess madness which doesn&#8217;t even address the issue of dynamic build dependency resolution. 
There are other build systems like: ivy, maven1, and made-up-mess, but the real goodness is the m2 universe. 
In addition, to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=387&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h2>yeah maven </h2>
<p>Maven (2 of course) is the jam when it comes to Java build systems. </p>
<p>Ant is some old timey donkey-mess madness which doesn&#8217;t even address the issue of dynamic build dependency resolution. </p>
<p>There are other build systems like: ivy, maven1, and made-up-mess, but the real goodness is the m2 universe. </p>
<p>In addition, to it&#8217;s main duties, maven produces a really neat resource in the form of your local repository (mine lives in ${HOME}/.m2/repository). </p>
<p>The dependencies your project pulls in also pull in dependencies and some of them are cool things you didn&#8217;t even know you couldn&#8217;t live without! </p>
<p>Here are a few scripts I use to leverage a little bit of that powerful force for funtimes! </p>
<h2>m2_cp.sh : maven classpath </h2>
<p>Maven compiles all your code and runs all your test cases. To do that it has to use an olde timey classpath just like duh, but &#8230;. how can you get at it when all you see is your pom.xml? </p>
<p>You can use the olde school trick: mvn -X test -Dmaven.test.skip=true ; and scrap it out of there </p>
<p>Or&#8230; you can use my little <a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_cp.sh">m2_cp.sh </a> and it will parse it out for you into a file called &#8220;m2_cp.txt&#8221; that you can use to play more reindeer games. </p>
<p>Like what? </p>
<p>Like packaging up some tarball+script to run your stuff, or some uberJar (though the <a href="http://maven.apache.org/plugins/maven-assembly-plugin/">assembly plugin</a> is a better solution for that), or maybe some&#8230; </p>
<h2>m2_javap.sh : all your class are&#8230; ok&#8230; </h2>
<p>Almost every Java developer uses an IDE. They pretty much all use eclipse. </p>
<p>I&#8217;m in that oddball 0.01% that just uses eclipse as a remote debugger&#8230; so&#8230; I use a lot of command line tools instead, for example: javap </p>
<p>The javap command will print the method signatures given a list of class names. But&#8230; you have to feed it a classpath. </p>
<p>In tricky eclipse, this happens like magic! Neat! But&#8230; as a magician, I want to be the magical man&#8230; so&#8230; </p>
<p>When I&#8217;m working on say, a portlet project (from maven-archetype-portlet), and I&#8217;m wanting to see some good times, I type: <a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_javap.sh">m2_javap.sh </a> javax.portlet.GenericPortlet </p>
<p>
Even that too much bother? How &#8217;bout:  <a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_javap.sh">m2_javap.sh </a> GenericPortlet </p>
</p>
<h2>m2_latest.sh : to the greatest </h2>
<p>Ever use log4j in a project? Ha! Yeah&#8230; so now you have a new project and you want to pull it in again&#8230; what as the most recent version: <a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_latest.sh">m2_latest.sh </a> log4j ; tells you the jar </p>
<h2>m2_dep.sh : jar file to dependency </h2>
<p>OK, so you need log4j, and the latest is ${HOME}/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar ; time to start typing that annoying stanza&#8230; but wait: </p>
<p>
<a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_latest.sh">m2_latest.sh </a> log4j | <a href="http://brianin3d-misc.googlecode.com/svn/trunk/scripts/m2_dep.sh">m2_dep.sh </a> </p>
<pre class="code">
% m2_latest.sh log4j | m2_dep.sh

&lt;dependency&gt;
&lt;groupId&gt;log4j&lt;/groupId&gt;
&lt;artifactId&gt;log4j&lt;/artifactId&gt;
&lt;version&gt;1.2.14&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<h2>Script it up</h2>
<p>The local repo is really neato! Perfect scripting fodder! Good times&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/387/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=387&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/11/02/4-useful-shell-scripts-for-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>scripting essentials: fullpath</title>
		<link>http://brianin3d.wordpress.com/2009/10/30/scripting-essentials-fullpath/</link>
		<comments>http://brianin3d.wordpress.com/2009/10/30/scripting-essentials-fullpath/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 14:48:48 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[fullpath]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=384</guid>
		<description><![CDATA[One of the things you end up doing in cli world a lot is jacking around with files. 
Usually you are doing some junk with files in some (collection of) terminal(s) with a given working directory and referring to files with a local path eg: src/main/webapp/WEB-INF/web.xml
Then&#8230; for some reason, you want to manipulate them from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=384&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the things you end up doing in cli world a lot is jacking around with files. </p>
<p>Usually you are doing some junk with files in some (collection of) terminal(s) with a given working directory and referring to files with a local path eg: src/main/webapp/WEB-INF/web.xml</p>
<p>Then&#8230; for some reason, you want to manipulate them from another context, maybe a browser or some shells doing stuff in another working directory. In some cases you could change working directories, but is that really what you want? </p>
<p>Kind of breaks the flow, doesn&#8217;t it? &#8220;Now let me hop over here&#8230;&#8221;</p>
<p>Why are you hopping? You want to grep  src/main/webapp/WEB-INF/web.xml? Just use the fullpath name, eg:  /home/jameson/src/devilish/src/main/webapp/WEB-INF/web.xml !</p>
<p>But how? EZ: echo ${PWD}/src/main/webapp/WEB-INF/web.xml </p>
<p>By jamming around the fullname instead of hopping around the filesystem like a bunny rabbit, you will be better able to maintain the separation between the different contexts of your activities.</p>
<p>Ya dig it? If not, try this approach out for a while and see if you can feel the difference.</p>
<p>To make this easier, I prefer to use a bash function like this:</p>
<pre>
fullpath() {
    local f
    for f in ${*}; do
        (
		 	(
			 	cd ${f} &amp;&amp; echo ${PWD}
			) || (
			 	cd $(dirname ${f} ) &amp;&amp; echo ${PWD}/$( basename ${f} )
			)
		) 2&gt; /dev/null
    done
}
</pre>
<p>This takes care of some annoying corner cases that I can&#8217;t remember at the moment&#8230; but feel free to shorten it</p>
<p>This tip says: move the world around your mind, not your mind around the world.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/384/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=384&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/10/30/scripting-essentials-fullpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>lame java collection erasure problem</title>
		<link>http://brianin3d.wordpress.com/2009/10/28/lame-java-collection-erasure-problem/</link>
		<comments>http://brianin3d.wordpress.com/2009/10/28/lame-java-collection-erasure-problem/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 12:50:23 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[whining]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=381</guid>
		<description><![CDATA[Just ran into an example of where Java&#8217;s dumb erasure strategy just didn&#8217;t cut it.
I wrote a small class to collect up vararg junk into typed collections, something like:

public class Collector {
    public Collection collect( typename... vs ) {...}
    public Collection collect( Collection collection, typename... vs ) {...}
};

This worked [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=381&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just ran into an example of where Java&#8217;s dumb erasure strategy just didn&#8217;t cut it.</p>
<p>I wrote a small class to collect up vararg junk into typed collections, something like:</p>
<pre>
public class Collector {
    public Collection collect( typename... vs ) {...}
    public Collection collect( Collection collection, typename... vs ) {...}
};
</pre>
<p>This worked fine up until the point where the typename was a typed collection, at which point the second method was invoked instead.</p>
<p>My work around was to rename the latter to &#8220;collectInto&#8221;</p>
<p>Lame&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/381/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=381&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/10/28/lame-java-collection-erasure-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>pretty column (field) printing with awk</title>
		<link>http://brianin3d.wordpress.com/2009/10/27/pretty-column-field-printing-with-awk/</link>
		<comments>http://brianin3d.wordpress.com/2009/10/27/pretty-column-field-printing-with-awk/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 18:35:09 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[pretty printing]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=374</guid>
		<description><![CDATA[You know what you have to do&#8230; you have to collect all the strings for every field, keep the max length for each column, then at the end spit them back out again.
But&#8230; you need to store each field for each row and awk only supports 1 dimensional arrays&#8230; suck it up and say the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=374&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You know what you have to do&#8230; you have to collect all the strings for every field, keep the max length for each column, then at the end spit them back out again.</p>
<p>But&#8230; you need to store each field for each row and awk only supports 1 dimensional arrays&#8230; suck it up and say the script only supports up to a max of 255 fields:</p>
<pre>
BEGIN {
	row = 0
	max_fields = 0;
	super_max = 255;
} {
	for ( i = 1 ; i &lt;= NF ; i++ ) {
		idx = row + super_max * i;
		len = length( $i );
		data[ idx ] = $i;
		if ( len &gt; max[ i ] ) {
			max[ i ] = len;
		}
	}
	if ( NF &gt; max_fields ) {
		max_fields= NF;
	}
	row++;
} END {
	for ( r = 0 ; r &lt; row ; r++ ) {
		for ( i = 1 ; i &lt;= max_fields ; i++ ) {
			idx = r + super_max * i;
			fmt = "%-" max[ i ]  "s ";
			printf( fmt , data[ idx ], max[ i ]  );
		}
		printf( "\n" );
	}
}
</pre>
<p><a href="http://brianin3d.googlepages.com/columnbo.awk">columnbo.awk</a></p>
<p>Here is some prettified output:</p>
<pre>
this.logger            = logger;
this.dataSourceFactory = dataSourceFactory;
this.wsdlUrl           = wsdlUrl;
this.wsdlKey           = wsdlKey;
this.documentDAO       = documentDAO;
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=374&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/10/27/pretty-column-field-printing-with-awk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
		<item>
		<title>dear maven,  yes! I want to use fckng java 1.5 generics, you ass!</title>
		<link>http://brianin3d.wordpress.com/2009/10/25/dear-maven-yes-i-want-to-use-fckng-java-1-5-generics-you-ass/</link>
		<comments>http://brianin3d.wordpress.com/2009/10/25/dear-maven-yes-i-want-to-use-fckng-java-1-5-generics-you-ass/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 17:23:35 +0000</pubDate>
		<dc:creator>brianin3d</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[whining]]></category>

		<guid isPermaLink="false">http://brianin3d.wordpress.com/?p=367</guid>
		<description><![CDATA[OMG! I am so&#8230;. tired of doing this for every new archetype&#8217;d project:

&#60;build&#62;
	&#60;plugins&#62;
		&#60;plugin&#62;
			&#60;!-- seriously? --&#62;
			&#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62;
			&#60;artifactId&#62;maven-compiler-plugin&#60;/artifactId&#62;
			&#60;configuration&#62;
				&#60;source&#62;1.5&#60;/source&#62;
				&#60;target&#62;1.5&#60;/target&#62;
			&#60;/configuration&#62;
		&#60;/plugin&#62;
	&#60;/plugins&#62;
&#60;/build&#62;

The gnashing of teeth!
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=367&subd=brianin3d&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>OMG! I am <b>so</b>&#8230;. tired of doing this for every new archetype&#8217;d project:</p>
<pre>
&lt;build&gt;
	&lt;plugins&gt;
		&lt;plugin&gt;
			&lt;!-- seriously? --&gt;
			&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
			&lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
			&lt;configuration&gt;
				&lt;source&gt;1.5&lt;/source&gt;
				&lt;target&gt;1.5&lt;/target&gt;
			&lt;/configuration&gt;
		&lt;/plugin&gt;
	&lt;/plugins&gt;
&lt;/build&gt;
</pre>
<p>The gnashing of teeth!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brianin3d.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brianin3d.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brianin3d.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brianin3d.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brianin3d.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brianin3d.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brianin3d.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brianin3d.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brianin3d.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brianin3d.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brianin3d.wordpress.com&blog=3685636&post=367&subd=brianin3d&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://brianin3d.wordpress.com/2009/10/25/dear-maven-yes-i-want-to-use-fckng-java-1-5-generics-you-ass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">brianin3d</media:title>
		</media:content>
	</item>
	</channel>
</rss>