<?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>Patrick Tulskie &#187; Uncategorized</title>
	<atom:link href="http://www.patricktulskie.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.patricktulskie.com</link>
	<description>Building a Better Internet</description>
	<lastBuildDate>Wed, 16 Jun 2010 19:12:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Skip Rails AuthenticityToken Check, Sometimes</title>
		<link>http://www.patricktulskie.com/2010/04/skip-rails-authenticitytoken-check-sometimes/</link>
		<comments>http://www.patricktulskie.com/2010/04/skip-rails-authenticitytoken-check-sometimes/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 16:05:10 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[authenticitytoken]]></category>
		<category><![CDATA[before_filter]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=154</guid>
		<description><![CDATA[Earlier today, Elad Meidar asked on Twitter about how to bypass checking the Authenticity Token in Rails for an action, sometimes.  The example he mentioned was for a write API but this could theoretically be used for other situations where you only want to skip the authenticity token check of an action under specific [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today, Elad Meidar asked on <a href="http://twitter.com/eladmeidar/status/11759280546">Twitter</a> about how to bypass checking the Authenticity Token in Rails for an action, sometimes.  The example he mentioned was for a write API but this could theoretically be used for other situations where you only want to skip the authenticity token check of an action under specific circumstances.  We went back and fort</p>
<p>
First off, you need to do some before filter work:</p>
<pre><code>skip_before_filter :verify_authenticity_token, :only => [:your_action]
before_filter :semi_verify_authenticity_token, :only => [:your_action]</code></pre>
</p>
<p>
Then you need a function to define when to check for the token authenticity:</p>
<pre><code>def semi_verify_authenticity_token
  verify_authenticity_token unless request.xhr? # Or whatever other criteria you would use
end</code></pre>
</p>
<p>All you really have to do then is make sure that verify_authenticity_token gets called based on the params or request and you should be set.  This can be useful for APIs or AJAX calls calls to a given action where you don&#8217;t mind skipping the token check, but you still want to enforce it for the regular HTML browser view.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2010/04/skip-rails-authenticitytoken-check-sometimes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Highlighting</title>
		<link>http://www.patricktulskie.com/2009/12/code-highlighting/</link>
		<comments>http://www.patricktulskie.com/2009/12/code-highlighting/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 19:05:02 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=132</guid>
		<description><![CDATA[Just a small thing.  I was trying to find a good syntax highlighter for code on this blog and another one I&#8217;m about to start.  After trying a few, I settled on highlight.js from http://softwaremaniacs.org/soft/highlight/en
You basically need to simply wrap your code in &#60;pre&#62;&#60;code&#62;&#60;/code&#62;&#60;/pre&#62; and it handles the rest.  Here&#8217;s an example:

class [...]]]></description>
			<content:encoded><![CDATA[<p>Just a small thing.  I was trying to find a good syntax highlighter for code on this blog and another one I&#8217;m about to start.  After trying a few, I settled on highlight.js from http://softwaremaniacs.org/soft/highlight/en</p>
<p>You basically need to simply wrap your code in &lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt; and it handles the rest.  Here&#8217;s an example:</p>
<pre><code>
class ThisIsRuby

  def fun
    puts "This is fun!"
  end

end

test = ThisIsRuby.new
puts test.fun

</code></pre>
<p>On a semi-related note, I&#8217;m still chasing down some nginx config related gremlins.  If you see anything weird, let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2009/12/code-highlighting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebbyNode, Nginx, and Percona MySQL</title>
		<link>http://www.patricktulskie.com/2009/12/webbynode-nginx-percona-mysql/</link>
		<comments>http://www.patricktulskie.com/2009/12/webbynode-nginx-percona-mysql/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 18:07:04 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=128</guid>
		<description><![CDATA[I&#8217;ve been having some issues with the slice that the blog and some other applications were on the box.  Over the past few weeks, MySQL has been crashing or perhaps SliceHost was rebooting my server and MySQL was not coming back up.  It was all very mysterious to me, but I was unhappy with the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having some issues with the slice that the blog and some other applications were on the box.  Over the past few weeks, MySQL has been crashing or perhaps SliceHost was rebooting my server and MySQL was not coming back up.  It was all very mysterious to me, but I was unhappy with the overall setup anyway.</p>
<p>WebbyNode is a newer player in the VPS game and they offer basically the same setup as SliceHost at a lower price.  I also like their ReadyStacks and github friendliness.  I registered and built out a box with Nginx and Percona MySQL.  Everything feels fairly snappy when I&#8217;m on the box despite being a low memory VPS.</p>
<p>Going forward I&#8217;m going to be moving Twexaminer.com over to this same VPS and run it through Nginx with Unicorn.</p>
<p>If anyone has any questions about the setup, let me know.  If I get a chance later, I&#8217;ll try to come up with a short guide on how I got everything working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2009/12/webbynode-nginx-percona-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Ruby, Git, and Bonjour to Get Through Code Review</title>
		<link>http://www.patricktulskie.com/2008/12/using-ruby-git-and-bonjour-to-get-through-code-review/</link>
		<comments>http://www.patricktulskie.com/2008/12/using-ruby-git-and-bonjour-to-get-through-code-review/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 05:55:38 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=97</guid>
		<description><![CDATA[Every Friday we have our code reviews at BeenVerified and it is definitely a non-trivial event.  Our development team looks through the code all together and offers suggestions and ways to improve what the creator deems near-complete code.  Code reviews have become my favorite part of team based development because they offer me such a [...]]]></description>
			<content:encoded><![CDATA[<p>Every Friday we have our code reviews at BeenVerified and it is definitely a non-trivial event.  Our development team looks through the code all together and offers suggestions and ways to improve what the creator deems near-complete code.  Code reviews have become my favorite part of team based development because they offer me such a badass opportunity to learn more.  Everyone looks a problem differently and so getting insight from other people is huge because you might not consider all of your options when you&#8217;re knee deep in 1000 lines of ruby, CSS, and js all at once.</p>
<p>Yeah it&#8217;s great, except this Friday it didn&#8217;t happen.  Thanksgiving weekend happened instead so we pushed it to Monday.  Being the silly goose I am, I decided to get a new Macbook on Black Friday.  I restored my stuff from Time Machine, installed my Ruby Gems, and thought all was well.  Monday morning, my turn to present code came up and there was a problem with screen sharing.  Crap.  All of my code is in a git branch that is not pushed to a server yet and the time it would have taken to get to a state where we could present it from another machine would have been too much so we postponed my review until my screen sharing would work.  This was most displeasing to me.<span id="more-97"></span></p>
<p><strong>How To Handle It Next Time.</strong></p>
<p>As of late, there has been a lot of talk about bonjour in the ruby world.  There are a lot of really awesome applications that use the technology.  Take for example, gitjour.  It takes an existing git repository and makes it available to machines on the local network through bonjour.  All they would need is the gem and to type &#8220;gitjour list&#8221; in a terminal window to see what&#8217;s available.  That&#8217;s badass.</p>
<p>So if we had to rewind to Monday morning, what we should have done is take a functioning machine on the local network and had that person do a clone of my repository to a new working directory and then we could have screen shared that.  It would have taken a fraction of the time that it would have taken to push it to the server with my own local branch, tell someone to get a copy of my branch from the server and what branch to take.  Gitjour would have cut out all of the steps and it would have been quicker since it&#8217;s on the local network.</p>
<p>This thought alone makes me want to dive deeper into bonjour and figure out how to use it for various things.  If you have any good resources, post them in the comments or hit me up on Twitter. (http://twitter.com/patricktulskie)</p>
<p><strong>What Was The Screen Sharing Problem?</strong></p>
<p>Turns out iChat 4.0.5 doesn&#8217;t know how to view the screen of someone with iChat 4.0.6.  The new Macbook comes with 4.0.6 by default and there is no easy way to upgrade to it.  I downgraded to 4.0.2 from my Blackbook and now all is well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2008/12/using-ruby-git-and-bonjour-to-get-through-code-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leopard and MySQL Gem</title>
		<link>http://www.patricktulskie.com/2008/11/leopard-and-mysql-gem/</link>
		<comments>http://www.patricktulskie.com/2008/11/leopard-and-mysql-gem/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 18:48:14 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[leopard mysql gem]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby gem mysql rails]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=88</guid>
		<description><![CDATA[Explains how to get the MySQL ruby gem to compile for Macs on OS X Leopard.]]></description>
			<content:encoded><![CDATA[<p>Those of you doing rails development work on Leopard with MySQL have probably seen this error message when starting your app:</p>
<blockquote><p>WARNING: You&#8217;re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).</p></blockquote>
<p>Normally I don&#8217;t care, but I figured since I was doing some cleanup today and getting things ready to move on to a longer term it might be good to have a properly working MySQL gem.  I like to run with a system that is close to what we run production.  The closer you get, the less surprises you have when you push it live.</p>
<p><span id="more-88"></span></p>
<p><strong>More Fixing.  Less Talking.</strong></p>
<p>Damn you&#8217;re so pushy sometimes.  Anyhow.  I did a sudo gem install mysql and got another damn error.</p>
<pre><code>Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
</code></pre>
<p>Oh good.  Another error.  Perfect.  I searched around the interwebs and someone suggested using &#8220;&#8211;with-mysql-lib=/usr/local/mysql/lib&#8221; in the options since that&#8217;s where the libraries are located.  It still barfed on me with that.</p>
<p><strong>A Solution Please.</strong></p>
<p>A few more minutes of hunting and pecking and I found the golden command:</p>
<pre><code>sudo gem install mysql -- --with-mysql-config
Building native extensions.  This could take a while...
Successfully installed mysql-2.7
1 gem installed</code></pre>
<p>Now I don&#8217;t have any errors when starting my rails applications that use MySQL and I&#8217;m closer to what I have in production.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2008/11/leopard-and-mysql-gem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How Rails Saved Me Last Week</title>
		<link>http://www.patricktulskie.com/2008/08/how-rails-saved-me-last-week/</link>
		<comments>http://www.patricktulskie.com/2008/08/how-rails-saved-me-last-week/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 05:00:39 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=50</guid>
		<description><![CDATA[The night time, it was great.  Air was cool, had just gone on a nice jog with my girlfriend, and I was quite content with everything.  Being that my girlfriend has my health in my best interest, she decided to give me some cereal to take home with me.  I walk out to my car [...]]]></description>
			<content:encoded><![CDATA[<p>The night time, it was great.  Air was cool, had just gone on a nice jog with my girlfriend, and I was quite content with everything.  Being that my girlfriend has my health in my best interest, she decided to give me some cereal to take home with me.  I walk out to my car in my <strong>running shorts</strong> that have no pockets and I&#8217;m half juggling my clothes, laptop case, shoes, cereal, and&#8230; my <strong>Blackberry</strong>.</p>
<p><code><br />
def for_the_record<br />
running_shorts != skin_tight<br />
end<br />
</code></p>
<p>I do what I can, placing my blackberry on the roof of my car, get everything inside the car and start driving home.  I get about half way there and&#8230;</p>
<p><span id="more-50"></span></p>
<p><strong>Oh Crap.</strong></p>
<p>I hear a horrible banging noise from the rear of my car.  I look in the rear view mirror to see my Blackberry exploding in the air from its impact with the trunk of my car followed by an additional round of roughness from the black top.  I spent the next little while collecting pieces from the pavement but I could not find enough to get a working device again.  Despite this, what I could find on the dark road was in surprisingly good shape for the 40mph violence that had just occurred.  Before I go too far off course, let me just say that the long story short is: I had insurance on the phone and I&#8217;d have a new one in a day.</p>
<p><strong>That&#8217;s Not So Bad Patrick.  What&#8217;s The Big Deal?</strong></p>
<p>Well, for some reason, people like to call me with opportunities.  These opportunities are pretty important for me to keep track of and my Blackberry was my #1 way of doing just that.  That&#8217;s when I turned to rails&#8230; ah yes.</p>
<p><strong>Ruby on Rails?</strong></p>
<p>No.  Grahm Crackers on Rails.  What the heck do you think I&#8217;m talking about?  You know if you&#8217;re going to act like that I&#8217;m going to just stop writing.  Ok?  Good.  Now that we have that out of the way.</p>
<p>I wrote zero code to do this.  That&#8217;s right.  None!  I used my Heroku account to create a new application.  I then used their generate tool with the following command:</p>
<p><code>scaffold opportunity name:string number:string notes:text</code></p>
<p>After that I ran a rake db:migrate and it was done.  Rails went, created my opportunities table, added the columns, and even made me some nice pages for me.  I then went to the page and began adding stuff as I listened to voicemails.  If I needed it to disappear all I had to do was close my browser window and no one was the wiser.</p>
<p><strong>So You Just Made a Rails App With Two Command Line Entries?</strong></p>
<p>Yes.  That&#8217;s what I did.  The scaffold is obviously meant to be a building block to get a project started, but the ability to generate all of this stuff absolutely blows people&#8217;s minds sometimes.  It does show you though &#8211; anyone can write something in this frame work in no time.  I did &#8211; with zero code.  It feels almost like cheating doesn&#8217;t it?  Something like that would take a bunch of code in PHP or Perl and that&#8217;s not even talking about the SQL that one would also need to do.</p>
<p>So that&#8217;s my answer to those of you ask me &#8220;Why do I want to learn Ruby/Rails?&#8221;  I&#8217;ve now explained it in the open on the internet so hopefully I <em>don&#8217;t have the repeat myself</em>.  Afterall, if I did, that would be violating one of the principals of the framework.</p>
<p>If you&#8217;ve never done anything with Rails then consider this your &#8220;Hello World!&#8221; and then go look at the files that were generated.  You currently have a lot of basic stuff sitting in front of you that you can learn from.  Play with it, break it, make it better, take it apart, put it back together.  Worst comes to worst, you destroy your project and start over.  It only took 2 command line entries to get it going.</p>
<p><strong>Hey! I Want a Heroku Invite!</strong></p>
<p>Well, shoot me an email, tweet, linkedin message, etc and let me know!  I can definitely get you one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2008/08/how-rails-saved-me-last-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons from Twitter: Displaying Content from other Sites on your Own</title>
		<link>http://www.patricktulskie.com/2008/07/lessons-from-twitter-displaying-content-from-other-sites-on-your-own/</link>
		<comments>http://www.patricktulskie.com/2008/07/lessons-from-twitter-displaying-content-from-other-sites-on-your-own/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 15:10:49 +0000</pubDate>
		<dc:creator>Patrick Tulskie</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.patricktulskie.com/?p=11</guid>
		<description><![CDATA[I decided to start writing a little series of articles based on the lessons I&#8217;ve learned in writing code the uses twitter, using twitter itself, and just generally getting the most out of it.  This is the first one, and maybe there will be more depending on how I like it.
The Problem &#8211; Why You [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to start writing a little series of articles based on the lessons I&#8217;ve learned in writing code the uses twitter, using twitter itself, and just generally getting the most out of it.  This is the first one, and maybe there will be more depending on how I like it.</p>
<p><strong>The Problem &#8211; Why You Should Care</strong></p>
<p>Other sites that you pull content from are not always going to be reliable.  They could be down, running slow, or some other possible problem.  If you are using something like twitter to display your status on your site but you have a lot of other content you want people to see then it would be wise to use client-side scripting to get the content.  You might be saying in your head &#8220;Oh but I have this sweet PHP script that does that for me.&#8221; but you should tell that voice in your head to shut up and just listen.</p>
<p><span id="more-11"></span></p>
<p><strong>The Solution&#8230;</strong></p>
<p>When you use server-side scripting then the server that is dishing out your website needs to go to the other (possibly) slow website.  If it&#8217;s waiting for this content then your user is waiting for your site to finish being generated server side and then sent to their browser.  This was a problem when twitter was doing its thing with the &#8220;fail whale&#8221; on a regular basis and was generally taking forever to display tweets.  This in turn was making my site very slow.  Realizing the problem, I took out the PHP widget that I had and replaced it with my own little creation that utilizes javascript and a tiny bit of PHP.</p>
<p><strong>Let&#8217;s take a look at how to do that&#8230;</strong></p>
<p>First thing you&#8217;re going to want to do is make a little div with some static text in it that gets killed when your stuff finishes loading.  You can make it kinda like this:</p>
<blockquote><p>&lt;div id=&#8221;twit_text&#8221;&gt;<br />
&lt;ul id=&#8221;twitter_update_list&#8221;&gt;&lt;li&gt;Waiting for Twitter.com to reply.  Please hold.&lt;/li&gt;&lt;/ul&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>The ul in there will be replaced by the script which actually sits right on twitter&#8217;s servers.  This is pretty simple and basic stuff.  It is advisable to put some static content in there so that users know that something else is going to happen and you don&#8217;t have a blank spot on the page.  There is one other piece of magic that actually uses a little bit of PHP but not for the same purpose the other scripts use it for&#8230;</p>
<blockquote><p>&lt;?<br />
$currURL = currPageURL();</p>
<p>if (($currURL == &#8220;http://www.patricktulskie.com/&#8221;) || ($currURL == &#8220;http://patricktulskie.com/&#8221;))<br />
{<br />
echo &#8220;&lt;script type=\&#8221;text/javascript\&#8221; src=\&#8221;http://twitter.com/javascripts/blogger.js\&#8221;&gt;&lt;/script&gt;&#8221;;<br />
echo &#8220;&lt;script type=\&#8221;text/javascript\&#8221; src=\&#8221;http://twitter.com/statuses/user_timeline/PatrickTulskie.json?callback=twitterCallback2&amp;count=1\&#8221;&gt;&lt;/script&gt;&#8221;;<br />
}<br />
?&gt;</p></blockquote>
<p>This goes in the footer of the page to only load the javascript if the page you&#8217;re looking at is the index page.  You can modify the PHP to load on different pages but for my purposes I only want you to see the status on the index.  You can&#8217;t easily do this with a plugin because plugins are loaded entirely as the page loads.  The PHP above is in the very footer of the page and it only kicks off the javascript IF we&#8217;re on the index of the site AND after everything else on the page has already loaded.</p>
<p><strong>One Other Thing&#8230;</strong></p>
<p>I use this function to get the URL of the page.  You can put it in your wordpress theme&#8217;s functions or you can put it wherever you need it on your site.  It&#8217;s fairly reusable too.</p>
<blockquote><p>function currPageURL()<br />
{<br />
$pageURL = &#8216;http&#8217;;<br />
if ($_SERVER["HTTPS"] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;}<br />
$pageURL .= &#8220;://&#8221;;<br />
if ($_SERVER["SERVER_PORT"] != &#8220;80&#8243;)<br />
{<br />
$pageURL .= $_SERVER["SERVER_NAME"].&#8221;:&#8221;.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];<br />
}<br />
else<br />
{<br />
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];<br />
}<br />
return $pageURL;<br />
}</p></blockquote>
<p><strong>I Hate Twitter</strong></p>
<p>Well thats fine.  I&#8217;m sure it doesn&#8217;t like you much either.  Regardless, this is a really basic usability concept that many people don&#8217;t seem to grasp or even think about when creating a website.  Say you want to pull news feeds from a Digg category using an RSS parser on your page.  You have other stuff on the page but this Digg box is in your sidebar.  If you don&#8217;t think about where the script is going to execute in relation to your page loading, then you&#8217;re going to have problems when Digg is running slow or is down.  For those of you who don&#8217;t want to get into a full blown ajax setup, or simply don&#8217;t know how to then this is a great work around that uses really minimal coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricktulskie.com/2008/07/lessons-from-twitter-displaying-content-from-other-sites-on-your-own/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

