<?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>awkward silence &#187; mac</title>
	<atom:link href="http://tom.wilcoxen.org/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://tom.wilcoxen.org</link>
	<description></description>
	<lastBuildDate>Fri, 19 Mar 2010 21:39:36 +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>Build and Compile your SQLite Database with Xcode</title>
		<link>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/</link>
		<comments>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 21:01:30 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://tom.wilcoxen.org/?p=82</guid>
		<description><![CDATA[I&#8217;ve been working on setting up a database for an iPhone app. I haven&#8217;t worked with sqlite before so it&#8217;s yet another new thing to learn. I&#8217;ve been going through a few tutorials on the web and was partway through this one when I took the advice of his sidebar at the end of Step [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on setting up a database for an iPhone app. I haven&#8217;t worked with sqlite before so it&#8217;s yet another new thing to learn. I&#8217;ve been going through a few tutorials on the web and was partway through <a href="http://leefalin.com/blog/2008/10/02/iphone-sqlite-database-basics/">this one</a> when I took the advice of his sidebar at the end of Step 3 to keep my database definition in sql and have it built when the app compiles. He linked to <a href="http://public.toxicsoftware.com/CompileSQL.png">this screenshot</a> by way of a how-to, which unfortunately didn&#8217;t work for me.</p>
<p>First off, to find the build rules for your project, right click on Targets in xcode and select Get Info:<br />
<img src="http://img.skitch.com/20081128-s74ejes16mgctfch4dfcmbs29.jpg" alt="main.m - GameDay"/></p>
<p>I also added a check to see if your db already exists to avoid build errors if it doesn&#8217;t. I decided to put it into an external file and execute that from the build rule. Here&#8217;s what my build rule looks like:</p>
<div class="thumbnail"><a href="http://skitch.com/tomwilcoxen/h9u2/target-gameday-info"><img src="http://img.skitch.com/20081128-n6r6d3169j4geg6c32krip5kjj.preview.jpg" alt="Target 201CGameDay201D Info" /></a><br /><span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080">Uploaded with <a href="http://plasq.com/">plasq</a>&#8216;s <a href="http://skitch.com">Skitch</a>!</span></div>
<p>Here&#8217;s the bash shell script:<br />
<code><br />
#!/bin/bash<br />
cd ${TARGET_BUILD_DIR}<br />
if [ -f ${INPUT_FILE_BASE}.db ];<br />
  then<br />
    rm ${INPUT_FILE_BASE}.db;<br />
fi<br />
cat ${INPUT_FILE_PATH} | sqlite3 ${INPUT_FILE_BASE}.db<br />
</code></p>
<p>Put it in a file (sqlbuildrule.sh, for example) and place it in your project directory and set it to executable:<br />
<code>chmod +x sqlbuildrule.sh</code></p>
<p>At the end of the rule, click the + below &#8220;with output files&#8221; and enter this:<br />
<code>$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).db</code></p>
<p>The script will look for a .sql file in your project directory and build it with the output going to your target build directory. </p>
<p>If you need to edit the shell script or change the &#8220;with output files&#8221; setting of the build rule, note that the way you use the environment variables is different. The shell uses them as regular bash variables: ${MY_VAR}, where Xcode uses parens: $(MY_VAR). </p>
]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2008/11/28/build-and-compile-your-sqlite-database-with-xcode/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Merb with Phusion Passenger</title>
		<link>http://tom.wilcoxen.org/2008/07/21/merb-with-phusion-passenger/</link>
		<comments>http://tom.wilcoxen.org/2008/07/21/merb-with-phusion-passenger/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 04:57:25 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[ruby]]></category>
<category>mac</category><category>merb</category><category>ruby</category>
		<guid isPermaLink="false">http://tom.wilcoxen.org/2008/07/21/merb-with-phusion-passenger/</guid>
		<description><![CDATA[I just got Merb running under Phusion Passenger on my OS X Leopard MacBook and it all went well but with a couple gotchas. I looked at Manfred&#8217;s and TopFunky&#8217;s notes, but I couldn&#8217;t get Merb to kick in. It turns out I was missing a config.ru as they were running straight Rails apps and [...]]]></description>
			<content:encoded><![CDATA[<p>I just got <a href="http://merbivore.com/">Merb</a> running under <a href="http://www.modrails.com/">Phusion Passenger</a> on my OS X Leopard MacBook and it all went well but with a couple gotchas. I looked at <a href="http://www.fngtps.com/2008/04/using-passenger-on-osx-for-rails-development">Manfred&#8217;s</a> and <a href="http://nubyonrails.com/articles/ask-your-doctor-about-mod_rails">TopFunky&#8217;s</a> notes, but I couldn&#8217;t get Merb to kick in.</p>
<p>It turns out I was missing a config.ru as they were running straight Rails apps and Merb has to (gets to?) run as a <a href="http://brainspl.at/articles/2008/02/16/so-merb-core-is-built-on-rack-you-say-why-should-i-care">Rack</a> app. <a href="http://wiki.merbivore.com/pages/phusion-passenger">This page on Merbivore has all the info</a>. I was being a bit dense about actually taking that first bit of code (# config.ru, etc) and putting it into a file at the root of my Merb app named config.ru. Once done Merb fired right up and it&#8217;s working swimmingly. </p>
<a href="http://tom.wilcoxen.org/tags/mac" rel="tag">mac</a>, <a href="http://tom.wilcoxen.org/tags/merb" rel="tag">merb</a>, <a href="http://tom.wilcoxen.org/tags/ruby" rel="tag">ruby</a>]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2008/07/21/merb-with-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Twice as fast. Half the price. Or not.</title>
		<link>http://tom.wilcoxen.org/2008/07/11/twice-as-fast-half-the-price-or-not/</link>
		<comments>http://tom.wilcoxen.org/2008/07/11/twice-as-fast-half-the-price-or-not/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 23:43:42 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[mac]]></category>
<category>business</category><category>iPhone</category><category>mac</category>
		<guid isPermaLink="false">http://tom.wilcoxen.org/2008/07/11/twice-as-fast-half-the-price-or-not/</guid>
		<description><![CDATA[In April I changed jobs, moving from a position with a company-supplied phone to one without. I decided to go with AT&#038;T as I wanted to make the plunge and get an iPhone. However, being a loooong time Apple customer (first Mac: 1984) I was aware that the new version was right around the corner, [...]]]></description>
			<content:encoded><![CDATA[<p>In April I changed jobs, moving from a position with a company-supplied phone to one without. I decided to go with AT&#038;T as I wanted to make the plunge and get an iPhone. However, being a loooong time Apple customer (first Mac: 1984) I was aware that the new version was right around the corner, so I got a cheap LG flip phone and figured I&#8217;d upgrade when the new iPhone came out.</p>
<p>You&#8217;re probably already shaking your head at my naiveté. I&#8217;ve never been a heavy cell phone user &#8212; my plan before my company provided phone was a pay-as-you-go with Virgin, which suited my pretty well actually. I&#8217;m not a big talker, but I am a big emailer/web browser, etc., hence the iPhone lust.</p>
<p>So here&#8217;s some numbers I&#8217;m running through my head &#8212; the cost of my LG phone (a refurb, fwiw) was about $10 &#8212; they seem to be going for $80 used &#8212; I&#8217;d imagine AT&#038;T would have gotten them for that at most. So say they funded $70 of my phone. </p>
<p>I have the cheapest phone plan at $40/month with a $10 media plan. So far:</p>
<p>AT&#038;T -> Tom $70<br />
Tom  -> AT&#038;T $50/mo * 3 = $150</p>
<p>Now, due to that $70 AT&#038;T won&#8217;t provide me the upgrade price, but will generously allow me to upgrade for the open price of $399/$499 &#8212; although in order to do so I would still be required to extend my plan. Why? I don&#8217;t know.</p>
<p>What I would like to do:<br />
AT&#038;T -> Tom $200 (iPhone subsidy)<br />
Tom  -> AT&#038;T $70/mo + $5/mo for text</p>
<p>I would even be happy to pay off that $70 debt I have for the LG subsidy. AT&#038;T would be $25/month ahead, meaning they&#8217;d pay back the LG subsidy within a few months and have $300/year more of my cash indefinitely. </p>
<p>It&#8217;s just hard to not feel penalized as an existing customer and boy, do I regret not doing a pay-as-you-go plan for a while. At this point looking into alternatives like a cracked phone and switching providers would look good, if it was feasible. It just makes me want to leave AT&#038;T. Here they have a chance to increase their revenue from me, but they manage to turn that around and make me an unhappy customer. </p>
<p>Sheesh.</p>
<a href="http://tom.wilcoxen.org/tags/business" rel="tag">business</a>, <a href="http://tom.wilcoxen.org/tags/iphone" rel="tag">iPhone</a>, <a href="http://tom.wilcoxen.org/tags/mac" rel="tag">mac</a>]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2008/07/11/twice-as-fast-half-the-price-or-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating user accounts w/o Firewire Target Disk</title>
		<link>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/</link>
		<comments>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 22:27:44 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
<category>mac</category><category>os x</category>
		<guid isPermaLink="false">http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/</guid>
		<description><![CDATA[Perhaps this is an edge case, but recently I wanted to migrate my wife&#8217;s account from a G4 Yikes (1st generation G4 desktop machine) to a MacBook. It turns out that the G4 Yikes (aka, non-AGP graphics G4) is the only G4 (or, I believe G3) with built-in Firewire that won&#8217;t go into target disk [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps this is an edge case, but recently I wanted to migrate my wife&#8217;s account from a G4 Yikes (1st generation G4 desktop machine) to a MacBook. It turns out that the G4 Yikes (aka, non-AGP graphics G4) is the only G4 (or, I believe G3) with built-in Firewire that won&#8217;t go into <a href="http://docs.info.apple.com/article.html?artnum=58583">target disk mode</a>.</p>
<p>You can, however, use the Migration Assistant with a mounted volume &#8212; if you happen to be able to yank the drive from the old machine and pop it in the new one, you&#8217;re good to go. I couldn&#8217;t, but had an external Firewire/USB drive. I used <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> to make a backup of the G4 HD, copied that to the external drive and then migrated from that onto the MacBook.</p>
<p>It worked great, but beware: you have to register SuperDuper! to get the full copy capability. I had registered, but was using a demo copy on the G4 and kept getting only the Users folder copied (which isn&#8217;t enough to Migrate from). With the registered version it will actually make a bootable volume.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/mac" rel="tag">mac</a>, <a href="http://www.technorati.com/tag/os x" rel="tag">os x</a></p>
<p><!-- technorati tags end --></p>
<a href="http://tom.wilcoxen.org/tags/mac" rel="tag">mac</a>, <a href="http://tom.wilcoxen.org/tags/os-x" rel="tag">os x</a>]]></content:encoded>
			<wfw:commentRss>http://tom.wilcoxen.org/2007/06/26/migrating-user-accounts-wo-firewire-target-disk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.190 seconds -->
