<?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>Travis Beck</title>
	<atom:link href="http://travisjbeck.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://travisjbeck.com/blog</link>
	<description>The Modern Web</description>
	<lastBuildDate>Fri, 06 Apr 2012 19:33:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>3 hour diet</title>
		<link>http://travisjbeck.com/blog/random/3-hour-diet/</link>
		<comments>http://travisjbeck.com/blog/random/3-hour-diet/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 19:33:20 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=156</guid>
		<description><![CDATA[My first iPhone app is officially live in the app store. So I&#8217;m sure you&#8217;ve heard of the idea of the 3 hour diet right? Well if you haven&#8217;t, its simple. Eating smaller portions every 3 hours is the most effective way of keeping your metabolism up and your weight down. So you have breakfast, [...]]]></description>
			<content:encoded><![CDATA[<p>My first <a href="http://3hourdietapp.com">iPhone app</a> is officially live in the app store.</p>
<p>So I&#8217;m sure you&#8217;ve heard of the idea of the <a href="http://3hourdietapp.com">3 hour diet</a> right? Well if you haven&#8217;t, its simple. Eating smaller portions every 3 hours is the most effective way of keeping your metabolism up and your weight down. So you have breakfast, then three hours later a snack, then three hours later lunch, then a snack, then dinner, then a snack (if you&#8217;re up that late). I learned about this from my trainer who recommended that i start eating every 3 hours. So I did and i noticed that i had much more energy throughout the day and my fitness progress improved drastically. But i would sometimes forget to eat or wait too long between meals, so i searched the app store to see if there was any kind of reminder app. There wasn&#8217;t. So I just thought I&#8217;d build one myself.</p>
<p>I have extensive programming experience, but I&#8217;d never made an iPhone app and barely even knew where to begin. But just over a month later i finished this bad boy and now its live on the app store.</p>
<p>So, the app is really easy. After you wake up and eat breakfast, launch the app and hit the shiny button. Three hours later you&#8217;ll be reminded that it&#8217;s time to eat again. SO&#8230; eat! Then hit the button again when you&#8217;re done. You can also changed the default timer from 4:00 all the way down to 1:00 if you need prep time before you eat. There&#8217;s a handy meal progress bar on the bottom that keeps tracks of how many meals you&#8217;ve had and whether its &#8220;snack&#8221; time or &#8220;meal&#8221; time (big fork and knife vs little fork and knife).</p>
<p>So there it is. I really enjoyed making it and I learned a ton. Plus i really enjoy using it. I took great pains to make a very mundane task fun and visually appealing.</p>
<p>So if you have an iPhone or iPod Touch please install it and tell me know what you think. If you like it I would greatly appreciate it if you took a minute to rate it and leave feedback on the app store.</p>
<p><a href="http://3hourdietapp.com">http://3hourdietapp.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/random/3-hour-diet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved php curl unable to resolve host</title>
		<link>http://travisjbeck.com/blog/php/solved-php-curl-unable-to-resolve-host/</link>
		<comments>http://travisjbeck.com/blog/php/solved-php-curl-unable-to-resolve-host/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 07:31:31 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=153</guid>
		<description><![CDATA[I had a problem on a new rackspace cloud server i had just set up where curl called from php was unable to resolve hosts, but that same curl command called from the command line ran just fine.  Turns out the problem was that apache was unable to read /etc/resolv.conf because of the file permissions. [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem on a new rackspace cloud server i had just set up where curl called from php was unable to resolve hosts, but that same curl command called from the command line ran just fine.  Turns out the problem was that apache was unable to read /etc/resolv.conf because of the file permissions. Change the permissions to 644 and it works fine now.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/php/solved-php-curl-unable-to-resolve-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 4s and iPhone 3gs Network Speeds Comparison</title>
		<link>http://travisjbeck.com/blog/iphone/iphone-4s-and-iphone-3gs-network-speeds-comparison/</link>
		<comments>http://travisjbeck.com/blog/iphone/iphone-4s-and-iphone-3gs-network-speeds-comparison/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 22:27:30 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=144</guid>
		<description><![CDATA[I just got my 4s and decided to check how much faster the network is with the new antennae than my old 3gs.  Here&#8217;s the outcome, I am using  the speedtest.net mobile speedtest app.]]></description>
			<content:encoded><![CDATA[<p>I just got my 4s and decided to check how much faster the network is with the new antennae than my old 3gs.  Here&#8217;s the outcome, I am using  the <a href="http://itunes.apple.com/us/app/speedtest.net-mobile-speed/id300704847?mt=8">speedtest.net mobile speedtest app</a>.<span id="more-144"></span><a href="http://travisjbeck.com/blog/wp-content/uploads/2011/10/photo.jpg"><img class="aligncenter size-medium wp-image-145" title="photo" src="http://travisjbeck.com/blog/wp-content/uploads/2011/10/photo-300x226.jpg" alt="" width="300" height="226" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/iphone/iphone-4s-and-iphone-3gs-network-speeds-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Twiki on a Media Temple DV Server</title>
		<link>http://travisjbeck.com/blog/random/installing-twiki-on-a-media-temple-dv-server/</link>
		<comments>http://travisjbeck.com/blog/random/installing-twiki-on-a-media-temple-dv-server/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 21:09:18 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=133</guid>
		<description><![CDATA[After many failed attempts at getting twiki to work on our server by following their installation guide, i finally figured it out. The trick is to turn off mod_perl and set the correct permissions of the twiki folder. Problem The problem i was running into was when i got to the /twiki/bin/configure part of the [...]]]></description>
			<content:encoded><![CDATA[<p>After many failed attempts at getting twiki to work on our server by following their installation guide, i finally figured it out.  The trick is to turn off mod_perl and set the correct permissions of the twiki folder.<span id="more-133"></span></p>
<h2>Problem</h2>
<p>The problem i was running into was when i got to the /twiki/bin/configure part of the twiki install instructions i would get a white page and the error log simply said &#8220;Premature end of script headers&#8221;. I would then tweak endlessly with different configurations only to come up with the same error.  It wasnt until i looked in the suexec_log on the server under /var/logs/httpd that i was able to solve the problem</p>
<h2>Solution</h2>
<p>This particular install was on a subdomain of wiki. I unzipped the installation files to &#8220;/var/www/vhosts//subdomains/wiki/httpdocs/twiki/&#8221;.  The installation docs tell you to chown the entire directory as apache:apache.  This will not work on your DV.  Instead you need to use the ftp user as the user and psacln as the group.  so you would do &#8220;chown -R :psacln twiki&#8221;  replace  with the ftp user for that subdomain. Most of the time this is already the case if you uploaded via ftp under that username.  The other thing you want to make sure of is to turn off mod_perl.  You can do this in the domains apache config file.  This should be located at &#8220;/vaw/www/vhosts//conf/httpd.include&#8221; Now i know the comments at the top of the file tell you not to modify it but to use vhost.conf file instead, but i do not know how to turn off mod_perl that way,  If you do please let me know in the comments.  So we&#8217;re looking for the vhost declaration for our subdomain of wiki and looking for the line that says:<br />
<code><br />
SetHandler perl-script<br />
PerlHandler ModPerl::Registry<br />
Options ExecCGI<br />
allow from all<br />
PerlSendHeader On<br />
</code></p>
<p>This will probably be listed twice for your subdomain, once for :80 and once for :443<br />
<strong>Change that in both places to </strong><br />
<code><br />
# SetHandler perl-script<br />
# PerlHandler ModPerl::Registry<br />
Options ExecCGI<br />
allow from all<br />
PerlSendHeader On<br />
</code><br />
Basically just comment out the lines to set perl scripts to execute under mod_perl. So that should do it, save that, restart apache and give it a whirl.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/random/installing-twiki-on-a-media-temple-dv-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the Zip Code from an HTML5 GeoLocation API Call</title>
		<link>http://travisjbeck.com/blog/javascript/getting-the-zip-code-from-an-html5-geolocation-api-call/</link>
		<comments>http://travisjbeck.com/blog/javascript/getting-the-zip-code-from-an-html5-geolocation-api-call/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 20:40:06 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=120</guid>
		<description><![CDATA[The HTML5 Geolocation API is built into newer browsers and returns the approximate latitude and longitude of the device in JSON format. View Demo Latitude and longitude is great for maps, but sometimes you need additional information, like an address or zip code. Unfortunately the native Geolocation API does not provide this functionality, but luckily [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.w3.org/TR/2008/WD-geolocation-API-20081222/">HTML5 Geolocation</a> API is built into newer browsers and returns the approximate latitude and longitude of the device in JSON format.<span id="more-120"></span></p>
<p><a href="/files/getzipcode/">View Demo</a></p>
<p>Latitude and longitude is great for maps, but sometimes you need additional information, like an address or zip code. Unfortunately the native Geolocation API does not provide this functionality, but luckily <a href="http://code.google.com/apis/maps/documentation/geocoding/">Google&#8217;s Geocoding API</a> does.  Google&#8217;s Geocoding API has the ability to do what&#8217;s called reverse geocoding.  You give it latitude and longitude and it gives you nearby addresses in a nice neat JSON package.  Here&#8217;s an <a href="http://maps.google.com/maps/api/geocode/json?latlng=40.714224,-73.961452&amp;sensor=false">example</a> of the JSON returned by a reverse geocode lookup.  As you can see, it contains a lot of information about addresses around that area.  However for this particular article we are only interested in the Zip Code of the first result.</p>
<p>One caveat of using Google&#8217;s Geocoding API in JavaScript is that there is no way to add a callback to the end of the request. This rules out the cross-domain AJAX method of dynamic script tag embedding as a method of retrieving the data.  Currently the easiest way to achieve cross-domain AJAX calls is by using a proxy. A proxy is a server-side script that resides on the same domain as your client script and acts as a middle man between the two domains.  Your script makes an ajax call to the proxy, the proxy retrieves the data from the other domain and returns it back to your script.</p>
<p>Heres my proxy.php file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$path</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Open the Curl session</span>
<span style="color: #000088;">$session</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// If it's a POST, put the POST data in the body</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$postvars</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$element</span> <span style="color: #339933;">=</span> <span style="color: #990000;">current</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$postvars</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'='</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$element</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;'</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">next</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #990000;">curl_setopt</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$postvars</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Don't return HTTP headers. Do return the contents of the call</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Make the call</span>
<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// does the service return XML or JSON? Set the Content-Type appropriately</span>
<span style="color: #000088;">$headerType</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// 'text/xml' or 'application/json'</span>
<span style="color: #000088;">$headerType</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerType</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$headerType</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'text/xml'</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//default</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$headerType</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Here&#8217;s the JavaScript.  Notice I&#8217;m using jQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> GETZIP <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
      getLocation<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#status'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'searching...'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">geolocation</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            navigator.<span style="color: #660066;">geolocation</span>.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span>GETZIP.<span style="color: #660066;">getZipCode</span><span style="color: #339933;">,</span> GETZIP.<span style="color: #660066;">error</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">7000</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//cache it for 10 minutes</span>
         <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
            GETZIP.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Geo location not supported'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
      index<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
      error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>msg.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">//this is a geolocation error</span>
            <span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>msg.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">:</span>
               $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Permission Denied'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">:</span>
               $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Position Unavailable'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">:</span>
               GETZIP.<span style="color: #660066;">index</span><span style="color: #339933;">++;</span>
               $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Timeout... Trying again ('</span> <span style="color: #339933;">+</span> GETZIP.<span style="color: #660066;">index</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeOut</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               navigator.<span style="color: #660066;">geolocation</span>.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span>GETZIP.<span style="color: #660066;">getZipCode</span><span style="color: #339933;">,</span> GETZIP.<span style="color: #660066;">error</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>timeout<span style="color: #339933;">:</span> <span style="color: #CC0000;">7000</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">default</span><span style="color: #339933;">:</span>
               <span style="color: #006600; font-style: italic;">//nothing</span>
            <span style="color: #009900;">&#125;</span>
         <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">//this is a text error</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#error'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'failed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
      getZipCode<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #003366; font-weight: bold;">var</span> position <span style="color: #339933;">=</span> position.<span style="color: #660066;">coords</span>.<span style="color: #660066;">latitude</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;,&quot;</span> <span style="color: #339933;">+</span> position.<span style="color: #660066;">coords</span>.<span style="color: #660066;">longitude</span><span style="color: #339933;">;</span>
         $.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'proxy.php'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>
            path <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://maps.google.com/maps/api/geocode/json?latlng=&quot;</span><span style="color: #339933;">+</span>position<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&amp;sensor=false&quot;</span><span style="color: #339933;">,</span>
            type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;application/json&quot;</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>json<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">//Find the zip code of the first result</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>json.<span style="color: #000066;">status</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;OK&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
               GETZIP.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Zip Code not Found'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
               <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #003366; font-weight: bold;">var</span> found <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
            $<span style="color: #009900;">&#40;</span>json.<span style="color: #660066;">results</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">address_components</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> el<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
               <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">inArray</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;postal_code&quot;</span><span style="color: #339933;">,</span> el.<span style="color: #660066;">types</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#status&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Your Zip Code: '</span> <span style="color: #339933;">+</span> el.<span style="color: #660066;">short_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                  found <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                  <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
               <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>found<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
               GETZIP.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Zip Code not Found'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
         <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
   GETZIP.<span style="color: #660066;">getLocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>
<b>A note on Safari 5:</b> It seems that the current implementation of geolocation is a bit buggy.  Sometimes it returns results almost immediately, other times it takes more than 10 seconds, but more often than not it runs for eternity without success. Firefox, on the other hand, seems pretty stable.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/javascript/getting-the-zip-code-from-an-html5-geolocation-api-call/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Pure CSS3 Card Flip (webkit only)</title>
		<link>http://travisjbeck.com/blog/browsers/pure-css3-card-flip-webkit-only/</link>
		<comments>http://travisjbeck.com/blog/browsers/pure-css3-card-flip-webkit-only/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 06:15:04 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[browsers]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=117</guid>
		<description><![CDATA[Put together a quick css3 demo of a dashboard style card flip using pure CSS for the transitions. Javascript is only used for toggling the class name on click and the animation property sliders. Currently only works in Safari 5. View Demo]]></description>
			<content:encoded><![CDATA[<p>Put together a quick css3 demo of a dashboard style card flip using pure CSS for the transitions.  Javascript is only used for toggling the class name on click and the animation property sliders. Currently only works in Safari 5.</p>
<p><a href="/files/css3cardflip/">View Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/browsers/pure-css3-card-flip-webkit-only/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Late night php and javascript coding</title>
		<link>http://travisjbeck.com/blog/random/late-night-php-and-javascript-coding/</link>
		<comments>http://travisjbeck.com/blog/random/late-night-php-and-javascript-coding/#comments</comments>
		<pubDate>Fri, 21 May 2010 05:54:10 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[random]]></category>
		<category><![CDATA[coding funny]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=114</guid>
		<description><![CDATA[Got this email from Gary. Epic]]></description>
			<content:encoded><![CDATA[<p>Got this email from Gary. Epic<br />
<span id="more-114"></span><br />
<a href="http://travisjbeck.com/blog/wp-content/uploads/2010/05/Screen-shot-2010-05-21-at-12.49.26-AM.png"><img class="aligncenter size-full wp-image-113" title="Screen shot 2010-05-21 at 12.49.26 AM" src="http://travisjbeck.com/blog/wp-content/uploads/2010/05/Screen-shot-2010-05-21-at-12.49.26-AM.png" alt="" width="455" height="190" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/random/late-night-php-and-javascript-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop CS5 Content Aware Fill is Pretty Amazing</title>
		<link>http://travisjbeck.com/blog/photoshop/photoshop-cs5-content-aware-fill-is-pretty-amazing/</link>
		<comments>http://travisjbeck.com/blog/photoshop/photoshop-cs5-content-aware-fill-is-pretty-amazing/#comments</comments>
		<pubDate>Sun, 02 May 2010 20:31:23 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[photoshop]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=108</guid>
		<description><![CDATA[So i have this profile pic that i use almost everywhere, my hair was pretty crazy and i took a picture of it in a mirror to send to my girlfriend while i was on the phone with her, so i had my blutooth in at the time. Today, I installed Photoshop CS5 trial and [...]]]></description>
			<content:encoded><![CDATA[<p>So i have this profile pic that i use almost everywhere, my hair was pretty crazy and i took a picture of it in a mirror to send to my girlfriend while i was on the phone with her, so i had my blutooth in at the time.</p>
<p>Today, I installed Photoshop CS5 trial and used content-aware fill on a selection of the blutooth and i was pretty blown away at the results.<br />
<span id="more-108"></span><br />
Below is the results. Before is on top, After is on bottom.</p>
<p><img class="aligncenter size-full wp-image-109" title="content-aware-delete" src="http://travisjbeck.com/blog/wp-content/uploads/2010/05/content-aware-delete.jpg" alt="content-aware-delete" width="250" height="500" /></p>
<p>Of course i could clean it up a bit more, but this was just 2 simple steps.  Make a quick selection and hit delete.  Amazing.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/photoshop/photoshop-cs5-content-aware-fill-is-pretty-amazing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Full Size Photoshop Canvas on a Mac</title>
		<link>http://travisjbeck.com/blog/general/full-size-photoshop-canvas-on-a-mac/</link>
		<comments>http://travisjbeck.com/blog/general/full-size-photoshop-canvas-on-a-mac/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 17:06:25 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=95</guid>
		<description><![CDATA[So i recently acquired a new uni body macbook and have since been getting used to the switch from windows to mac. I gotta say I&#8217;m very much loving the OS X experience and the multi-touch gestures on the giant new track pad. That being said, one of the things that was really annoying me [...]]]></description>
			<content:encoded><![CDATA[<p>So i recently acquired a new uni body macbook and have since been getting used to the switch from windows to mac.  I gotta say I&#8217;m very much loving the OS X experience and the multi-touch gestures on the giant new track pad.  That being said, one of the things that was really annoying me was the default modal disjointed photoshop experience.  I like all my apps to be in a nice neat <del datetime="2009-02-20T16:35:16+00:00">window</del> container.</p>
<p><span id="more-95"></span></p>
<p>Here&#8217;s the default &#8220;disjointed&#8221; photoshop setup on a mac</p>
<p><a href="http://travisjbeck.com/blog/wp-content/uploads/2009/02/disjointed-lrg.jpg"><img src="http://travisjbeck.com/blog/wp-content/uploads/2009/02/disjointed-sml.jpg" alt="" title="Photoshop Disjointed Window" width="500" height="312" class="aligncenter size-full wp-image-99" /></a></p>
<p>Now i wanna contain all those wild modal panels into one cohesive application window. So i choose &#8220;Application Frame&#8221; From the &#8220;Window&#8221; menu like so:</p>
<p><img src="http://travisjbeck.com/blog/wp-content/uploads/2009/02/menu.jpg" alt="" title="Application Frame" width="176" height="270" class="aligncenter size-full wp-image-100" /></p>
<p>That leaves me with a beautifully framed and contained photoshop with a full size canvas.  This is much easier to work with since i am no longer accidentally clicking the desktop and losing my application focus.</p>
<p><a href="http://travisjbeck.com/blog/wp-content/uploads/2009/02/contained-lrg.jpg"><img src="http://travisjbeck.com/blog/wp-content/uploads/2009/02/contained-sml.jpg" alt="" title="Nicely Contained" width="500" height="312" class="aligncenter size-full wp-image-97" /></a></p>
<p>Keep in mind that this is CS4 and your mileage may vary depending on what version you are using.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/general/full-size-photoshop-canvas-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Auditorium &#8211; I want this on my iPhone&#8230; now</title>
		<link>http://travisjbeck.com/blog/general/auditorium-i-want-this-on-my-iphone-now/</link>
		<comments>http://travisjbeck.com/blog/general/auditorium-i-want-this-on-my-iphone-now/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 21:31:07 +0000</pubDate>
		<dc:creator>Travis</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://travisjbeck.com/blog/?p=93</guid>
		<description><![CDATA[Auditorium is an amazingly fun and beautiful flash game. If you haven&#8217;t checked it out yet, stop reading now and take a look. The site hints that the creators are working on an iPhone and console version. I want this on my iPhone now.]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://www.playauditorium.com">Auditorium</a> is an amazingly fun and beautiful flash game.  If you haven&#8217;t checked it out yet, stop reading now and take a look.  The site hints that the creators are working on an iPhone and console version.  I want this on my iPhone now.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisjbeck.com/blog/general/auditorium-i-want-this-on-my-iphone-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

