<?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>dev.enekoalonso.com &#187; environment</title>
	<atom:link href="http://dev.enekoalonso.com/tag/environment/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.enekoalonso.com</link>
	<description>having fun with code</description>
	<lastBuildDate>Wed, 12 Oct 2011 21:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Adding specific code for production only</title>
		<link>http://dev.enekoalonso.com/2008/12/26/adding-specific-code-for-production-only/</link>
		<comments>http://dev.enekoalonso.com/2008/12/26/adding-specific-code-for-production-only/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 05:46:54 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=218</guid>
		<description><![CDATA[When you are developing a website you want to get as close as production as possible, to guarantee the final result will be appropriate and to make sure everything is going to work fine. But there are special cases when you want to add some code only on production, like stats code for example. One [...]]]></description>
			<content:encoded><![CDATA[<p>When you are developing a website you want to get as close as production as possible, to guarantee the final result will be appropriate and to make sure everything is going to work fine. But there are special cases when you want to add some code only on production, like stats code for example.</p>
<p>One easy way to do this is to check the server HTTP variables, the HTTP_HOST to be exact. This will contain your server host name, without the &#8220;http://&#8221; and the page URL. In my case, the value is &#8220;dev.enekoalonso.com&#8221;.</p>
<p>In PHP:</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re1">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#39;HTTP_HOST&#39;</span><span class="br0">&#93;</span> <span class="sy0">==</span> <span class="st0">&#39;dev.enekoalonso.com&#39;</span><span class="br0">&#41;</span><span class="sy0">:</span> <span class="kw2">?&gt;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>Google Analytics code here<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span> <span class="kw1">endif</span><span class="sy0">;</span> <span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
<p>That way I don&#8217;t mess up my stats while spending hours creating a demo in my development environment.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>November 29, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/29/setting-up-a-development-environment/" title="Setting up a development environment">Setting up a development environment</a> (0)</li><li>July 26, 2011 -- <a href="http://dev.enekoalonso.com/2011/07/26/my-sublime-text-2-settings/" title="My Sublime Text 2 settings">My Sublime Text 2 settings</a> (0)</li><li>June 3, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/03/step-back-and-watch-what-the-%e2%80%9cnormals%e2%80%9d-do/" title="Step back and watch what the “normals” do">Step back and watch what the “normals” do</a> (0)</li><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/26/adding-specific-code-for-production-only/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Grass demo: background sounds</title>
		<link>http://dev.enekoalonso.com/2008/12/23/grass-demo-background-sounds/</link>
		<comments>http://dev.enekoalonso.com/2008/12/23/grass-demo-background-sounds/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 07:07:01 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[ambience]]></category>
		<category><![CDATA[ambient]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[soundmanager2]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=178</guid>
		<description><![CDATA[Grass is an example of how to create an environment with multiple sounds playing in the background at random intervals. See the demo: http://dev.enekoalonso.com/research/grass.php Related Posts:December 26, 2008 -- Forest demo (was Grass) (0)April 10, 2009 -- Synchronizing sounds (or trying to&#8230;) (0)December 20, 2008 -- Particle Balls demo, now with sound! (3)October 5, 2010 [...]]]></description>
			<content:encoded><![CDATA[<p>Grass is an example of how to create an environment with multiple sounds playing in the background at random intervals.<br />
<a href="http://dev.enekoalonso.com/research/grass.php"><img src="http://dev.enekoalonso.com/wp-content/uploads/2008/12/picture-148-471x300.png" alt="Grass Demo" title="Grass Demo" width="471" height="300" class="aligncenter size-medium wp-image-181" /></a><br />
See the demo:<br />
<a href="http://dev.enekoalonso.com/research/grass.php">http://dev.enekoalonso.com/research/grass.php</a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>December 26, 2008 -- <a href="http://dev.enekoalonso.com/2008/12/26/forest-demo-was-grass/" title="Forest demo (was Grass)">Forest demo (was Grass)</a> (0)</li><li>April 10, 2009 -- <a href="http://dev.enekoalonso.com/2009/04/10/synchronizing-sounds-or-trying-to/" title="Synchronizing sounds (or trying to&#8230;)">Synchronizing sounds (or trying to&#8230;)</a> (0)</li><li>December 20, 2008 -- <a href="http://dev.enekoalonso.com/2008/12/20/particle-balls-demo-now-with-sound/" title="Particle Balls demo, now with sound!">Particle Balls demo, now with sound!</a> (3)</li><li>October 5, 2010 -- <a href="http://dev.enekoalonso.com/2010/10/05/javascript-console-in-the-terminal-command-line/" title="Javascript console in the terminal (command line)">Javascript console in the terminal (command line)</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/23/grass-demo-background-sounds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a development environment</title>
		<link>http://dev.enekoalonso.com/2008/11/29/setting-up-a-development-environment/</link>
		<comments>http://dev.enekoalonso.com/2008/11/29/setting-up-a-development-environment/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 19:54:00 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=61</guid>
		<description><![CDATA[I want to left behind the days when I was developing code without any version control system. I have been using these at work for years now, but never for my personal projects. So know I use/have two SVN repositories: enekoalonso.com/svn for my personal projects and tests. code.google.com/u/eneko.alonso/ for more complex projects in which other [...]]]></description>
			<content:encoded><![CDATA[<p>I want to left behind the days when I was developing code without any version control system. I have been using these at work for years now, but never for my personal projects. So know I use/have two SVN repositories:</p>
<ul>
<ol><a href="http://enekoalonso.com/svn">enekoalonso.com/svn</a> for my personal projects and tests.</ol>
<ol><a href="http://code.google.com/u/eneko.alonso/">code.google.com/u/eneko.alonso/</a> for more complex projects in which other people my want to participate.</ol>
</ul>
<p>But SVN doesn&#8217;t solve all problems, specially when working with Javascript and HTML. This is because I want to see my code in action. For this, I have <a href="http://code.enekoalonso.com">http://code.enekoalonso.com</a>. Until now I was uploading manually javascript and html demo pages that I was working on, but synchronizing it with the SVN repository became a pain very fast. So in order to avoid this, I have done a checkout of my SVN repository on my webserver. Now, whenever I update or add a new project to the repository, updating <a href="http://code.enekoalonso.com">http://code.enekoalonso.com</a> will be as simple as running the command:
<pre>svn update</pre>
<p> And that&#8217;s it! </p>
<p>Now I can develop and test locally on my own computer, then commit to svn and update my code server without any pain.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>February 7, 2010 -- <a href="http://dev.enekoalonso.com/2010/02/07/my-current-svn-setup/" title="My current SVN setup">My current SVN setup</a> (0)</li><li>January 26, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/26/loving-gitgithub/" title="Loving git+github">Loving git+github</a> (0)</li><li>December 26, 2008 -- <a href="http://dev.enekoalonso.com/2008/12/26/adding-specific-code-for-production-only/" title="Adding specific code for production only">Adding specific code for production only</a> (2)</li><li>July 26, 2011 -- <a href="http://dev.enekoalonso.com/2011/07/26/my-sublime-text-2-settings/" title="My Sublime Text 2 settings">My Sublime Text 2 settings</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/11/29/setting-up-a-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

