<?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>Christi Toa &#187; code</title>
	<atom:link href="http://www.christitoa.com/ct/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christitoa.com/ct</link>
	<description>it&#039;s pronounced &#34;toh&#34;, not &#34;toh-ah&#34;</description>
	<lastBuildDate>Fri, 21 Oct 2011 03:00:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GoogleClickUntracker</title>
		<link>http://www.christitoa.com/ct/2011/10/20/googleclickuntracker/</link>
		<comments>http://www.christitoa.com/ct/2011/10/20/googleclickuntracker/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 03:00:53 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/ct/?p=689</guid>
		<description><![CDATA[So I decided that I didn&#8217;t want Google to track my clicks. Download the safari extension here.
]]></description>
			<content:encoded><![CDATA[<p>So I decided that I didn&#8217;t want Google to track my clicks. Download the safari extension <a href="http://goo.gl/r3DKM">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2011/10/20/googleclickuntracker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theme update</title>
		<link>http://www.christitoa.com/ct/2010/03/08/theme-update/</link>
		<comments>http://www.christitoa.com/ct/2010/03/08/theme-update/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 06:27:57 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[flavors.me]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/ct/?p=607</guid>
		<description><![CDATA[Found a site on one of my rss feeds flavors.me and really like the concept that they have. 
Hence, updated the theme on my site (shamelessly copied the idea) but did learn some cool new tricks while doing so. (Notice the background image automatically stretches while maintaining its aspect ratio on different browser sizes on [...]]]></description>
			<content:encoded><![CDATA[<p>Found a site on one of my rss feeds <a href="http://flavors.me/">flavors.me</a> and really like the concept that they have. </p>
<p>Hence, updated the theme on my site (shamelessly copied the idea) but did learn some cool new tricks while doing so. (Notice the background image automatically stretches while maintaining its aspect ratio on different browser sizes on the <a href="http://www.christitoa.com">homepage</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2010/03/08/theme-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto mount drives on Leopard with AppleScript</title>
		<link>http://www.christitoa.com/ct/2010/02/17/auto-mount-drives-on-leopard-with-applescript/</link>
		<comments>http://www.christitoa.com/ct/2010/02/17/auto-mount-drives-on-leopard-with-applescript/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 23:55:26 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mount]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/?p=583</guid>
		<description><![CDATA[
tell application "Finder"
	if exists disk "Shared_Vol" then
	else
		mount volume "afp://user@myserver.com/Shared_Vol"
	end if
	if exists disk "input" then
	else
		mount volume "smb://user:passw0rd@mywindowsbox.com/input"
	end if
end tell

To run it from command line or crontab:

osascript theAppleScript.scpt

]]></description>
			<content:encoded><![CDATA[<pre class="brush:shell">
tell application "Finder"
	if exists disk "Shared_Vol" then
	else
		mount volume "afp://user@myserver.com/Shared_Vol"
	end if
	if exists disk "input" then
	else
		mount volume "smb://user:passw0rd@mywindowsbox.com/input"
	end if
end tell
</pre>
<p>To run it from command line or crontab:</p>
<pre class="brush:shell">
osascript theAppleScript.scpt
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2010/02/17/auto-mount-drives-on-leopard-with-applescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expect to the rescue!</title>
		<link>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/</link>
		<comments>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 07:02:39 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[guide]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/?p=549</guid>
		<description><![CDATA[When you can&#8217;t pipe an input file to automate a process, especially when you need to enter a password such as ftp-ing to some server e.g.:

ftp user@ftp.myhost.com &#60; myFTPCommands.txt

The above fails when ftp asks for a password. This is where expect comes to the rescue! e.g.:

#myExpectFile.exp

#Disable's expect's default 10 seconds timeout
set timeout -1

spawn ftp user@ftp.myhost.com
expect [...]]]></description>
			<content:encoded><![CDATA[<p>When you can&#8217;t pipe an input file to automate a process, especially when you need to enter a password such as ftp-ing to some server e.g.:</p>
<pre class="brush:shell">
ftp user@ftp.myhost.com &lt; myFTPCommands.txt
</pre>
<p>The above fails when ftp asks for a password. This is where <em>expect</em> comes to the rescue! e.g.:</p>
<pre class="brush:bash">
#myExpectFile.exp

#Disable's expect's default 10 seconds timeout
set timeout -1

spawn ftp user@ftp.myhost.com
expect "password:"
send "mySoSecuredPassword\r"
expect "ftp>"
send "get someFileFromFTP.txt\r"
expect "ftp>"
send "put someFileFromLocalhost.txt\r"
expect "ftp>"
send "quit\r"
</pre>
<p>Save the file and then try running it:</p>
<pre class="brush:shell">
expect myExpectFile.exp
</pre>
<p>Magic happens! <img src='http://www.christitoa.com/ct/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

