<?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>Cup of Coffee (and code) &#187; code</title>
	<atom:link href="http://cupof.coffeeandcode.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://cupof.coffeeandcode.com</link>
	<description>Caffeinated Solutions to some of life's problems.</description>
	<lastBuildDate>Wed, 15 Oct 2008 14:44:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Toggle hidden file viewing in Mac OS X</title>
		<link>http://cupof.coffeeandcode.com/2008/04/11/toggle-hidden-file-viewing-in-mac-os-x/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=toggle-hidden-file-viewing-in-mac-os-x</link>
		<comments>http://cupof.coffeeandcode.com/2008/04/11/toggle-hidden-file-viewing-in-mac-os-x/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 04:49:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Finder]]></category>
		<category><![CDATA[hidden files]]></category>
		<category><![CDATA[hidden folders]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://cupof.coffeeandcode.com/?p=10</guid>
		<description><![CDATA[My one regret with OS X&#8217;s Finder is that I have found no easy way to toggle viewing hidden files and folders.  In fact I was so perturbed that I went and wrote a small application to toggle hidden file and folder visibility when ran.
There are a couple of sites out there that show [...]]]></description>
			<content:encoded><![CDATA[<p>My one regret with OS X&#8217;s Finder is that I have found no easy way to toggle viewing hidden files and folders.  In fact I was so perturbed that I went and wrote a small application to toggle hidden file and folder visibility when ran.</p>
<p>There are a <a href="http://www.osxfaq.com/DailyTips/02-2005/02-01.ws">couple</a> <a href="http://www.macosxhints.com/article.php?story=20010328120852495">of</a> <a href="http://lifehacker.com/software/command-line/show-hidden-files-in-finder-188892.php">sites</a> out there that show the way to do it, but none are that graceful.  They require the user to force restart Finder (which is not desirable) and they usually call upon the use of Terminal and typing out the full command.</p>
<p>Not satisfied with a simple answer, and trying to avoid actual work, I decided to write up an AppleScript that would toggle the visibility of hidden files and folders from &#8220;on&#8221; to &#8220;off&#8221; every time you clicked it.  I then packaged it up in a pretty little application, and even gave it a custom small icon so you can drag it to the right side of current icons in a Finder window and it looks pretty sharp.  I got the icon idea from <a href="http://lifehacker.com/373507/set-up-better-time-machine-access">here</a>.</p>
<p>Here&#8217;s the <a href="http://www.coffeeandcode.com/products/toggle/toggle.zip">application</a>!  Hope it helps you out like it did for me.</p>
<p>And for those out there that like code:</p>
<textarea name="code" class="applescript" cols="60" rows="10">
# Jonathan Knapp
# Caffeinated Solutions
# www.coffeeandcode.com

# This application toggles the visiblity of hidden files and folders in Mac OSX.
set userCancelled to false
try
	# give the user a warning about the negative effects of restarting Finder
	set alertResult to display alert "Warning! Restarting Finder can have bad results on opened files. Are you sure you want to continue?" buttons {"Sure!", "Not really..."} as warning default button "Not really..." cancel button "Not really..."
on error number -128
	# user hit the cancel button
	set userCancelled to true
end try

# if the user wants to proceed...
if userCancelled is false and button returned of alertResult is "Sure!" then
	try
		# get the current value; an error is thrown if none exists
		set currentValue to do shell script "defaults read com.apple.finder AppleShowAllFiles"
		if currentValue is "TRUE" then
			set currentValue to "FALSE"
		else
			set currentValue to "TRUE"
		end if
	on error
		# there are a couple errors that could catch here if the AppleShowAllFiles has no current value (ran for the first time)
		set currentValue to "TRUE"
	end try
	
	do shell script "defaults write com.apple.finder AppleShowAllFiles " &#038; currentValue
	do shell script "osascript -e 'tell application \"Finder\" to quit'"
	do shell script "osascript -e 'tell application \"Finder\" to activate'"
end if
</textarea>
]]></content:encoded>
			<wfw:commentRss>http://cupof.coffeeandcode.com/2008/04/11/toggle-hidden-file-viewing-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Local folder syncing in Aptana</title>
		<link>http://cupof.coffeeandcode.com/2008/03/30/local-folder-syncing-in-aptana/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=local-folder-syncing-in-aptana</link>
		<comments>http://cupof.coffeeandcode.com/2008/03/30/local-folder-syncing-in-aptana/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 23:37:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aptana]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://cupof.coffeeandcode.com/?p=3</guid>
		<description><![CDATA[So I have started using an Eclipse modification called Aptana for my PHP/Javascript projects and really enjoy it so far.  I&#8217;m very new to the software, but it seems easy to use and works with Adobe AIR.
The only problem I have ran into was trying to setup a local file sync.  FTP syncs [...]]]></description>
			<content:encoded><![CDATA[<p>So I have started using an Eclipse modification called <a href="http://www.aptana.com/" title="Aptana">Aptana</a> for my PHP/Javascript projects and really enjoy it so far.  I&#8217;m very new to the software, but it seems easy to use and works with <a href="http://www.adobe.com/products/air/" title="Adobe AIR">Adobe AIR</a>.</p>
<p>The only problem I have ran into was trying to setup a local file sync.  FTP syncs worked great, caused no headaches, and shouldn&#8217;t cause anyone else a headache either.  However, I wanted to sync two folders on my machine and unfortunately the process left a lot to be desired.  I ended up running into configuration problems and had to clean my configuration from the Help menu a couple times.</p>
<p>Thankfully, I ended up finding a workaround and subsequently posted it in the <a href="http://support.aptana.com/asap/browse/STU-1311" title="Ability to \">ASAP Aptana Issue Tracker</a> to try and help anyone else until it receives a fix.  It&#8217;s pretty easy to do, has caused no problems since, but requires a bit of tinkering to fix without any instructions.</p>
<p>Here&#8217;s how I did it, I hope it helps someone else:</p>
<blockquote><p>I wanted to sync a folder called <em>services</em> to the <em>services</em> folder in my project.  My project was already added to the project view at this point.</p>
<p>I went to the file view and selected the <em>services</em> folder (not the one in my project) that I wanted to sync to, right-clicked it and chose &#8220;Create new sync connection&#8230;&#8221;</p>
<p>Next I chose to &#8220;Add new project shortcut&#8221; and selected the <em>services</em> folder inside my project. Now hit the cancel button. If you then look in your Sync Manager pane, and click the drop down arrow and select &#8220;Show Local Sync Targets&#8221; you will see your new addition. However, you cannot use it yet.</p>
<p>Restart Aptana.</p>
<p>Now go back to the file view, right-click the <em>services</em> folder you want to sync (not the one in your project) and this time select the project shortcut that you previously made.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://cupof.coffeeandcode.com/2008/03/30/local-folder-syncing-in-aptana/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
