<?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/"
	>

<channel>
	<title>Codedrop™ Weblog</title>
	<atom:link href="http://www.codedrop.ca/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codedrop.ca/blog</link>
	<description>Drop'n some code and other tech tidbits...</description>
	<lastBuildDate>Tue, 09 Mar 2010 05:36:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting &#8216;YYYYMMDDhhmmss&#8217; date format in a MS Windows script&#8230; yuck!</title>
		<link>http://www.codedrop.ca/blog/archives/216</link>
		<comments>http://www.codedrop.ca/blog/archives/216#comments</comments>
		<pubDate>Fri, 05 Mar 2010 00:21:22 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=216</guid>
		<description><![CDATA[I had the painful experience of recently having to update some windows .bat scripts with some new functionality&#8230;. I&#8217;ve pleasantly re-affirmed why I DON&#8217;T WORK ON A WINDOWS PLATFORM!&#8230; 
In any event, for any of you poor suckers that do and need access to datetime components within a batch, here&#8217;s an ugly solution&#8230; If you [...]]]></description>
			<content:encoded><![CDATA[<p>I had the painful experience of recently having to update some windows .bat scripts with some new functionality&#8230;. I&#8217;ve pleasantly re-affirmed why I DON&#8217;T WORK ON A WINDOWS PLATFORM!&#8230; </p>
<p>In any event, for any of you poor suckers that do and need access to datetime components within a batch, here&#8217;s an ugly solution&#8230; If you know of a better way.. I&#8217;m all ears!</p>
<p><code>echo %DATE% %TIME% > datefile.txt<br />
REM parse Datefile (format mon MM-DD-YYYY (US date and time setting default))<br />
For /F "tokens=2,3,4 delims=/ " %%a in (datefile.txt) do (set CurrentMonth=%%a&#038;&#038; set currentDate=%%b&#038;&#038; set /A currentYear=%%c)<br />
For /F "tokens=3,4,5 delims=: " %%a in (datefile.txt) do (set CurrentHour=%%a&#038;&#038; set currentMinute=%%b&#038;&#038; set currentSecond=%%c)<br />
echo Timstamp is: %CurrentYear%%CurrentMonth%%CurrentDate%%CurrentHour%%CurrentMinute%%CurrentSecond%<br />
</code></p>
<p>God help us all thats fugly!</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Getting+%E2%80%98YYYYMMDDhhmmss%E2%80%99+date+format+in+a+MS+Windows+script%E2%80%A6+yuck%21+http://cfs29.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Getting+%E2%80%98YYYYMMDDhhmmss%E2%80%99+date+format+in+a+MS+Windows+script%E2%80%A6+yuck%21+http://cfs29.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/216/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql, Rmagick on Snow Leopard, Homebrew to the rescue!</title>
		<link>http://www.codedrop.ca/blog/archives/214</link>
		<comments>http://www.codedrop.ca/blog/archives/214#comments</comments>
		<pubDate>Sun, 28 Feb 2010 06:30:00 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=214</guid>
		<description><![CDATA[Well after sitting on my install disks for a few months I finally figured I better upgrade my primary MacBook Pro.  As expected, my rails projects and several other things did not function&#8230;. Rmagick and MySql were borked as well..  
After spending several nights reinstalling Xcode, updating my macports, trying to compile from [...]]]></description>
			<content:encoded><![CDATA[<p>Well after sitting on my install disks for a few months I finally figured I better upgrade my primary MacBook Pro.  As expected, my rails projects and several other things did not function&#8230;. Rmagick and MySql were borked as well..  </p>
<p>After spending several nights reinstalling Xcode, updating my macports, trying to compile from src to no avail I had someone recommend Homebrew to me.  At first I figured.. meh.. another package manager that won&#8217;t work&#8230; suprisingly.. it did!.. Macports is garbage in comparison.. so to get to the good stuff.. here&#8217;s the steps to take if you find yourself in this situation!</p>
<p>1) Best to start clean.. first thing was to wipe the macports installs.</p>
<p><code><br />
sudo port -f uninstall installed</p>
<p>sudo rm -rf /opt/local \<br />
/Applications/MacPorts \<br />
/Applications/DarwinPorts \<br />
/Library/Tcl/macports1.0 \<br />
/Library/Tcl/darwinports1.0 \<br />
/Library/LaunchDaemons/org.macports.* \<br />
/Library/StartupItems/DarwinPortsStartup \<br />
/Library/Receipts/MacPorts*.pkg \<br />
/Library/Receipts/DarwinPorts*.pkg \<br />
~/.macports<br />
</code></p>
<p>2) Download and install the latest XCode development tools..  your DVD is probably out of date.  Ensure that the optional components for command line development are installed (&#8221;Unix Development&#8221; in the Xcode 3.x installer). Also include the X11 items.</p>
<p>3) Rebooted and hold down &#8216;6&#8242; and &#8216;4&#8242; keys to switch to 64 bit mode&#8230; (by default snow leopard boots in 32 bit mode.. you can check this in the System Profiler).</p>
<p>4) Install homebrew<br />
sudo chown -R `whoami` /usr/local<br />
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz &#8211;strip 1 -C /usr/local<br />
brew install git</p>
<p>5) Install mysql<br />
brew install mysql<br />
export ARCHFLAGS=&#8221;-arch i386 -arch x86_64&#8243;<br />
gem install mysql &#8212; &#8211;with-mysql-dir=/usr/local \<br />
&#8211;with-mysql-config=/usr/local/bin/mysql_config</p>
<p>6) Install imagemagick<br />
brew install imagemagick</p>
<p>and finally:</p>
<p>7) sudo gem install rmagick</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Mysql%2C+Rmagick+on+Snow+Leopard%2C+Homebrew+to+the+rescue%21+http://ogqwc.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Mysql%2C+Rmagick+on+Snow+Leopard%2C+Homebrew+to+the+rescue%21+http://ogqwc.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/214/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use your DNS-323 for Time Machine backups.</title>
		<link>http://www.codedrop.ca/blog/archives/212</link>
		<comments>http://www.codedrop.ca/blog/archives/212#comments</comments>
		<pubDate>Wed, 13 Jan 2010 06:14:22 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[DNS-323]]></category>
		<category><![CDATA[Time Machine]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=212</guid>
		<description><![CDATA[If you don&#8217;t want to have to fork over the $$ to buy a time capsule want to make use of your existing DNS-323 hardware for backing up your Mac, here&#8217;s the steps to take.
1) Modify system preferences by executing this line in a terminal.

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

This will allow you to select the [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want to have to fork over the $$ to buy a time capsule want to make use of your existing DNS-323 hardware for backing up your Mac, here&#8217;s the steps to take.</p>
<p>1) Modify system preferences by executing this line in a terminal.<br />
<code><br />
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1<br />
</code></p>
<p>This will allow you to select the DNS as a backup device when you configure Time Machine.</p>
<p>2) You need to manually create a disk image that Time Machine can understand.  The naming convention of this image is key.  The name consists of the computers name and mac address of the local eno device without colons.  (<computer’s name>_<string>.sparsebundle).  Easiest way to find out the proper name is to attempt a backup after completing step 1 above.  While this is attempting to run, use finder to browse the Volume (Volume_1 in my case) and write down the name of the file its trying to create.  The filename will contain .tmp before the .sparebundle.  Drop this from the filename and you have the complete name you need to use.</p>
<p>ie:  gataca_0021413a0cce.tmp.sparsebundle -> gataca_0021413a0cce.sparsebundle</p>
<p>Open disk utility and create a new disk image on your local drive (you cannot create the image directly on the NFS drive) with the following options:</p>
<p>Format: Spare Bundle Disk Image<br />
Partiions: No Partition Map<br />
Encryption: None<br />
Format: Mac OSX Extended Partition (Journaled)<br />
Size &#8211; Maximum Size.. I choose Custom 250GB</p>
<p>After the image is created&#8230; manually copy it over to the root of your NFS volume.</p>
<p>3) Kick off the time machine backup and voila!</p>
<p>Now.. be prepared for the caveats of this solution mentioned <a href="http://www.flokru.org/2008/03/15/time-machine-backups-on-network-shares-2-possible-problems/">here</a>.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Use+your+DNS-323+for+Time+Machine+backups.+http://hcb8d.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Use+your+DNS-323+for+Time+Machine+backups.+http://hcb8d.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/212/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SelectorGadget makes identifying page elements a breeze!</title>
		<link>http://www.codedrop.ca/blog/archives/208</link>
		<comments>http://www.codedrop.ca/blog/archives/208#comments</comments>
		<pubDate>Tue, 12 Jan 2010 04:51:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/208</guid>
		<description><![CDATA[A recent railscast pointed me at a handy tool that has helped tremendously in speeding up my UI development efforts.&#160; In past, I would use FireBug to highlight items on a page and identify the associated id / class.&#160; This worked ok, but did not aid in narrowing down my selector in the efficient mannter [...]]]></description>
			<content:encoded><![CDATA[<p>A recent railscast pointed me at a handy tool that has helped tremendously in speeding up my UI development efforts.&nbsp; In past, I would use FireBug to highlight items on a page and identify the associated id / class.&nbsp; This worked ok, but did not aid in narrowing down my selector in the efficient mannter this one does.&nbsp; You can easily select/deselect fields on your page and dynamically generate your css selector.&nbsp; Very cool!.. I encourage you to check it out!</p>
<p><a href="http://www.selectorgadget.com/">Introducing SelectorGadget: point and click CSS selectors</a></p>
<blockquote></blockquote>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=93ba76b4-1f55-8a34-9ed4-e23a6a63ca97" /></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=SelectorGadget+makes+identifying+page+elements+a+breeze%21+http://i363g.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=SelectorGadget+makes+identifying+page+elements+a+breeze%21+http://i363g.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/208/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add some color to your Capistrano scripts</title>
		<link>http://www.codedrop.ca/blog/archives/200</link>
		<comments>http://www.codedrop.ca/blog/archives/200#comments</comments>
		<pubDate>Fri, 27 Nov 2009 23:05:15 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=200</guid>
		<description><![CDATA[The beauty of ruby makes it simple to add some colorful syntax highlighting to log messages that are displayed in your capistrano scripts.  Here&#8217;s a chunk of code I added to my utility.rb file that is included by my capfile that performs the magic.

def colorize(text, color_code)
"#{color_code}#{text}\033[0m"
end

def red(text); colorize(text, "\033[31m"); end
def boldred(text); colorize(text, "\033[1;31m"); end
def green(text); [...]]]></description>
			<content:encoded><![CDATA[<p>The beauty of ruby makes it simple to add some colorful syntax highlighting to log messages that are displayed in your capistrano scripts.  Here&#8217;s a chunk of code I added to my utility.rb file that is included by my capfile that performs the magic.</p>
<p><code><br />
def colorize(text, color_code)<br />
"#{color_code}#{text}\033[0m"<br />
end</code><br />
<code><br />
def red(text); colorize(text, "\033[31m"); end<br />
def boldred(text); colorize(text, "\033[1;31m"); end<br />
def green(text); colorize(text, "\033[32m"); end<br />
def boldgreen(text); colorize(text, "\033[1;32m"); end<br />
def yellow(text); colorize(text, "\033[33m"); end<br />
def boldyellow(text); colorize(text, "\033[1;33m"); end<br />
def blue(text); colorize(text, "\033[34m"); end<br />
def boldblue(text); colorize(text, "\033[1;34m"); end<br />
def purple(text); colorize(text, "\033[35m"); end<br />
def boldpurple(text); colorize(text, "\033[1;35m"); end<br />
def cyan(text); colorize(text, "\033[36m"); end<br />
def boldcyan(text); colorize(text, "\033[1;36m"); end<br />
def white(text); colorize(text, "\033[37m"); end<br />
def boldwhite(text); colorize(text, "\033[1;37m"); end<br />
</code><br />
<code><br />
def inform(text); green(text); end<br />
def highlight(text); boldgreen(text); end<br />
def warning(text); yellow(text); end<br />
def alert(text); red(text); end<br />
def section(text); "\n\n#{"*" * 50}\n#{text}\n#{"*" * 50}";<br />
</code><br />
Now by utilizing the wrapper methods like this:<br />
<code><br />
task :testconfig do<br />
logoutputDir = Logging.initialize("#{$deployDir}/logs", $envNameName, $envNameNum)<br />
Logging.info inform("*" * 75)<br />
Logging.info inform(" Starting... ")<br />
Logging.info "      Env: " + highlight('development')<br />
Logging.info "     Date: " + highlight(Time.now.to_s)<br />
Logging.info "     User: " + highlight('jsmith')<br />
Logging.info " Logs Dir: " + highlight('/tmp/projectX/log')<br />
Logging.info inform("*" * 75)<br />
Logging.info inform(".. informational message ...")<br />
Logging.info warning(".. warning message ...")<br />
Logging.info alert(".. alert message ...")<br />
Logging.info highlight(".. highlighted message ..")<br />
Logging.info inform("*" * 75)<br />
Logging.info inform(" Done! ")<br />
Logging.info " Date: " + highlight(Time.now.to_s)<br />
Logging.info " Dist: " + highlight('/tmp/projectX/dist')<br />
Logging.info inform("*" * 75)<br />
end<br />
</code><br />
You'll get pretty output like this:</p>
<div id="attachment_201" class="wp-caption alignnone" style="width: 310px"><a href="http://www.codedrop.ca/blog/wp-content/uploads/2009/11/syntax_highlight.gif"><img class="size-medium wp-image-201" title="syntax_highlight" src="http://www.codedrop.ca/blog/wp-content/uploads/2009/11/syntax_highlight-300x136.gif" alt="Sample console output" width="300" height="136" /></a><p class="wp-caption-text">Sample console output</p></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Add+some+color+to+your+Capistrano+scripts+http://iaadg.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Add+some+color+to+your+Capistrano+scripts+http://iaadg.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/200/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 6 Problems with TIBCO Designer</title>
		<link>http://www.codedrop.ca/blog/archives/152</link>
		<comments>http://www.codedrop.ca/blog/archives/152#comments</comments>
		<pubDate>Mon, 23 Nov 2009 17:19:04 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Tibco]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/152</guid>
		<description><![CDATA[After having utilizing TIBCO&#8217;s Designer product for a number of months, several blaring deficiencies come to mind.. .here&#8217;s a list of my top complaints.  I expect I&#8217;ll be adding to this list as I continue to discover new &#8216;features&#8217; within the product.

Unable to open 2 versions of the same project at the same time.  Unless [...]]]></description>
			<content:encoded><![CDATA[<p>After having utilizing TIBCO&#8217;s Designer product for a number of months, several blaring deficiencies come to mind.. .here&#8217;s a list of my top complaints.  I expect I&#8217;ll be adding to this list as I continue to discover new &#8216;features&#8217; within the product.</p>
<ol>
<li>Unable to open 2 versions of the same project at the same time.  Unless you rename the tibco project, designer does not let you open two version of the same project.</li>
<li>Internal editor for java sources is like trying to write a java program in notepad.  Why not allow it to link to an external editor?</li>
<li>No Subversion (svn) support.  Has perforce and cvs but no svn?.. get with the times already</li>
<li>Service deployments (.ear) files on a linux environment consume the max amount of memory allotted.. (approx 512mb per .ear).  This makes a SOA architecture hard to achieve if end up having to bundle services into a single .ear due to hardware constraints&#8230; imagine 60 services with this overhead.</li>
<li>Generated files do not present themselves in a standard order.  Often if you resave a project the xml will be re-ordered, thus triggering your source control tool to think there is an uncommitted change even if there isn&#8217;t one.</li>
<li>When defining a process archive designer prevents you from adding multiple process starters.  Strangely if you add them all at once instead of one by one this is ok.  This could be the scenario when you have a service with multiple processes that listen on different queues.  Why designer isn&#8217;t consistent I don&#8217;t know..  stop assuming to &#8216;know&#8217; what I&#8217;m trying to do!</li>
</ol>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=44d730e1-7ed1-83ca-9ef3-f185bca3cb71" alt="" /></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Top+6+Problems+with+TIBCO+Designer+http://9qnao.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Top+6+Problems+with+TIBCO+Designer+http://9qnao.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/152/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano Callbacks</title>
		<link>http://www.codedrop.ca/blog/archives/196</link>
		<comments>http://www.codedrop.ca/blog/archives/196#comments</comments>
		<pubDate>Wed, 18 Nov 2009 18:51:10 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Capistrano]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/196</guid>
		<description><![CDATA[Neat way to pre-initalize something in capistrano before a task is run
on :start do  verifyParametersAndInitialize()end
callback options:

 :before, triggered before a task is invoked
 :after, triggered after a task is invoked
 :start, triggered before a top-level task is invoked via the command-line
 :finish, triggered when a top-level task completes
 :load, triggered after all recipes have [...]]]></description>
			<content:encoded><![CDATA[<p>Neat way to pre-initalize something in capistrano before a task is run</p>
<p><code>on :start do<br />  verifyParametersAndInitialize()<br />end</code></p>
<p>callback options:
<ol>
<li> :before, triggered before a task is invoked</li>
<li> :after, triggered after a task is invoked</li>
<li> :start, triggered before a top-level task is invoked via the command-line</li>
<li> :finish, triggered when a top-level task completes</li>
<li> :load, triggered after all recipes have loaded</li>
<li>:exit, triggered after all tasks have completed</li>
</ol>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=4f2cdfcc-4c28-8945-8c89-a12168624c3b" /></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Capistrano+Callbacks+http://gz9sp.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Capistrano+Callbacks+http://gz9sp.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate your non-rails db migrations with Capistrano and AutoPatch</title>
		<link>http://www.codedrop.ca/blog/archives/191</link>
		<comments>http://www.codedrop.ca/blog/archives/191#comments</comments>
		<pubDate>Tue, 10 Nov 2009 20:53:38 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Migrations]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/?p=191</guid>
		<description><![CDATA[After working in a rails environment for the past year I found it terribly difficult to go back to traditional database deployment / upgrade practices.
Migrations are a beautiful way to properly version, co-ordinate and apply the changes you need to your various database environments.  I never knew of a way to do this in a [...]]]></description>
			<content:encoded><![CDATA[<p>After working in a rails environment for the past year I found it terribly difficult to go back to traditional database deployment / upgrade practices.</p>
<p>Migrations are a beautiful way to properly version, co-ordinate and apply the changes you need to your various database environments.  I never knew of a way to do this in a non-rails environment, until now. Step in <a href="http://autopatch.sourceforge.net/index.php">AutoPatch</a>.</p>
<p>Some alternatives to AutoPatch exist such as <a href="http://migrate4j.sourceforge.net/">migrate4j</a> and <a href="http://www.liquibase.org/">Liquibase</a>. Each with their own flavor of how to tackle the problem.  AutoPatch was the winner for me as you don&#8217;t have to write your migrations in some custom DSL (xml in the case of Liquibase, or java for migrate4j).  Our existing .sql scripts worked just fine!</p>
<p>Our shop is currently using <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a> for deployments.  Blending Autopatch with Capistrano was relatively straightforward.  Below are two sample tasks that can be added to facilitate AutoPatch&#8217;s cmd line info and migrate calls.</p>
<p><code> desc "Display database migration levels."<br />
task :dbinfo do<br />
cmdAPClasspath = "#{deployDir}/applications/database/lib/oracle/ojdbc14_g.jar" \<br />
+ ":#{deployDir}/dist/prepare/database" \<br />
+ ":#{deployDir}/lib/java/tk-autopatch-1.2-b-cvs.jar" \<br />
+ ":#{deployDir}/lib/java/log4j-1.2.8.jar" \<br />
+ ":#{deployDir}/lib/java/commons-logging-1.0.3.jar" \<br />
+ ":#{deployDir}/lib/java/commons-collections-3.2.1.jar" \<br />
+ ":#{deployDir}/lib/java/commons-lang-2.2.jar" \<br />
+ ":#{deployDir}/lib/java/tk-util-1.1.2.jar"<br />
cmdAPPatchInfo = "java -cp #{cmdAPClasspath} " \<br />
+ "com.tacitknowledge.util.migration.jdbc.MigrationInformation </code><code>#{systemName}</code><code>"<br />
system(cmdAPPatchInfo)<br />
end</code></p>
<p><code>desc "Apply database migrations."<br />
task :dbmigrate do<br />
cmdAPClasspath = "#{deployDir}/applications/database/lib/oracle/ojdbc14_g.jar" \<br />
+ ":#{deployDir}/dist/prepare/database" \<br />
+ ":#{deployDir}/lib/java/tk-autopatch-1.2-b-cvs.jar" \<br />
+ ":#{deployDir}/lib/java/log4j-1.2.8.jar" \<br />
+ ":#{deployDir}/lib/java/commons-logging-1.0.3.jar" \<br />
+ ":#{deployDir}/lib/java/commons-collections-3.2.1.jar" \<br />
+ ":#{deployDir}/lib/java/commons-lang-2.2.jar" \<br />
+ ":#{deployDir}/lib/java/tk-util-1.1.2.jar"<br />
cmdAPPatch<code>I</code>nfo = "java -cp #{cmdAPClasspath} " \<br />
+ "com.tacitknowledge.util.migration.jdbc.StandaloneMigrationLauncher #{systemName}"<br />
system(cmdAPPatchInfo)<br />
end</code></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Automate+your+non-rails+db+migrations+with+Capistrano+and+AutoPatch+http://rsrif.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Automate+your+non-rails+db+migrations+with+Capistrano+and+AutoPatch+http://rsrif.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/191/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filter your Gmail for all unread messages</title>
		<link>http://www.codedrop.ca/blog/archives/187</link>
		<comments>http://www.codedrop.ca/blog/archives/187#comments</comments>
		<pubDate>Mon, 09 Nov 2009 16:20:53 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[GMail]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/187</guid>
		<description><![CDATA[Gmail&#8217;s great&#8230; and who doesn&#8217;t have a gmail account nowadays.   One thing I&#8217;ve always wondered was how to search for all unread messages, and not just those on the current page?&#8230;  Who wants to seatch backwards page by page looking for unread messages anyways&#8230;
Well after years of using it today I finally [...]]]></description>
			<content:encoded><![CDATA[<p>Gmail&#8217;s great&#8230; and who doesn&#8217;t have a gmail account nowadays.   One thing I&#8217;ve always wondered was how to search for all unread messages, and not just those on the current page?&#8230;  Who wants to seatch backwards page by page looking for unread messages anyways&#8230;</p>
<p>Well after years of using it today I finally found the answer.  Simply search for &#8216;<b>label:unread</b>&#8216; messages and your set!.. wonder what other nifty searches you can preform?</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=33173125-b46a-8b19-a0b9-0c37d45e70d4" /></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Filter+your+Gmail+for+all+unread+messages+http://hgodg.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Filter+your+Gmail+for+all+unread+messages+http://hgodg.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/187/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using GMail with Trac on Dreamhost</title>
		<link>http://www.codedrop.ca/blog/archives/180</link>
		<comments>http://www.codedrop.ca/blog/archives/180#comments</comments>
		<pubDate>Mon, 02 Nov 2009 16:15:27 +0000</pubDate>
		<dc:creator>groll</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://www.codedrop.ca/blog/archives/180</guid>
		<description><![CDATA[Setting up trac on dreamhost isn&#8217;t a very well documented process.&#160; The one-click install does setup a project, but your left with bare bones install and no help on getting the initial admin account created.&#160; I found the dreamy-trac installation script worked well.&#160; Beyond this and the basic config changes you have to do I [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up trac on dreamhost isn&#8217;t a very well documented process.&nbsp; The one-click install does setup a project, but your left with bare bones install and no help on getting the initial admin account created.&nbsp; I found the dreamy-trac installation script worked well.&nbsp; Beyond this and the basic config changes you have to do I found the following settings are required in your trac.ini file in order to get your email notifications working on Dreamhost when you use GMail as your mail provider.</p>
<p><code>[notification]<br />
smtp_enabled = true<br />
use_tls = true<br />
mime_encoding = base64<br />
smtp_server = smtp.gmail.com<br />
smtp_port = 587<br />
smtp_user = user<br />
smtp_password = password</code></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Using+GMail+with+Trac+on+Dreamhost+http://pt6xs.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.codedrop.ca/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Using+GMail+with+Trac+on+Dreamhost+http://pt6xs.th8.us" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codedrop.ca/blog/archives/180/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
