<?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>Hackerdude &#187; Mac</title>
	<atom:link href="http://www.hackerdude.com/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hackerdude.com</link>
	<description>Software Development Blog by David Martinez</description>
	<lastBuildDate>Fri, 17 Sep 2010 18:31:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Using the Bluetooth keyboard under the iPad</title>
		<link>http://www.hackerdude.com/2010/04/05/using-the-bluetooth-keyboard-under-the-ipad/</link>
		<comments>http://www.hackerdude.com/2010/04/05/using-the-bluetooth-keyboard-under-the-ipad/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 04:39:35 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/?p=775</guid>
		<description><![CDATA[Well, I mentioned I'd attach a bluetooth keyboard to the iPad to try it out and that's exactly what I did. The results are better than with the regular keyboard but still not ideal. Of course typing with a real keyboard is going to feel great. The problem is that it's just field typing. On [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I mentioned I'd attach a bluetooth keyboard to the iPad to try it out and that's exactly what I did. The results are better than with the regular keyboard but still not ideal.</p>
<p>Of course typing with a real keyboard is going to feel great. The problem is that it's just field typing. On most of the apps, tabs don't work to move from field to field, and the PageUp/PageDown keys on the small apple bluetooth keyboard (Fn and Up/Down) are not wired in at all.</p>
<p>All the media function keys, however (from the brightness controls of F1&2 to the media and volume controls on F7 through F12) work fine. Which underscores the idea that this is a media consumption device more than a production device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2010/04/05/using-the-bluetooth-keyboard-under-the-ipad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPad &#8211; first impressions</title>
		<link>http://www.hackerdude.com/2010/04/04/ipad-first-impressions/</link>
		<comments>http://www.hackerdude.com/2010/04/04/ipad-first-impressions/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 22:21:52 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[IPad]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/?p=765</guid>
		<description><![CDATA[My experiences with the iPad so far]]></description>
			<content:encoded><![CDATA[<p>Yesterday I went ahead and picked up an iPad. A lot of people are wondering if it makes sense as a device. Here are my impressions.<br />
<span id="more-765"></span><br />
I've only used it for a few hours now and I have to say I'm impressed. Its use as a big iPod is flawless. It's an excellent at-home-with-kids machine, as I was able to plant it as an impromptu tv while I cooked breakfast. I can imagine it being a great "follow recipe" experience. Using the iPhone for that was a bit awkward. As a computer, it's not so good, but does fill that hole in between nicely.</p>
<p>It was painful to wait for the first time sync which took about two hours on my device (I have a lot of stuff). It's much faster now.</p>
<p>The keyboard is not as bad as the iPhone (I'm typing this on the iPad) but it is no walk in the park to type on either. I bought the apple case for it that makes it incline and I couldn't imagine being able to type fast without it. However the angle it produced forced me to put a small book underneath to avoid carpal tunnel by bringing it closer to my fingers. Although now you can type long texts (the software keyboard is basically a full-travel size, with wider than normal spacing between keys), it's probably a good idea to pick up an external keyboard if you're going to find yourself typing a whole bunch, particularly due to the complete lack of cursor keys. The keyboard is meant to be used with the iPad on a surface though, it's hard to type while also holding the device.</p>
<p>Netflix is simply awesome on it. Release night had some performance problems but they seemed to have been fixed by this morning (everyone trying it out probably).</p>
<p>So far I have browsed the web with it, played some games, read books using Kindle's app and watched netflix. It works fantastically well (speakers are better than on the iPod but not as good as a notebook, headphones are still required in loud environments).</p>
<p>I did get the only ssh app available directly for the iPad to see if I could do work in a pinch. It works but it's still painful (my brain seems to crave the tactile feedback once I get into a command line). I will try it later with a bluetooth keyboard and if that works I'll be getting one to keep in my bag.</p>
<p>I picked up the iWork suite but not having anything pressing that requires it I have only followed tutorials so far. I can already tell the experience of having to sync files through iTunes is not going to cut it though as I have two computers, work and home. I really need to be able to get to any file in my MobileMe at least. Not having the option to do so is, well, disappointing. I wish I had a real finder, even if it did only client AFP. </p>
<p>I also tried the books app, and was able to easily sync epubs I dragged to my library but oddly no PDFs. Sad because I have a lot of those I want to keep as reference. Luckily my iPhone apps (stanza) all work so I can still use the dropbox/stanza trick, though 2x pixellated stanza won't do for the longer term.</p>
<p>All in all, it's an ambitious device and it does take the place of my Kindle in my bag permanently. I will still use the kindle in super-sunny environments and while relaxing in the backyard over the summer, but there is really no reason for it in other circumstances when given the choice. I still love my amazon eBooks though, so I was happy to see that amazon has smartly added the buy option on the iPad version of their app. As I see it most of the flaws are smaller and in the software, so I'm pretty happy and looking forward to those firmware updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2010/04/04/ipad-first-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed Up Firefox web browser &#8211; Ubuntu Geek</title>
		<link>http://www.hackerdude.com/2009/04/09/speed-up-firefox-web-browserubuntu-geek/</link>
		<comments>http://www.hackerdude.com/2009/04/09/speed-up-firefox-web-browserubuntu-geek/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 18:13:55 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mozilla XUL]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2009/04/09/speed-up-firefox-web-browserubuntu-geek/</guid>
		<description><![CDATA[Ubuntu Geek provides a great little guide on speeding up Firefox. A lot of the about:config settings he proposes changing are already fairly optimal on a Mac, but disabling IPv6 seemed to make the most difference on my case. [From Speed Up Firefox web browser&#160;&#124;&#160;Ubuntu Geek]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ubuntugeek.com">Ubuntu Geek</a> provides a great little guide on speeding up Firefox. A lot of the about:config settings he proposes changing are already fairly optimal on a Mac, but disabling IPv6 seemed to make the most difference on my case.</p>
<blockquote cite="http://www.ubuntugeek.com/speed-up-firefox-web-browser.html">
<p>[From <a href="http://www.ubuntugeek.com/speed-up-firefox-web-browser.html"><cite>  Speed Up Firefox web browser&#160;|&#160;Ubuntu Geek</cite></a>]
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2009/04/09/speed-up-firefox-web-browserubuntu-geek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JIRA To Omnifocus Script</title>
		<link>http://www.hackerdude.com/2009/03/04/jira-to-omnifocus-script/</link>
		<comments>http://www.hackerdude.com/2009/03/04/jira-to-omnifocus-script/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 18:47:37 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2009/03/04/jira-to-omnifocus-script/</guid>
		<description><![CDATA[This script logs into your JIRA and creates OmniFocus tasks for each of the JIRA items that are assigned to you, so they sync to your Omnifocus for iPhone, you only have to keep track of one inbox, etc. It only takes a tiny bit of setup. Setting up To set this up, do the [...]]]></description>
			<content:encoded><![CDATA[<p>This script logs into your <a href="http://www.atlassian.com/software/jira/" title="JIRA: Task Tracking Software">JIRA</a> and creates <a href="http://www.omnigroup.com/applications/omnifocus/" title="Omnifocus - Professional Grade Desktop Task Mnagement">OmniFocus</a> tasks for each of the JIRA items that are assigned to you, so they sync to your Omnifocus for iPhone, you only have to keep track of one inbox, etc. It only takes a tiny bit of setup.</p>
<p><span id="more-548"></span>
<div class="setup_instructions">
<h4>Setting up</h4>
<p>To set this up, do the following:</p>
<ol>
<li><a href="http://www.hackerdude.com/wp-content/sample_code/jiratoomnifocus.zip">Download the script</a> and put it somewhere it will run</li>
<li>Install the required gems (<a href="http://appscript.sourceforge.net/" title="Appscript - Ruby applescript automation">appscript</a>, <a href="http://crypt.rubyforge.org/" title="Crypt: pure-ruby cryptographic cyphers">crypt</a>, <a href="http://gilesbowkett.blogspot.com/2008/09/password-gem-v12-released.html">password</a>) with gem install.</li>
<li>Go to JIRA and create a saved filter with whatever settings you like. Note the filter ID.</li>
<li>Go to the top of the jiratoomnifocus file and set it on the JIRA_FILTER_ID constant, and set the JIRA_BASE_URL to the URL of your JIRA installation.</li>
<li>If you like to keep your system very secure, take a look at the security warning, below, at this time</li>
<li>Run it. You will be asked to login the first time. After it's done, note the new tasks on your Omnifocus. Delete a task and run it again to see it add it again without asking you for authentication.</li>
</ol>
<p>You're set up! Now you can put it on a cron line, like this one which sets it to run at office hours (use cron -e on Terminal for this):</p>
<pre>
0,10,20,30,40,50 7-18 * * * /yourdir/jiratoomnifocus > /yourdir//log/jira_to_omnifocus.log 2>&#38;1
</pre>
<p>Congratulations! You now have only one inbox again. Let me know if you use it; I'd love to know of more ideas on how we can make it better/easier to setup.</p>
<div class="security_warning">
<h4>Security Warning</h4>
<p>The password for your JIRA account will be saved on a file on your computer called ~/.hackerdude/jira_credentials.yml. It is encrypted using blowfish using a constant key.</p>
<p>As long as both your jiratoomnifocus script and your credentials file are secured as (chmod 700 and owned by the user that will be running it on cron), you should be okay and secure (unless someone breaks into your account, in which case you have bigger problems than your JIRA access!). The crypt key used is a constant on the jiratoomnifocus script. Change the CRYPT_KEY key for any other random string of the same length and delete the jira_credentials.yml file (so it asks for your password again) and it will be recreated using your key the next time you start it.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2009/03/04/jira-to-omnifocus-script/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>FuzzyCom :: Using DTrace for javascript debug on OS X in firefox</title>
		<link>http://www.hackerdude.com/2009/02/10/fuzzycom-using-dtrace-for-javascript-debug-on-os-x-in-firefox/</link>
		<comments>http://www.hackerdude.com/2009/02/10/fuzzycom-using-dtrace-for-javascript-debug-on-os-x-in-firefox/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 18:14:29 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2009/02/10/fuzzycom-using-dtrace-for-javascript-debug-on-os-x-in-firefox/</guid>
		<description><![CDATA[Vincent Hellot over at FuzzyCom teaches how to use dtrace to trace javascript problems on a Mac (using a specially compiled Firefox binary for OSX). He hints at being able to do it with Ruby on Rails as well. Haven't tried this, but can't wait to do so. This post aims at introducing the DTrace [...]]]></description>
			<content:encoded><![CDATA[<p>Vincent Hellot over at <a href="http://fuzzycom.eu/posts">FuzzyCom</a> teaches how to use dtrace to trace javascript problems on a Mac (using a specially compiled Firefox binary for OSX). He hints at being able to do it with Ruby on Rails as well. Haven't tried this, but can't wait to do so.</p>
<blockquote cite="http://fuzzycom.eu/posts/22">
<p>This post aims at introducing the DTrace debugging tool in the scope of a javascript application. It won&#8217;t get too deep in the wide field of DTrace functions but I hope it will give you an overview of how DTrace can help to solve performance and debugging issues in your javascript applications</p>
<p>[From <a href="http://fuzzycom.eu/posts/22"><cite>FuzzyCom :: Using DTrace for javascript debug on OS X in firefox</cite></a>]
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2009/02/10/fuzzycom-using-dtrace-for-javascript-debug-on-os-x-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Appscript &#8211; Sweet automation</title>
		<link>http://www.hackerdude.com/2009/01/23/ruby-appscript-sweet-automation/</link>
		<comments>http://www.hackerdude.com/2009/01/23/ruby-appscript-sweet-automation/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 00:50:26 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2009/01/23/ruby-appscript-sweet-automation/</guid>
		<description><![CDATA[Yesterday a coworker pointed me to ruby's appscript. I have found it nothing short of amazing. I love my Mac, and many of us like the idea of automating our software, until we try to use AppleScript to do it. To say that Applescript is professional developer unfriendly is an understatement. I like ruby but [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday a coworker pointed me to ruby's appscript. I have found it nothing short of amazing.</p>
<p>I love my Mac, and many of us like the idea of automating our software, until we try to use AppleScript to do it. To say that Applescript is professional developer unfriendly is an understatement. I like ruby but to make ruby and applescript talk requires sending strings to osascript in just the right way and getting the output from osascript back. Not a lot of fun at all.</p>
<p>Enter appscript. <a href="http://appscript.sourceforge.net/" title="Appscript - Ruby applescript automation">Appscript</a> is a ruby library that interfaces with applescript seamlessly.</p>
<p><span id="more-541"></span>
<p>What's pretty amazing is its power after you spend a little while on the irb console and keep using the tab key for autocompletion. It even introspects the dictionary to see what is available at this time. It doesn't always give the right thing but by trying things out and with a bit of logic you always get there. </p>
<p>There's also an app called ASDictionary that will spit out the dictionary with ruby syntax, though I never found the dictionary all that useful anyway (I mean yes, it has definitions for everything, but it seldom provides info on exactly how everything is tied together or examples of use). I personally prefer trying things out on the console.</p>
<p>Here are a few examples of its use. You can do all this on irb immediately after installing it with <strong>sudo gem install appscript</strong>:</p>
<h4>Driving iCal</h4>
<p>This will get all your calendars and print their names:</p>
<pre class="ruby">&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'appscript'</span>
app = Appscript.<span style="color:#9900CC;">app</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;iCal&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
app.<span style="color:#9900CC;">calendars</span>.<span style="color:#9900CC;">get</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> |cal| <span style="color:#CC0066; font-weight:bold;">puts</span> cal.<span style="color:#9900CC;">name</span>.<span style="color:#9900CC;">get</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;</pre>
<p>Just expanding on this concept a little more, you can also grab all the to-dos:  </p>
<pre class="ruby">&nbsp;
app.<span style="color:#9900CC;">calendars</span>.<span style="color:#9900CC;">get</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> |cal|
  cal.<span style="color:#9900CC;">get</span>.<span style="color:#9900CC;">todos</span>.<span style="color:#9900CC;">get</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|todo|
    <span style="color:#CC0066; font-weight:bold;">puts</span> todo.<span style="color:#9900CC;">summary</span>.<span style="color:#9900CC;">get</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;</pre>
<h4>Automating Safari. Ruby to Applescript to Javascript</h4>
<p>Haven't tried marshaling values back as I'm just exploring, but I don't see why it couldn't.</p>
<pre class="ruby">&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'appscript'</span>
app = Appscript.<span style="color:#9900CC;">app</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;iCal&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
app.<span style="color:#9900CC;">open_location</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;http://www.google.com&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
window = app.<span style="color:#9900CC;">documents</span>.<span style="color:#9900CC;">get</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>
window.<span style="color:#9900CC;">do_JavaScript</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;window.alert('Your title is '+document.title)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;</pre>
<p>I'm sure you can find some use for this. I already did - I wrote myself a quick cron to add all the JIRA tasks assigned to me to <a href="http://www.omnigroup.com/applications/omnifocus/" title="Omnifocus - Professional Grade Desktop Task Mnagement">Omnifocus</a> if I don't already have them there. I'm looking forward to seeing what else I can put this to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2009/01/23/ruby-appscript-sweet-automation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quick and stupid: Don&#039;t set unlimited on the buffer size of Terminal</title>
		<link>http://www.hackerdude.com/2009/01/14/quick-and-stupid-dont-set-unlimited-on-the-bufer-size-of-terminal/</link>
		<comments>http://www.hackerdude.com/2009/01/14/quick-and-stupid-dont-set-unlimited-on-the-bufer-size-of-terminal/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 18:09:00 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2009/01/14/quick-and-stupid-dont-set-unlimited-on-the-bufer-size-of-terminal/</guid>
		<description><![CDATA[If you're a developer and use Terminal.app, don't set "unlimited" on the buffer size. After a day of using it heavily to review logs and whatnot your computer will be *really* slow. It's Terminal.app keeping in RAM what you did yesterday. Stupid and Obvious, but still figured I'd write it down.]]></description>
			<content:encoded><![CDATA[<p>If you're a developer and use Terminal.app, don't set "unlimited" on the buffer size. After a day of using it heavily to review logs and whatnot your computer will be *really* slow. It's Terminal.app keeping in RAM what you did yesterday. Stupid and Obvious, but still figured I'd write it down.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2009/01/14/quick-and-stupid-dont-set-unlimited-on-the-bufer-size-of-terminal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bindings, Outlets, Target+Action across multiple NIBs</title>
		<link>http://www.hackerdude.com/2008/12/15/bindings-outlets-targetaction-across-multiple-nibs/</link>
		<comments>http://www.hackerdude.com/2008/12/15/bindings-outlets-targetaction-across-multiple-nibs/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 06:12:49 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2008/12/15/bindings-outlets-targetaction-across-multiple-nibs/</guid>
		<description><![CDATA[I'm a total troublemaker. For my first Core Data app I decided to do something nontrivial (multiple windows referring to a single document). Of course nontrivial means that the Interface Builder can only help me so far. So now I'm stuck trying to get things to work out right. Luckily Patrick Geiller has put together [...]]]></description>
			<content:encoded><![CDATA[<p>I'm a total troublemaker. For my first Core Data app I decided to do something nontrivial (multiple windows referring to a single document). Of course nontrivial means that the Interface Builder can only help me so far. So now I'm stuck trying to get things to work out right. Luckily Patrick Geiller has put together a good explanation of how you can share multiple nibs across an application. Now all I have to do is apply this same data sharing technique to the NSDocument instead.</p>
<blockquote cite="http://parmanoir.com/Bindings,_Outlets,_Target+Action_across_multiple_NIBs">
<p>When using multiple NIBs, we need a common object that will share data among them. That object will hold bindings, outlets, target/action shared across NIBs.</p>
<p>  [From <a href="http://parmanoir.com/Bindings,_Outlets,_Target+Action_across_multiple_NIBs"><cite>Bindings, Outlets, Target+Action across multiple NIBs</cite></a> ]
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2008/12/15/bindings-outlets-targetaction-across-multiple-nibs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a Git project for XCode/Cocoa apps</title>
		<link>http://www.hackerdude.com/2008/12/15/creating-a-git-project-for-xcodecocoa-apps/</link>
		<comments>http://www.hackerdude.com/2008/12/15/creating-a-git-project-for-xcodecocoa-apps/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 19:51:58 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2008/12/15/creating-a-git-project-for-xcodecocoa-apps/</guid>
		<description><![CDATA[You can always count on somebody to have figured things out before you.. Chrisopher Roach's blog has a nice quick setup guide to get your xcode project in a git repo (gitignores, attributes and basic git push capability). Whenever I setup a new Xcode project, the first thing I do is initialize it as a [...]]]></description>
			<content:encoded><![CDATA[<p>You can always count on somebody to have figured things out before you.. Chrisopher Roach's blog has a nice quick setup guide to get your xcode project in a git repo (gitignores, attributes and basic git push capability).</p>
<blockquote cite="http://christopherroach.com/archives/35">
<p> Whenever I setup a new Xcode project, the first thing I do is initialize it as a Git repository and add some configuration to the project that will make using Git with Xcode a bit less messy.</p>
<p>[From <a href="http://christopherroach.com/archives/35"><cite>christopherroach.com</cite></a> ]
</p></blockquote>
<p>And of course debate has already started on the merits of treating certain things as binary to avoid merging nightmares. &lt;sarcasm&gt;Don't you love XML syntaxes?&lt;/sarcasm&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2008/12/15/creating-a-git-project-for-xcodecocoa-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby, Folder actions and full automation</title>
		<link>http://www.hackerdude.com/2008/09/25/ruby-folder-actions-and-full-automation/</link>
		<comments>http://www.hackerdude.com/2008/09/25/ruby-folder-actions-and-full-automation/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 00:03:37 +0000</pubDate>
		<dc:creator>David Martinez</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.hackerdude.com/2008/09/25/ruby-folder-actions-and-full-automation/</guid>
		<description><![CDATA[I routinely scan my documents as PDFs so I can keep them in a virtual filing cabinet (you know, the whole "paperless office" thing). I use my HP all-in-one software running on a Windows VM inside a Mac (sorry, but the Mac scanning software on HP is complete garbage in my opinion). What bothered me [...]]]></description>
			<content:encoded><![CDATA[<p>I routinely scan my documents as PDFs so I can keep them in a virtual filing cabinet (you know, the whole "paperless office" thing). I use my HP all-in-one software running on a Windows VM inside a Mac (sorry, but the Mac scanning software on HP is complete garbage in my opinion).</p>
<p>What bothered me about this was that all the files scanned always end up named "scan12345.pdf". Because of the way I file, I like having my things as "year/company/year-monty-date.pdf" instead.</p>
<p><span id="more-532"></span></p>
<p>For a while there I was spending hours manually moving files to the correct folders while watching TV or doing another "using half-my-brain" activity. I thought there had to be a better way. I'm a bit handy with software, so I started a little ruby script to do the move for me.</p>
<p>The script uses pdftotext (you can get pdftotext using <a href="http://www.macports.org">MacPorts</a>  ) and ruby to determine information inside the actual PDF (scan them as "searchable PDFs" so it OCRs the text). Once it makes that determination, it does the file move to the appropriate place. A series of Regular expressions inside the script determine what company it belongs to, and a strong date parser takes a look at anything that looks significant enough that has a date attached to it in order to determine an appropriate date IN the scanned document, as opposed to the date of the file (which it uses if it can't find any parsable dates inside the document).</p>
<p>So now I had a script that could do those moves properly, but still didn't want to have to remember to continuously running the script. Here is where the Mac's Folder Actions feature comes in.</p>
<p>Using Folder Actions, I wrote the following script to wait for the file to drop in the folder (the scanning program on the Windows side uses a VMWare shared folder to drop the PDF on a mac folder):</p>
<p>It's not perfect. It uses a delay mechanism to wait for the Windows side to finish writing the PDF (dumb scanning program creates the zero-byte file and waits to fill it until it has run OCR on the whole thing). But because the folder action works on all PDFs on the document, it can pick up the ones it couldn't run pdftotext on the last time, so it's good enough for now. It also has a real problem pulling the correct date on documents where a lot of patterns could be a date (need to work on a good algorithm - I haven't found one yet).</p>
<p>Anyway, here are <a href="http://www.hackerdude.com/wp-content/sample_code/auto_file.rb">the auto_file script</a> and the <a href="http://www.hackerdude.com/wp-content/sample_code/added_scanned_doc.applescript.txt">applescript folder actions script</a> that triggers it.</p>
<p>Hopefully it will be useful for you if you have a similar need or just for learning how you can streamline some of the stuff you do every day with your Mac. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hackerdude.com/2008/09/25/ruby-folder-actions-and-full-automation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

