<?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>Karl Kraft &#187; Tools</title>
	<atom:link href="http://www.karlkraft.com/index.php/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlkraft.com</link>
	<description>Just a 2 bit programmer in a 64 bit world</description>
	<lastBuildDate>Thu, 24 Jun 2010 14:20:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Tuesday Tool :Opening files from the command line in TextEdit</title>
		<link>http://www.karlkraft.com/index.php/2008/02/12/tuesday-tool-opening-files-from-the-command-line-in-textedit/</link>
		<comments>http://www.karlkraft.com/index.php/2008/02/12/tuesday-tool-opening-files-from-the-command-line-in-textedit/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 15:00:17 +0000</pubDate>
		<dc:creator>Karl Kraft</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.karlkraft.com/?p=47</guid>
		<description><![CDATA[How to use the open() command to open files in TextEdit]]></description>
			<content:encoded><![CDATA[<p>Any serious OSX developer is going to end up spending time on the command line solving some problems.  To that end here is several example of how to use open:</p>
<p><span id="more-47"></span><br />
To open a file as if you had double clicked in the finder, use this command. This will open myfile.jpg in the default jpg viewer.</p>
<p><code>open myfile.jpg<br />
</code></p>
<p>Many time you find yourself with a file that you want to open in a specific application.  For this you can use the -a flag.  This will work if the application is in a well known place.  If the application is not in a well known place you can use the entire path to the application.</p>
<p><code>open -a Safari myfile.jpg</code><br />
<code>open -a /MyAdobeApps/Photoshop.app myfile.jpg</code></p>
<p>As shorthand for TextEdit, just use the -e file</p>
<p><code>open -e README.1st<br />
</code></p>
<p>If you have a program that generates output, you can pipe the results to open and have it show in TextEdit.</p>
<p><code>cal | open -f<br />
</code></p>
<p>And finally, you can also use this to open directories in Finder:</p>
<p><code>open .</code><br />
<code>open ~/Desktop</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkraft.com/index.php/2008/02/12/tuesday-tool-opening-files-from-the-command-line-in-textedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuesday Tool: Hex editors and hex dumps</title>
		<link>http://www.karlkraft.com/index.php/2008/02/06/tuesday-tool-hex-editors-and-hex-dumps/</link>
		<comments>http://www.karlkraft.com/index.php/2008/02/06/tuesday-tool-hex-editors-and-hex-dumps/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 05:00:26 +0000</pubDate>
		<dc:creator>Karl Kraft</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.karlkraft.com/?p=48</guid>
		<description><![CDATA[Options for viewing binary files.]]></description>
			<content:encoded><![CDATA[<p>Text files are easy to view using a program like TextEdit.  Programmers often have to deal with binary files, and deal with them in some reasonable format.  Here are several useful tools for binary files.</p>
<p><span id="more-48"></span><br />
As an example, if I wanted to view a png file in hexadecimal, I could use hexdump from the command line:</p>
<p><code>hexdump myfile.png</p>
<pre>0000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
0000010 00 00 00 0a 00 00 00 03 08 06 00 00 00 aa 3d 9e
0000020 75 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b
0000030 13 01 00 9a 9c 18 00 00 00 04 67 41 4d 41 00 00
</pre>
<p></code></p>
<p>You could then whip out a handy hex to ascii chart, or you could use the command line tool &#8220;od&#8221;. This tool allows to specify what format you want the output in, for instance in ascii bytes.  This makes it very clear that the first four bytes are the magic header for PNG files.</p>
<p><code>od -a HRidges.png</p>
<pre>0000000   89   P   N   G  cr  nl sub  nl nul nul nul  cr   I   H   D   R
0000020  nul nul nul  nl nul nul nul etx  bs ack nul nul nul   ?   =  9e
</pre>
<p></code></p>
<p>You might find want to also have a hex editor so that you can edit the files as well.  I tend to use 0xED.app.  You can find it at <a href="http://www.suavetech.com/0xed/0xed.html">Suavetech</a>.  An alternative to 0XED is <a href="http://ridiculousfish.com/hexfiend/">HexFiend</a>, which is also available in source code form.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkraft.com/index.php/2008/02/06/tuesday-tool-hex-editors-and-hex-dumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Tuesday Tool</title>
		<link>http://www.karlkraft.com/index.php/2008/02/04/the-tuesday-tool/</link>
		<comments>http://www.karlkraft.com/index.php/2008/02/04/the-tuesday-tool/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 04:54:44 +0000</pubDate>
		<dc:creator>Karl Kraft</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.karlkraft.com/?p=46</guid>
		<description><![CDATA[The start of the Tuesday Tool]]></description>
			<content:encoded><![CDATA[<p>Part of the reason I started this blog is so that I could provide ideas, sample source code, and pointers to useful tools for developers just getting started in Cocoa development.  The learning curve for Cocoa itself is pretty steep, and there is another huge related pile of knowledge for things that make the development process easier.  To that end, and to encourage me to write more, I have decided that Tuesday wil be tool day. Every Tuesday I will write about a specific tool that I think every developer should know about.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkraft.com/index.php/2008/02/04/the-tuesday-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
