<?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>Adam Breckler &#187; Code</title>
	<atom:link href="http://www.adambreckler.com/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://www.adambreckler.com</link>
	<description>internet professional</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:15:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Software Estimations</title>
		<link>http://www.adambreckler.com/software-estimations</link>
		<comments>http://www.adambreckler.com/software-estimations#comments</comments>
		<pubDate>Tue, 31 Jan 2012 23:15:07 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=884</guid>
		<description><![CDATA[
Why are software development task estimations regularly off by a factor of 2-3?Edit
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quora.com/Engineering-Management/Why-are-software-development-task-estimations-regularly-off-by-a-factor-of-2-3/answer/Michael-Wolfe"><img src="http://www.adambreckler.com/wp-content/uploads/2012/01/main-qimg-e1efc747b646c726696d8b60a18d2888.png" alt="main-qimg-e1efc747b646c726696d8b60a18d2888" title="main-qimg-e1efc747b646c726696d8b60a18d2888" width="485" height="468" class="alignleft size-full wp-image-883" /></a></p>
<p><a href="http://www.quora.com/Engineering-Management/Why-are-software-development-task-estimations-regularly-off-by-a-factor-of-2-3/answer/Michael-Wolfe">Why are software development task estimations regularly off by a factor of 2-3?Edit</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/software-estimations/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove the Facebook Likebox Border</title>
		<link>http://www.adambreckler.com/how-to-remove-the-facebook-likebox-border</link>
		<comments>http://www.adambreckler.com/how-to-remove-the-facebook-likebox-border#comments</comments>
		<pubDate>Wed, 30 Jun 2010 16:19:35 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=807</guid>
		<description><![CDATA[Facebook provides a nifty little likebox widget that can be customized to display your facebook pages current fans (or likers), but the widget comes with an ugly blue border that cannot be overridden with css because it is in a [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook provides a nifty little <a href="http://developers.facebook.com/docs/reference/plugins/like-box">likebox widget</a> that can be customized to display your facebook pages current fans (or likers), but the widget comes with an ugly blue border that cannot be overridden with css because it is in a facebook iframe.</p>
<p><strong>The Solution:</strong> Wrap the likebox in an extra div (with a border color set to your pages background color, and position the wrapper to overlap the likebox). Code below.</p>
<h3>The HTML</h3>
<pre class="html">
<span class="htmlOtherTag">&lt;div id=<span class="htmlAttributeValue">&quot;likebox-frame&quot;</span>&gt;</span>
     <span class="htmlOtherTag">&lt;iframe src=<span class="htmlAttributeValue">&quot;http://www.facebook.com/plugins/likebox.php?id=XXXXXX<span class="htmlSpecialChar">&amp;amp;</span>width=900<span class="htmlSpecialChar">&amp;amp;</span>connections=16<span class="htmlSpecialChar">&amp;amp;</span>stream=false<span class="htmlSpecialChar">&amp;amp;</span>header=false<span class="htmlSpecialChar">&amp;amp;</span>height=190&quot;</span> scrolling=<span class="htmlAttributeValue">&quot;no&quot;</span> frameborder=<span class="htmlAttributeValue">&quot;0&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue">9;border:none <span class="cssImportant">!important</span></span><span class="cssRest">;</span> <span class="cssProperty">overflow</span><span class="cssRest">:</span><span class="cssValue">hidden</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">900px</span><span class="cssRest">;</span> <span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue">190px</span><span class="cssRest">;</span>&quot;</span> allowtransparency=<span class="htmlAttributeValue">&quot;false&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;/iframe&gt;</span>
    <span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<h3>The CSS</h3>
<pre class="cssl">
#likebox-frame{
 border:2px solid #F0F9F4;
 width:894px;
 z-index:10;
 height: 156px;
 overflow: hidden;
 position:relative;
 top:-1px;
 left:-2px;
}
#likebox-frame iframe{
  left:-5px;
  overflow:hidden;
  position:relative;
  top:-1px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/how-to-remove-the-facebook-likebox-border/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>How to camouflage wordpress</title>
		<link>http://www.adambreckler.com/how-to-camouflage-wordpress</link>
		<comments>http://www.adambreckler.com/how-to-camouflage-wordpress#comments</comments>
		<pubDate>Wed, 23 Jun 2010 01:34:40 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=782</guid>
		<description><![CDATA[
Sometimes you don&#8217;t want to broadcast to the world that your site is running on wordpress.  Here are some steps to take to remove some of the &#8220;traces&#8221; of wordpress in your code.
Step 1: Update .htaccess
To mask the paths [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.adambreckler.com/wp-content/uploads/2010/06/camo.jpg"><img src="http://www.adambreckler.com/wp-content/uploads/2010/06/camo.jpg" alt="camo" title="camo" width="495" height="440" class="alignleft size-full wp-image-788" /></a></p>
<p>Sometimes you don&#8217;t want to broadcast to the world that your site is running on wordpress.  Here are some steps to take to remove some of the &#8220;traces&#8221; of wordpress in your code.</p>
<h3>Step 1: Update .htaccess</h3>
<p>To mask the paths of your wp-content and theme directories in you will need to make some modifications to your .htaccess file.  Place the following code at the top of your .htaccess at the root of your site.</p>
<pre class="php">
# BEGIN REWRITES
<span class="phpOperator">&lt;</span>IfModule mod_rewrite.c<span class="phpOperator">&gt;</span>
RewriteEngine On
Options <span class="phpOperator">+</span>FollowSymlinks
RewriteBase /
RewriteRule ^images/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span>$ wp-content/themes/THEMNAME/images/$<span class="phpNumber">1</span> <span class="phpOperator">[</span>PT<span class="phpOperator">]</span>
RewriteRule ^css/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span>$ wp-content/themes/THEMNAME/css/$<span class="phpNumber">1</span> <span class="phpOperator">[</span>PT<span class="phpOperator">]</span>
RewriteRule ^js/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span>$ wp-content/themes/THEMNAME/js/$<span class="phpNumber">1</span> <span class="phpOperator">[</span>PT<span class="phpOperator">]</span>
RewriteRule ^uploads/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span>$ wp-content/uploads/$<span class="phpNumber">1</span> <span class="phpOperator">[</span>PT<span class="phpOperator">]</span>
RewriteRule ^plugins/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span>$ wp-content/plugins/$<span class="phpNumber">1</span> <span class="phpOperator">[</span>PT<span class="phpOperator">]</span>
<span class="phpOperator">&lt;</span>/IfModule<span class="phpOperator">&gt;</span>
# END REWRITES
</pre>
<p>In your wp-config.php, add the following line to customize your plugin directory url.</p>
<pre class="php">
<span class="phpFunction">define</span><span class="phpOperator">(</span> <span class="phpString">'WP_PLUGIN_URL'</span>, <span class="phpString">'http<span class="phpOperator">:</span><span class="phpComment">//www<span class="phpOperator">.</span>yoururlhere.com/plugins'</span> <span class="phpOperator">)</span><span class="phpText">;</span>
</span></pre>
<h3>Step 2: Modify functions.php</h3>
<p>Get rid of pesky meta-data that wordpress leaves in your header with the following actions added to your theme&#8217;s functions.php.</p>
<pre class="php">
  remove_action<span class="phpOperator">(</span><span class="phpString">'wp_head'</span>, <span class="phpString">'wp_generator'</span><span class="phpOperator">)</span><span class="phpText">;</span>
  remove_action<span class="phpOperator">(</span><span class="phpString">'wp_head'</span>, <span class="phpString">'wlwmanifest_link'</span><span class="phpOperator">)</span><span class="phpText">;</span>
  remove_action<span class="phpOperator">(</span><span class="phpString">'wp_head'</span>, <span class="phpString">'rsd_link'</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
<h3>Step 3: Remove html comments from plugins you use.</h3>
<p>Some wordpress plugins leave behind html comments such as &#8220;powered by such-and-such&#8221;.  It is generally assumed that you will leave in those comments as free advertising for the plugin author, but you are allowed to remove them if you like in almost every case.</p>
<h3>Step 4: Modify wp-admin path</h3>
<p>Add the following to your .htaccess file.  <a href="http://www.michiknows.com/2007/02/12/who-else-wants-to-hide-their-wordpress-admin-folder/">Fully documented here</a></p>
<pre class="php">
RewriteCond %<span class="phpOperator">{</span>REQUEST_URI<span class="phpOperator">}</span> wp-admin/
RewriteCond %<span class="phpOperator">{</span>QUERY_STRING<span class="phpOperator">}</span> <span class="phpOperator">!</span>YOURSECRETWORDHERE
RewriteRule <span class="phpOperator">.</span>*\<span class="phpOperator">.</span>php <span class="phpOperator">[</span>F,L<span class="phpOperator">]</span>
RewriteCond %<span class="phpOperator">{</span>QUERY_STRING<span class="phpOperator">}</span> <span class="phpOperator">!</span>YOURSECRETWORDHERE
RewriteRule ^ADMINFOLDER/<span class="phpOperator">(</span>.*<span class="phpOperator">)</span> wp-admin/$<span class="phpNumber">1</span><span class="phpOperator">?</span>%<span class="phpOperator">{</span>QUERY_STRING<span class="phpOperator">}</span>&#038;amp<span class="phpText">;</span>YOURSECRETWORDHERE <span class="phpOperator">[</span>L<span class="phpOperator">]</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/how-to-camouflage-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spicing up you&#8217;re wordpress RSS feed</title>
		<link>http://www.adambreckler.com/spicing-up-youre-wordpress-rss-feed</link>
		<comments>http://www.adambreckler.com/spicing-up-youre-wordpress-rss-feed#comments</comments>
		<pubDate>Fri, 19 Feb 2010 06:20:55 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=706</guid>
		<description><![CDATA[Here&#8217;s a nifty little function you can add to you&#8217;re theme&#8217;s functions.php
to append the post category link in you&#8217;re rss feed, but the same technique can be applied to add just about anything. This can be especially useful if some [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nifty little function you can add to you&#8217;re theme&#8217;s functions.php<br />
to append the post category link in you&#8217;re rss feed, but the same technique can be applied to add just about anything. This can be especially useful if some sites are scraping you&#8217;re content from you&#8217;re rss feed and you want to include a link back.  It utilizes the &#8216;the_excerpt_rss&#8217; and &#8216;the_content_rss&#8217; hooks depending on how you&#8217;re rss feed is configured.</p>
<pre class="php">
<span class="phpComment">//Add a feed link back to category level page
</span><span class="phpFunctionKeyword">function</span> feed_link<span class="phpOperator">(</span>$content<span class="phpOperator">)</span> <span class="phpOperator">{</span><span class="phpKeyword"> global </span>$post;
<span class="phpKeyword">
foreach<span class="phpOperator">(</span></span><span class="phpOperator">(</span>get_the_category<span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpKeyword"> as </span>$category<span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span>$category<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>category_parent <span class="phpOperator"><span class="phpOperator">=</span>=</span> <span class="phpNumber">0</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
$cat_name <span class="phpOperator">=</span> $category<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>name<span class="phpText">;</span>
$cat_ID <span class="phpOperator">=</span> $category<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>cat_ID<span class="phpText">;</span>
$link <span class="phpOperator">=</span> get_category_link<span class="phpOperator">(</span> $cat_ID <span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpKeyword">
break<span class="phpText">;</span></span>
<span class="phpOperator">}</span>
<span class="phpOperator">}</span>
$content <span class="phpOperator">=</span> $content.<span class="phpString">'<span class="phpOperator">&lt;</span>br /<span class="phpOperator">&gt;</span><span class="phpOperator">&lt;</span>a href=<span class="phpString">"'</span>.$link<span class="phpOperator">.</span><span class="phpString">'"</span><span class="phpOperator">&gt;</span>More '</span>.$cat_name.<span class="phpString">'  posts<span class="phpOperator">&lt;</span>/a<span class="phpOperator">&gt;</span>'</span><span class="phpText">;</span>
<span class="phpKeyword">
return </span>$content;
<span class="phpOperator">}</span>
add_filter<span class="phpOperator">(</span><span class="phpString">'the_excerpt_rss'</span>,<span class="phpString">'feed_link'</span><span class="phpOperator">)</span><span class="phpText">;</span>
add_filter<span class="phpOperator">(</span><span class="phpString">'the_content_rss'</span>,<span class="phpString">'feed_link'</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/spicing-up-youre-wordpress-rss-feed/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Direct Traffic Myth</title>
		<link>http://www.adambreckler.com/the-direct-traffic-myth</link>
		<comments>http://www.adambreckler.com/the-direct-traffic-myth#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:32:46 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[analytics]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=672</guid>
		<description><![CDATA[Have you ever wondered how exactly &#8220;direct&#8221; traffic is measured in Google Analytics? For the most part, this traffic comes from users directly navigating to your site through their browser toolbar or a bookmark.  As it turns out there [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered how exactly &#8220;direct&#8221; traffic is measured in Google Analytics? For the most part, this traffic comes from users directly navigating to your site through their browser toolbar or a bookmark.  As it turns out there could be other sources that are counted as direct traffic when they aren&#8217;t.  These include ppc,display or links from other sites that for some reason don&#8217;t pass a referrer.</p>
<p>You can paste the following code into you&#8217;re browser toolbar after clicking through an ad to you&#8217;re site to see if (any) referrer was passed.  If it&#8217;s empty than Google Analytics will count it towards direct traffic if you don&#8217;t pass any campaign tracking parameters.</p>
<pre class="javascript">
javascript:alert(document.referrer)
</pre>
<h3>How do I fix this?</h3>
<p>1. Realize that a chunk of the traffic that shows up in your &#8220;direct&#8221; bucket ~(10-15%) could be attributed to some other source e.g (ppc,display,link). This could be from click-through traffic or type-in traffic (where people see you&#8217;re ad and type in you&#8217;re url instead of clicking on it.)  The latter case is essentially free advertising and while hard to measure directly should be considered into the ROI calculation for advertising.  This is why it&#8217;s always important to display a url in you&#8217;re advertisement.</p>
<p>2. Always use tracking parameters in your urls when possible. <a href="http://www.google.com/support/googleanalytics/bin/answer.py?answer=55578&#038;hl=en">http://www.google.com/support/googleanalytics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/the-direct-traffic-myth/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speeding up Wordpress</title>
		<link>http://www.adambreckler.com/speeding-up-wordpress</link>
		<comments>http://www.adambreckler.com/speeding-up-wordpress#comments</comments>
		<pubDate>Tue, 24 Nov 2009 18:21:42 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=641</guid>
		<description><![CDATA[Once your wordpress blog starts getting traffic besides your mom and cousins you will likely have to start taking measures to reduce it&#8217;s cpu footprint.
Note: Some of these methods will work on a shared host without root access, but ssh [...]]]></description>
			<content:encoded><![CDATA[<p>Once your wordpress blog starts getting traffic besides your mom and cousins you will likely have to start taking measures to reduce it&#8217;s cpu footprint.</p>
<p>Note: Some of these methods will work on a shared host without root access, but ssh is required for some methods, like installing memcached.</p>
<h3>Step 1: Offload Images to Amazon S3</h3>
<p>Images generally make up a large percentage of the total page load (up to 50%, see below).  By using <a href="http://aws.amazon.com/s3/">Amazon S3</a> as a CDN, you can save on bandwidth costs with your host and speed up your page load times significantly.</p>
<p><img src="http://www.adambreckler.com/wp-content/uploads/2009/11/graphs.jpg" alt="graphs" title="graphs" width="600" height="162" class="alignleft size-full wp-image-642" /></p>
<p>Graph taken from the <a href="https://addons.mozilla.org/en-US/firefox/addon/5369">YSlow firefox plugin</a>, a great tool to help diagnose page load performance issues.</p>
<p>Costs for S3 are reasonable, but can add up if you are hosting large files.  Below is a report of costs for the first 10 hours of a blog that I run.  Most requests are for a single image (2k in size) loaded externally.</p>
<p><img src="http://www.adambreckler.com/wp-content/uploads/2009/11/aws.jpg" alt="aws" title="aws" width="600" height="228" class="alignleft size-full wp-image-644" /></p>
<p><a href="http://wordpress.org/extend/plugins/tantan-s3/">Tantan S3</a> is a great plugin for wordpress that links your Amazon S3 account to your wordpress blog.  You can configure it such that your media uploads are sent to your S3 &#8220;bucket&#8221; on upload.</p>
<p>Another useful tool is <a href="http://www.s3fox.net/">S3Fox</a>, a plugin for firefox that you can use to manage and sync files in your S3 account through your browser.  You will need your S3 security credentials to set it up.</p>
<p><span id="more-641"></span></p>
<h3>Step 2: Apache Tuning</h3>
<p>Edit your .htaccess file to <a href="http://www.tipsandtricks-hq.com/how-to-add-far-future-expires-headers-to-your-wordpress-site-1533">set expire headers</a> on static files</p>
<pre class="xml">
#Expire Header
<span class="xmlTag">&lt;FilesMatch <span class="xmlString">&quot;\.(ico|jpg|jpeg|png|gif|js|css|swf)$&quot;</span>&gt;</span><span class="xmlText">
ExpiresDefault <span class="xmlString">&quot;access plus<span class="xmlNumber"> 2 </span>hours&quot;</span>
FileETag none
</span><span class="xmlTag">&lt;/FilesMatch&gt;</span>
</pre>
<h3>Step 3: Configure some kind of caching</h3>
<p>For many smaller wordpress blogs <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> and other <a href="http://kb.mediatemple.net/questions/258/%28dv%29+HOWTO:+Basic+MySQL+performance+tuning+%28MySQLd%29">MySQL performance tuning</a> measures will suffice, but if you still aren&#8217;t seeing much improvement, you may want to consider a more heavy duty option.</p>
<p><img src="http://www.adambreckler.com/wp-content/uploads/2009/11/memchached.jpg" alt="memchached" title="memchached" width="600" height="83" class="alignleft size-full wp-image-654" /></p>
<p><a href="http://kb.mediatemple.net/questions/1693/Installing+memcached">Installing Memcached</a> on a MediaTemple DV (3.5) (requires root access)</p>
<p>In conjunction with <a href="http://wordpress.org/extend/plugins/batcache/">Batcache Manager</a>, you should see a real boost in performance.</p>
<h3>Step 4: Sit back, relax and enjoy your speedy new blog</h3>
<p>Further Reading:</p>
<ul>
<li><a href="http://www.inquisitr.com/39348/using-amazon-s3-for-image-hosting-with-a-wordpress-blog/">Using Amazon S3 for image hosting with a WordPress blog</a></li>
<li><a href="http://www.arnebrachhold.de/2007/02/16/four-plus-one-ways-to-speed-up-the-performance-of-wordpress-with-caching/">4+1 Ways To Speed Up WordPress With Caching</a></li>
<li><a href="http://codex.wordpress.org/High_Traffic_Tips_For_WordPress">High Traffic Tips For WordPress</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/speeding-up-wordpress/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hadoop, Pig, and Twitter</title>
		<link>http://www.adambreckler.com/hadoop-pig-and-twitter</link>
		<comments>http://www.adambreckler.com/hadoop-pig-and-twitter#comments</comments>
		<pubDate>Sat, 31 Oct 2009 17:37:56 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=619</guid>
		<description><![CDATA[Hadoop, Pig, and Twitter (NoSQL East 2009)
View more presentations from kevinweil.

]]></description>
			<content:encoded><![CDATA[<div style="width:425px;text-align:left" id="__ss_2385165"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/kevinweil/hadoop-pig-and-twitter-nosql-east-2009" title="Hadoop, Pig, and Twitter (NoSQL East 2009)">Hadoop, Pig, and Twitter (NoSQL East 2009)</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pig-nosqleast2009-091030114824-phpapp02&#038;stripped_title=hadoop-pig-and-twitter-nosql-east-2009" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=pig-nosqleast2009-091030114824-phpapp02&#038;stripped_title=hadoop-pig-and-twitter-nosql-east-2009" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/kevinweil">kevinweil</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/hadoop-pig-and-twitter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Setting up Wordpress to communicate with Flash via XML</title>
		<link>http://www.adambreckler.com/tutorial-setting-up-wordpress-to-communicate-with-flash-via-xml</link>
		<comments>http://www.adambreckler.com/tutorial-setting-up-wordpress-to-communicate-with-flash-via-xml#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:36:23 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=572</guid>
		<description><![CDATA[This following bit of code should get you up and running with a simple way of sharing data from your wordpress blog with a flash object.  Creating the XML file is a bit of a hastle, since you can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>This following bit of code should get you up and running with a simple way of sharing data from your wordpress blog with a flash object.  Creating the XML file is a bit of a hastle, since you can&#8217;t output XML directly from a wordpress template file to flash.  Instead you have to use php&#8217;s fopen function to save your xml file to be accessed separately through your flash object. </p>
<h3>The PHP</h3>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span> 
<span class="phpComment">// set headers
</span><span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">'Content-Type<span class="phpOperator">:</span> text/xml'</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">'Cache-Control<span class="phpOperator">:</span> no-store'</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">// get database results to output xml
</span>$query <span class="phpOperator">=</span> <span class="phpString">"SELECT content FROM wp_table ORDER BY id DESC LIMIT 10"</span><span class="phpText">;</span>
$terms <span class="phpOperator">=</span> $wpdb<span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">get_results</span><span class="phpOperator">(</span>$query, OBJECT<span class="phpOperator">)</span><span class="phpText">;</span> 
$xml <span class="phpOperator">.=</span> <span class="phpString">"<span class="phpOperator">&lt;</span><span class="phpOperator">?</span><span class="htmlText">xml version</span><span class="phpOperator">=</span>\"</span><span class="phpNumber">1</span><span class="phpOperator">.</span><span class="phpNumber">0</span>\<span class="phpString">" encoding<span class="phpOperator">=</span>\"</span>UTF-<span class="phpNumber">8</span>\&quot;<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>\n&quot;;
$xml .= &quot;<span class="htmlOtherTag">&lt;data&gt;</span>Your Data Goes Here<span class="htmlOtherTag">&lt;/data&gt;</span>&quot;;
// save your xml file in your theme directory
$path = &#039;wp-content/themes/themename/output.xml&#039;;
$file= fopen(&quot;$path&quot;, &quot;w&quot;);
fwrite($file, $xml);
fclose($file);
?&gt;
</pre>
<h3>The HTML &amp; Javascript</h3>
<pre class="html">
<span class="htmlOtherTag">&lt;div align=<span class="htmlAttributeValue">&quot;top&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">margin-left</span><span class="cssRest">:</span><span class="cssValue">-10px</span><span class="cssRest">;</span>&quot;</span>id=<span class="htmlAttributeValue">&quot;flashcontent&quot;</span>&gt;</span>
 <span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;http://www.adobe.com/shockwave/download/triggerpages_mmcom/flash.html&quot;</span>&gt;</span><span class="htmlImageTag">&lt;img src=<span class="htmlAttributeValue">&quot;noFlash.jpg&quot;</span> width=<span class="htmlAttributeValue">&quot;600&quot;</span> height=<span class="htmlAttributeValue">&quot;270&quot;</span> border=<span class="htmlAttributeValue">&quot;0&quot;</span> alt=<span class="htmlAttributeValue">&quot;Flash Not Detected&quot;</span> /&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span>
<span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span>
 // <span class="htmlOtherTag">&lt;![CDATA[
 var so = new SWFObject(&#039;&lt;?php bloginfo ( &#039;template_directory&#039; );?&gt;</span>/flashobject.swf&#039;, &#039;website&#039;, &#039;600&#039;, &#039;270&#039;, &#039;9&#039;);
 so.useExpressInstall(&#039;<span class="htmlOtherTag">&lt;?php bloginfo ( &#039;template_directory&#039; );?&gt;</span>/expressinstall.swf&#039;);
 so.addParam(&#039;menu&#039;, &#039;false&#039;);
 so.addParam(&#039;wmode&#039;, &#039;transparent&#039;);
 so.addVariable(&quot;xmlVar&quot;, &#039;<span class="htmlOtherTag">&lt;?php bloginfo ( &#039;template_directory&#039; );?&gt;</span>/output.xml&#039;);
 so.write(&#039;flashcontent&#039;);
 // ]]&gt;
<span class="htmlScriptTag">&lt;/script&gt;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/tutorial-setting-up-wordpress-to-communicate-with-flash-via-xml/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting Up Facebook Connect for Wordpress</title>
		<link>http://www.adambreckler.com/setting-up-facebook-connect-for-wordpress</link>
		<comments>http://www.adambreckler.com/setting-up-facebook-connect-for-wordpress#comments</comments>
		<pubDate>Mon, 23 Feb 2009 05:37:07 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=129</guid>
		<description><![CDATA[These steps are needed to prepare your wordpress blog for facebook connect integration using the WP-FBConnect Plugin.  The plugin is documented here and you can download it here.  The implementation is pretty simple, but there are some caveats [...]]]></description>
			<content:encoded><![CDATA[<p>These steps are needed to prepare your wordpress blog for facebook connect integration using the <a href="http://wiki.developers.facebook.com/index.php/WP-FBConnect">WP-FBConnect Plugin</a>.  The plugin is <a href="http://wiki.developers.facebook.com/index.php/WP-FBConnect">documented here</a> and you can <a href="http://wordpress.org/extend/plugins/wp-facebookconnect/">download it here</a>.  The implementation is pretty simple, but there are some caveats as follows.</p>
<h3>Step 1:</h3>
<p>Add the language attributes wp function to your header(s).  The plugin will add the following lanuage attribute for you &#8220;xmlns:fb=&#8221;http://www.facebook.com/2008/fbml&#8221;.</p>
<pre class="php">
<span class="htmlOtherTag">&lt;html xmlns=<span class="htmlAttributeValue">&quot;http://www.w3.org/1999/xhtml&quot;</span>
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span><span class="htmlText"> language_attributes</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span></span>&gt; 
</pre>
<p><span id="more-129"></span></p>
<h3>Step 2:</h3>
<p>Call wp_head in your header(s)</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span><span class="htmlText"> wp_head</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>Step 3:</h3>
<p>Call wp_footer in your footer.php</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span><span class="htmlText"> wp_footer</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>Step 4:</h3>
<p>Call the login function from your comments.php. Use the &#8216;do_action&#8217; hook so that if you disable the plugin, it is not called.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span><span class="htmlText"> do_action</span><span class="phpOperator">(</span><span class="phpString">'fbc_display_login_button'</span><span class="phpOperator">)</span>  <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>Step 5 (optional):</h3>
<p>Call the following code in your comments.php if it doesn&#8217;t already exist.  It will display the facebook commenter&rsquo;s profile pic or an empty gravatar/avatar if left by a regular user, &#8216;32&#8242; is the size of the avatar you would like to display.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span> <span class="phpFunction">echo</span><span class="htmlText"> get_avatar</span><span class="phpOperator">(</span> $comment, 32 <span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>Step 6 (optional):</h3>
<p>Call this function if you are using WP-Supercache or another caching plugin.  You need to make sure that the &#8220;YOURAPIKEY_user&#8221; cookie isn&#8217;t cached.  Replace YOURAPIKEY with your unique developer api key.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpFunctionKeyword">function</span><span class="htmlText"> fbc_supercache</span><span class="phpOperator">(</span>$cachestr<span class="phpOperator">)</span><span class="phpOperator">{</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">"YOURAPIKEY_user"</span><span class="phpOperator">]</span><span class="phpOperator">)</span> <span class="phpOperator">)</span>
$cachestr <span class="phpOperator">.=</span> <span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">"YOURAPIKEY_user"</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpKeyword">
return </span>$cachestr<span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="htmlText">
add_cacheaction</span><span class="phpOperator">(</span><span class="phpString">'wp_cache_get_cookies_values'</span>, <span class="phpString">'fbc_supercache'</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>Step 7 (optional):</h3>
<p>Some versions of wordpress will need a bit of a hack to fbconnect.js. Change the following on line 93.</p>
<pre class="javascript">
if (comment_text.trim().length === 0) {
</pre>
<p>to: </p>
<pre class="javascript">
if (comment_text.length === 0) {
</pre>
<p>Note:I am not the developer of this plugin.  Full credit goes to <a href="http://hupp.org/adam/">Adam Hupp</a> for creating it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/setting-up-facebook-connect-for-wordpress/feed</wfw:commentRss>
		<slash:comments>335</slash:comments>
		</item>
		<item>
		<title>Mobile &#8216;Apps&#8217; with HTML, CSS &amp; Javascript</title>
		<link>http://www.adambreckler.com/iphone-app-building-resources</link>
		<comments>http://www.adambreckler.com/iphone-app-building-resources#comments</comments>
		<pubDate>Wed, 21 Jan 2009 06:21:06 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.adambreckler.com/?p=72</guid>
		<description><![CDATA[I stumbled across this article that has some good tips for developing rich web based mobile apps for the iPhone and other devices using just html,css and javascript. These tools look like they could be pretty useful if you want to 'mobilize' the content of your existing website but don't want to go through the hastle of developing a new app for each new platform.]]></description>
			<content:encoded><![CDATA[<p>I stumbled across <a href="http://www.infoworld.com/article/09/01/20/03TC-phone-web_1.html">this article</a> that has some good tips for developing rich web based mobile apps for the iPhone and other devices using just html,css and javascript.  These tools look like they could be pretty useful if you want to &#8216;mobilize&#8217; the content of your existing website but don&#8217;t want to go through the hastle of developing a new app for each new platform in C or Java.</p>
<h3>What is PhoneGap?</h3>
<p><a href="http://phonegap.com/">PhoneGap</a> is a development tool that allows web developers to take advantage of the core features in the iPhone, Android, and Blackberry SDK using JavaScript.</p>
<h3>iui</h3>
<p>Based on <a rel="nofollow" href="http://joehewitt.com/">Joe Hewitt</a>&#8217;s iPhone navigation work, <a href="http://code.google.com/p/iui/">iui</a> has the following features:</p>
<p>* Create Navigational Menus and iPhone interfaces from standard HTML</p>
<p>* Use or knowledge of JavaScript is not required to create basic iPhone pages</p>
<p>* Ability to handle phone orientation changes</p>
<p>* Provide a more &#8220;iPhone-like&#8221; experience to Web apps (on or off the iPhone)</p>
<p>While the &#8216;apps&#8217; that you craft with these tools won&#8217;t be quite as fully featured as those that are native to the phone&#8217;s OS&#8230;they are certainly a great time saver and are relatively simple to update and maintain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adambreckler.com/iphone-app-building-resources/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

