<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.nexoblogs.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<!-- Generado by OboLog XML-O-Matic Script -->
<channel>
	<title><![CDATA[Harecoded]]></title>
	<link>http://www.harecoded.com/</link>
	<description><![CDATA[Harecoded is a blog by and for developers. We are essentially web developers born before the Internets and we use this blog as a notebook to write generalistic recipes, tricks and maybe some...]]></description>
	<language>en-us</language>
	<pubDate>Sun, 19 May 2013 12:03:15 +0100</pubDate>
	<lastBuildDate>Sun, 19 May 2013 12:03:15 +0100</lastBuildDate>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<generator>OboLog XML-O-Matic Script</generator>
	<managingEditor>webmaster@obolog.com</managingEditor>
	<webMaster>webmaster@obolog.com</webMaster>
	<image>
		<url>http://s.obolog.net/img/obolog-blog-gratis.png</url>
		<title><![CDATA[Harecoded]]></title>
		<link>http://www.harecoded.com/</link>
	</image>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.nexoblogs.com/harecoded" /><feedburner:info uri="harecoded" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>harecoded</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title><![CDATA[Migrate Posterous without losing the images]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/l17BkuzC5yU/migrate-posterous-without-losing-the-images-2264987</link>
		<description>&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/516c/516c5e58b5568s91056.jpg"&gt;&lt;img class="fotobonita"
  title="Painting: Death of Cleopatra" src=
  "http://stc.obolog.net/photos/516c/516c5e58b5568s91056_t.jpg"
  alt=" TAGS:" align="left"&gt;&lt;/a&gt;It might seem very obvious to you
  that if you &lt;strong&gt;migrate from Posterous&amp;nbsp;blogs to another
  service&lt;/strong&gt; your &lt;strong&gt;images should be
  transitioned&lt;/strong&gt; as well.
&lt;/p&gt;
&lt;p&gt;
  If you want a &lt;strong&gt;free service&lt;/strong&gt; (as Posterous was)
  there are only two options where you can migrate your Posterous
  to without writing all your posts one by one&amp;nbsp;again:
&lt;/p&gt;
&lt;p&gt;
  1)&amp;nbsp;&lt;a href="http://wordpress.com"&gt;Wordpress.com&lt;/a&gt; (but
  &lt;strong&gt;losing all the images&lt;/strong&gt;)&lt;br&gt;
  2)&amp;nbsp;&lt;a href="/posterous.obolog.com?hl=en"&gt;Obolog.com&lt;/a&gt; (and
  &lt;strong&gt;keeping all the images&lt;/strong&gt;)
&lt;/p&gt;
&lt;p&gt;
  So, if you want your blog back including images the only option
  you have is Obolog. There are no other free services in the net
  (or at least I didn't find other) where you can bring back to
  life your Posterous blog. If you have already migrated to
  wordpress go and see where your images are pointing to. You'll be
  disappointed because all the posts reference posterous server,
  and they will be shut down in a few days.
&lt;/p&gt;
&lt;p&gt;
  If you still wonder what Obolog is, you are just reading one
  right now. Harecoded is powered by Obolog and it has been running
  smoothly for several years so far.
&lt;/p&gt;
&lt;p&gt;
  If you want to try it all you have to do is to upload your ZIP
  backup file into the &lt;strong&gt;&lt;a href=
  "http://posterous.obolog.com?hl=en"&gt;Posterous migration
  script&lt;/a&gt;&lt;/strong&gt;. But remember, on April 30th if you don't
  have the ZIP everything will be gone for good.
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/migrate-posterous-without-losing-the-images-2264987" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/l17BkuzC5yU" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[obolog]]></category>
		<category><![CDATA[posterous]]></category>
		<comments>http://www.harecoded.com/migrate-posterous-without-losing-the-images-2264987#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/migrate-posterous-without-losing-the-images-2264987</guid>
		<pubDate>Mon, 15 Apr 2013 20:54:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/migrate-posterous-without-losing-the-images-2264987</feedburner:origLink></item>
	<item>
		<title><![CDATA[Best web-based alternatives to Google Reader]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/VJg8aP7x__0/best-web-based-alternatives-to-google-reader-2257200</link>
		<description>&lt;p&gt;
  If you are a Google Reader reader you have certainly seen the
  message that is going to disappear by July 1st 2013. If you read
  from mobile then plenty of cool apps like Flipboard you can use,
  but when it comes to a web-based interface these are the
  alternatives I found worth using.
&lt;/p&gt;
&lt;p&gt;
  The first thing you should do before it is too late is to
  &lt;strong&gt;&lt;a href=
  "https://www.google.com/takeout/#custom:reader"&gt;download a copy
  of your Google Reader feeds using Takeout&lt;/a&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  Then take your time to pick another service, there are plenty.
&lt;/p&gt;
&lt;h2&gt;
  Prismatic
&lt;/h2&gt;
&lt;p&gt;
  If you log in using your Google account then &lt;strong style=
  "font-size: 0.9em;"&gt;there is nothing you have to import&lt;/strong&gt;.
  All your feeds will be there in a fashion way with big images and
  a nice presentation. I like it way more than Google Reader, but
  if you have hundreds of places you are subscribed to maybe you'd
  prefer something that does not display all the images and shows
  as a list instead. It looks more like a new sites than a RSS
  reader, but it is pretty cool.
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/514196319a92cs267749.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="Prismatic homepage" src=
  "http://stc.obolog.net/photos/5141/514196319a92cs267749_p.jpg"
  alt=" - "&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/5141961f72c4cs214115.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="Subscription list" src=
  "http://stc.obolog.net/photos/5141/5141961f72c4cs214115_p.jpg"
  alt=" - "&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Find it here: &lt;a href=
  "http://getprismatic.com/"&gt;http://getprismatic.com/&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;
  The Old Reader
&lt;/h2&gt;
&lt;p&gt;
  Subscriptions are presented quite similar to Google Reader. You
  need to &lt;a href=
  "https://www.google.com/takeout/#custom:reader"&gt;&lt;strong&gt;download
  your Google subscriptions&lt;/strong&gt;&lt;/a&gt; if you want to import them
  here. But it seems that right now, the site is under a lot of
  load:&lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/51419f2373b9es46547.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5141/51419f2373b9es46547_p.jpg"
  alt=" - "&gt;&lt;/a&gt;&lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/51419f2373b9es46547.jpg"&gt;&lt;br&gt;&lt;/a&gt;This
  is how it looks like:
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/51419f1886095s79402.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5141/51419f1886095s79402_p.jpg"
  alt=" - "&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://theoldreader.com/"&gt;http://theoldreader.com/&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;
  Feedly
&lt;/h2&gt;
&lt;p&gt;
  Finally &lt;a href="http://www.feedly.com/"&gt;Feedly&lt;/a&gt; seems to be
  the on of the most commented in the Twitter timeline so far, and
  looks very nice too. They claim that &lt;a href=
  "http://blog.feedly.com/2013/03/14/google-reader/"&gt;the transition
  will be transparent&lt;/a&gt; for the users if you connect to Google
  Reader with a project they are working on called Normandy. What I
  like the most is that you can select how you want to display the
  information, a list, a mosaic, anything :)
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/5141a0f82fce1s87414.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="Feedly looks. Image taken from feedly website" src=
  "http://stc.obolog.net/photos/5141/5141a0f82fce1s87414_p.jpg"
  alt=" - "&gt;&lt;/a&gt;&lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5141/5141a36e54d0es94597.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="Feedly looks" src=
  "http://stc.obolog.net/photos/5141/5141a36e54d0es94597_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="http://www.feedly.com/"&gt;http://www.feedly.com/&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;
  Other alternatives to Google Reader
&lt;/h3&gt;
&lt;p&gt;
  An article I found very interesting on this very same topic
  covering 12 alternatives to Google Reader is on &lt;a href=
  "http://marketingland.com/12-google-reader-alternatives-36158"&gt;Marketing
  Land&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Let us know your choice!
&lt;/p&gt;
			&lt;p&gt;
							&lt;a href="http://www.harecoded.com/fotos-articulo_best-web-based-alternatives-to-google-reader-2257200" title="Pictures of Best web-based alternatives to Google Reader"&gt;View image gallery&lt;/a&gt; |
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/best-web-based-alternatives-to-google-reader-2257200" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/VJg8aP7x__0" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[google]]></category>
		<category><![CDATA[reader]]></category>
		<category><![CDATA[web apps]]></category>
		<comments>http://www.harecoded.com/best-web-based-alternatives-to-google-reader-2257200#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/best-web-based-alternatives-to-google-reader-2257200</guid>
		<pubDate>Thu, 14 Mar 2013 10:09:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/best-web-based-alternatives-to-google-reader-2257200</feedburner:origLink></item>
	<item>
		<title><![CDATA[Configure Compass,Sass,Less... in PHPStorm]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/F65a_DEGY1k/configure-compasssassless-in-phpstorm-2257005</link>
		<description>&lt;p&gt;
  &lt;img title=
  "Image taken from http://blog.jetbrains.com/webide/2013/03/phpstorm-6-0-released-composer-code-rearranger-new-refactorings-rest-client-darcula-more/"
  src="http://stc.obolog.net/photos/5140/51409f5b7d173s23721.jpg"
  alt=" - " align="left"&gt;
&lt;/p&gt;
&lt;p&gt;
  PHPStorm 6 bundles a &lt;a href=
  "http://blog.jetbrains.com/webide/2013/03/phpstorm-6-0-released-composer-code-rearranger-new-refactorings-rest-client-darcula-more/"&gt;
  new feature&lt;/a&gt; called "File watchers" which enables
  &lt;strong&gt;Sass, LESS, SCSS, CoffeeScript, TypeScript
  transpilation.&lt;/strong&gt; This option will compile your
  compass/scss/whatever files when the source file is saved (this
  is when you lose the focus or manually save).
&lt;/p&gt;
&lt;p&gt;
  So, for the basic stuff you can stop using external programs and
  watchers like&lt;a href="http://incident57.com/codekit/"&gt;CodeKit&lt;/a&gt;
  or &lt;a href="http://incident57.com/less/"&gt;LESS.app&lt;/a&gt;&amp;nbsp;now.
  But of course unexpensive software like CodeKit is a must have if
  you are a frontend developer.
&lt;/p&gt;
&lt;p&gt;
  Our frontend guy decided to use &lt;a href=
  "http://compass-style.org/"&gt;Compass&lt;/a&gt;&amp;nbsp;using SCSS source
  files so, the following example illustrates how to
  &lt;strong&gt;configure Compass in PHPStorm under Mac OS X&lt;/strong&gt;,
  but this is something reusable for the rest of the languages
  supported by watchers. The procedure is basically the same for
  the others.
&lt;/p&gt;
&lt;p&gt;
  First of all, you have to install Compass. To do so open the
  Terminal and type:
&lt;/p&gt;
&lt;pre&gt;
sudo gem install compass
&lt;/pre&gt;
&lt;p&gt;
  Then go to PHPStorm and open any of the SCSS files in your
  project and you'll see after a second or two a message inviting
  you to use File watchers. This is going to add under
  &lt;code&gt;Preferences -&amp;gt; File Watchers&lt;/code&gt; a new entry that you
  can edit as follows:
&lt;/p&gt;
&lt;p&gt;
  Program:&amp;nbsp;&lt;code&gt;/usr/bin/compass&lt;/code&gt;&lt;br&gt;
  Arguments (If you compile files one by one):&amp;nbsp;&lt;code&gt;compile
  &amp;nbsp;$FilePath$&lt;/code&gt;&lt;br&gt;
  Arguments: (If you have SCSS in groups with ruby
  configurations):&lt;br&gt;
  &lt;code&gt;compile &amp;nbsp;$ProjectFileDir$/relative/path/to/css/&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5140/5140a3fb46db9s146105.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="PHPStorm file watchers settings" src=
  "http://stc.obolog.net/photos/5140/5140a3fb46db9s146105_p.jpg"
  alt=" - "&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Now save the settings and every time you save one of these files
  you'll have the compiled SCSS file. Of course you can pass all
  the parameters you want in the section arguments to fit your
  needs.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  Ah, and this black theme is the Darcula theme that comes now
  bundled with the version 6.
&lt;/p&gt;
			&lt;p&gt;
							&lt;a href="http://www.harecoded.com/fotos-articulo_configure-compasssassless-in-phpstorm-2257005" title="Pictures of Configure Compass,Sass,Less... in PHPStorm"&gt;View image gallery&lt;/a&gt; |
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/configure-compasssassless-in-phpstorm-2257005" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/F65a_DEGY1k" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[phpstorm]]></category>
		<comments>http://www.harecoded.com/configure-compasssassless-in-phpstorm-2257005#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/configure-compasssassless-in-phpstorm-2257005</guid>
		<pubDate>Wed, 13 Mar 2013 16:33:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/configure-compasssassless-in-phpstorm-2257005</feedburner:origLink></item>
	<item>
		<title><![CDATA[Features in PHP 5.4]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/ZSoRR06fFnw/features-in-php-54-2255484</link>
		<description>&lt;p&gt;
  &lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=
  "Source: National Geographic website" src=
  "http://stc.obolog.net/photos/5138/513882d7d9596s55348_p.jpg"
  alt=" - "&gt;
&lt;/p&gt;
&lt;p&gt;
  We had to create a file upload form that allows a user to upload
  big files. In order to keep a good experience for the user we
  decided to show the progress bars.
&lt;/p&gt;
&lt;p&gt;
  There are several ways of doing that but it came to my mind that
  &lt;strong&gt;PHP 5.4&lt;/strong&gt; had an improvement on file upload,
  making it easier now and wondered if I had the last excuse to
  upgrade the servers from 5.3 to 5.4.
&lt;/p&gt;
&lt;p&gt;
  This is a list of some of the features PHP 5.4 comes with. There
  are more, but I came here with the intention of speaking about
  the ones that they care to me. This is not a 5.4 review, but
  &lt;strong&gt;examples&lt;/strong&gt;.
&lt;/p&gt;
&lt;h3&gt;
  Session upload progress
&lt;/h3&gt;
&lt;p&gt;
  I already mentioned it, PHP 5.4 will be handy because now you can
  ask the server in realtime how the &lt;a href=
  "http://www.php.net/manual/en/session.upload-progress.php"&gt;upload
  progress&lt;/a&gt;&amp;nbsp;is going. Mixed with HTML5 you can have a
  kicking-ass upload form.
&lt;/p&gt;
&lt;h3&gt;
  Speed
&lt;/h3&gt;
&lt;p&gt;
  It seems that PHP 5.4 is faster than its ancestry, and I say that
  it seems because even there are plenty of sites claiming that I
  still have not run any benchmarks with my app.
&lt;/p&gt;
&lt;h3&gt;
  Traits
&lt;/h3&gt;
&lt;p&gt;
  Kids deserve &amp;nbsp;a candy sometime. We have regret many times
  using PHP because unlike other languages there has never been
  multiple inheritance. Now PHP gives us a sugar-free candy to
  mitigate this. Traits are not the multiple inheritane but might
  help you out sharing common functionallity between classes. And
  traits can use traits. This is an example of how a simple trait
  would work:
&lt;/p&gt;
&lt;pre&gt;
&amp;lt;?php
namespace Mammal\Primate;

trait Feeding
{
        public function getDiet( $age )
        {
                if ( $age &amp;lt; 3 )
                {
                        return [ 'breastfed' ];
                }
                else
                {
                        return [ 'fruit', 'leaves', 'flowers', 'buds', 'nectar', 'seeds', 'insects', 'bird eggs' ];
                }               
        }
}
&lt;/pre&gt;
&lt;p&gt;
  Then your trait can be attached to any class like this, no matter
  if your class already extends something else:
&lt;/p&gt;
&lt;pre&gt;
class Gorilla extends VertebrateKingdom implements Animalia
{
        use \Mammal\Primate\Feeding;
        // ...
}
&lt;/pre&gt;
&lt;p&gt;
  Now you can use the trait methods directly:
&lt;/p&gt;
&lt;pre&gt;
$gorilla = new Gorilla();
$gorilla-&amp;gt;getDiet( 5 );
&lt;/pre&gt;
&lt;h3&gt;
  Python-alike stuff: lists and anonymous functions
&lt;/h3&gt;
&lt;p&gt;
  Being a former pythonist I'm glad to have these two back in town:
&lt;/p&gt;
&lt;h3&gt;
  Anonymous functions
&lt;/h3&gt;
&lt;p&gt;
  Create functions on the fly:&amp;nbsp;
&lt;/p&gt;
&lt;pre&gt;
$dump = function( $var ) { var_dump( $var ) ; };
$dump( $gorilla-&amp;gt;getDiet( 5 ) ); // Array containing 'fruit', 'leaves'...
&lt;/pre&gt;
&lt;h3&gt;
  Short array syntax
&lt;/h3&gt;
&lt;p&gt;
  This is the same format than &lt;strong&gt;python lists&lt;/strong&gt;, and
  the ability to get rid of temporary variables:
&lt;/p&gt;
&lt;pre&gt;
// Before: PHP &amp;lt; 5.3:

function getMammals()
{
        return array( 'monkey', 'zebra', 'dolphin', 'cat', 'John' );
}

$mammals = getMammals();
echo $mammals[0];

// Now: PHP 5.4+
function getMammals()
{
        $mammals = [ 'monkey', 'zebra', 'dolphin', 'cat', 'John' ];
}

echo getMammals()[0]; // Look that you don't need the temp variable anymore
&lt;/pre&gt;
&lt;h3&gt;
  Webserver
&lt;/h3&gt;
&lt;p&gt;
  Finally, now you can run a debugging server without the need
  apache:
&lt;/p&gt;
&lt;pre&gt;
 php -S localhost:8080 -t /var/www/tests 
&lt;/pre&gt;
&lt;p&gt;
  Not very useful in my case scenario where I have a full virtual
  environment with puppet and so on, but maybe for running
  temporary scripts might be useful. With earlier versions remind
  that you can always execute inline PHP from command line like
  this:
&lt;/p&gt;
&lt;p&gt;
  &lt;code&gt;php -r "phpinfo();"&lt;/code&gt;
&lt;/p&gt;
&lt;h3&gt;
  Yeah!!!
&lt;/h3&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/features-in-php-54-2255484" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/ZSoRR06fFnw" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<comments>http://www.harecoded.com/features-in-php-54-2255484#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/features-in-php-54-2255484</guid>
		<pubDate>Thu, 07 Mar 2013 12:19:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/features-in-php-54-2255484</feedburner:origLink></item>
	<item>
		<title><![CDATA[Mails perdidos en Gmail por redireccionamiento [Solucionado]]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/EhJnIktooR0/mails-perdidos-gmail-redireccionamiento-solucionado-2253221</link>
		<description>&lt;h3&gt;
  &lt;span style="font-size: 0.9em;"&gt;El problema&lt;/span&gt;
&lt;/h3&gt;
&lt;p&gt;
  &lt;span style="font-size: 0.9em;"&gt;Seguro que no soy el único que
  tiene más de una dirección de correo electrónico.&lt;/span&gt;
  &lt;span style="font-size: 0.9em;"&gt;En muchas ocasiones, por orden o
  por practicidad, configuramos nuestras múltiples direcciones de
  correo electrónico para que podamos recibirlo en un mismo
  buzón.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Cuando alguna de esas direcciones
  está configurada en Gmail, en ocasiones, podemos experimenter
  pérdida de mensajes.&lt;/span&gt;
&lt;/p&gt;
&lt;h3&gt;
  &lt;span style="font-size: small;"&gt;El motivo&lt;/span&gt;
&lt;/h3&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Gmail pasa todo el correo
  entrante por un motor de detección de correo sospechoso de ser no
  deseado. Esta carpeta siempre la tenemos accesible para,
  (recomendable), poderle echar un ojo de vez en cuando y corregir
  el filtrado de Google. De esta forma vamos haciendo el filtro más
  efectivo.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;El problema viene cuando, por
  tener el correo redirigido desde una cuenta a otra, el filtro de
  la primera es el que descrimina el mensaje. En ese caso ni nos
  enteramos del mensaje y solamente podemos actuar en consecuencia
  entrando a la primera cuenta. Cosa que... no solemos
  hacer.&lt;/span&gt;
&lt;/p&gt;
&lt;h3&gt;
  &lt;span style="font-size: small;"&gt;La solución&lt;/span&gt;
&lt;/h3&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Debemos entrar al buzón de la
  cuenta de correo donde se envían los mensajes, es decir, la que
  está configurada para reenviarlos a nuestro buzón
  final.&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Accedemos al menú de
  configuración de opciones y filtros.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Una vez ahí creamos un filtro y,
  en el campo "Tiene las palabras", escribiremos "is:spam" (sin
  comillas).&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;&lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/512b/512b29402fbe4s13288.jpg"
  alt=" TAGS:"&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Pulsamos en "Crear filtro con
  esta búsqueda".&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Y, en la pantalla dónde nos
  preguntan cómo actuar marcamos la casillas "Nunca enviar a Correo
  no deseado".&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;&lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/512b/512b29485d685s22394_p.jpg"
  alt=" TAGS:"&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Con este pequeño truco, todo el
  correo se nos enviará a la dirección final donde esperamos
  recibirlo y podremos filtrarlo, de forma automática, según
  nuestras preferencias.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;&lt;br&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;span style="font-size: small;"&gt;Fotos de&amp;nbsp;&lt;a href=
  "http://stackexchange.com"&gt;stackexchange.com&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
			&lt;p&gt;
							&lt;a href="http://www.harecoded.com/fotos-articulo_mails-perdidos-gmail-redireccionamiento-solucionado-2253221" title="Pictures of Mails perdidos en Gmail por redireccionamiento [Solucionado]"&gt;View image gallery&lt;/a&gt; |
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/mails-perdidos-gmail-redireccionamiento-solucionado-2253221" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/EhJnIktooR0" height="1" width="1"/&gt;</description>
		<author>sergiambel</author>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[trucos]]></category>
		<comments>http://www.harecoded.com/mails-perdidos-gmail-redireccionamiento-solucionado-2253221#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/mails-perdidos-gmail-redireccionamiento-solucionado-2253221</guid>
		<pubDate>Mon, 25 Feb 2013 09:52:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/mails-perdidos-gmail-redireccionamiento-solucionado-2253221</feedburner:origLink></item>
	<item>
		<title><![CDATA[A life explained in HTTP status codes]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/6eOx_6ZOhLc/life-explained-in-http-status-codes-2246877</link>
		<description>&lt;p style='text-align:center'&gt;
				&lt;a href='http://www.harecoded.com/life-explained-in-http-status-codes-2246877' title="A life explained in HTTP status codes"&gt;&lt;img src='http://stc.obolog.net/photos/5136/51361a63aa853s64485_p.jpg' alt=''&gt;&lt;/a&gt;
			&lt;/p&gt;
			&lt;p&gt;
  This is a made-up story of a life explained with HTTP status
  code. It was written up to down at once without much thinking,
  feel free to improve it!
&lt;/p&gt;
&lt;table style="border: 1px solid #ccc;" border="1px"&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;
        &lt;strong&gt;Status Code&lt;/strong&gt;
      &lt;/th&gt;
      &lt;th&gt;
        &lt;strong&gt;Event&lt;/strong&gt;
      &lt;/th&gt;
      &lt;th&gt;
        &lt;strong&gt;HTTP meaning&lt;/strong&gt;
      &lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        100
      &lt;/td&gt;
      &lt;td&gt;
        You are curious about her
      &lt;/td&gt;
      &lt;td&gt;
        Continue
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        101
      &lt;/td&gt;
      &lt;td&gt;
        First time sex
      &lt;/td&gt;
      &lt;td&gt;
        Switching Protocols
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        200
      &lt;/td&gt;
      &lt;td&gt;
        Love
      &lt;/td&gt;
      &lt;td&gt;
        OK
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        201
      &lt;/td&gt;
      &lt;td&gt;
        She's pregnant
      &lt;/td&gt;
      &lt;td&gt;
        Created
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        202
      &lt;/td&gt;
      &lt;td&gt;
        And you are the father
      &lt;/td&gt;
      &lt;td&gt;
        Accepted
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        203
      &lt;/td&gt;
      &lt;td&gt;
        Were you looking forward it?
      &lt;/td&gt;
      &lt;td&gt;
        Non-Authoritative Information
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        204
      &lt;/td&gt;
      &lt;td&gt;
        Think of a name&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
        No Content
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        205
      &lt;/td&gt;
      &lt;td&gt;
        Baby is born. Your life starts again&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
        Reset Content
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        206
      &lt;/td&gt;
      &lt;td&gt;
        Changing diapers
      &lt;/td&gt;
      &lt;td&gt;
        Partial Content
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        300
      &lt;/td&gt;
      &lt;td&gt;
        Kids education
      &lt;/td&gt;
      &lt;td&gt;
        Multiple Choices
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        301
      &lt;/td&gt;
      &lt;td&gt;
        New place to live&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
        Moved Permanently
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        302
      &lt;/td&gt;
      &lt;td&gt;
        Your relation is elsewhere
      &lt;/td&gt;
      &lt;td&gt;
        Found
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        303
      &lt;/td&gt;
      &lt;td&gt;
        She has an adventure
      &lt;/td&gt;
      &lt;td&gt;
        See Other
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        304
      &lt;/td&gt;
      &lt;td&gt;
        At least is not pregnant&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
        Not Modified
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        305
      &lt;/td&gt;
      &lt;td&gt;
        They used condom
      &lt;/td&gt;
      &lt;td&gt;
        Use Proxy
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        306
      &lt;/td&gt;
      &lt;td&gt;
        Your toolbox remains...
      &lt;/td&gt;
      &lt;td&gt;
        ( Unused )
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        307
      &lt;/td&gt;
      &lt;td&gt;
        Back to your parent's
      &lt;/td&gt;
      &lt;td&gt;
        Temporary Redirect
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        400
      &lt;/td&gt;
      &lt;td&gt;
        Call your old girl friends
      &lt;/td&gt;
      &lt;td&gt;
        Bad Request
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        401
      &lt;/td&gt;
      &lt;td&gt;
        Shit, all married
      &lt;/td&gt;
      &lt;td&gt;
        Unauthorized
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        402
      &lt;/td&gt;
      &lt;td&gt;
        Maybe Hookers?
      &lt;/td&gt;
      &lt;td&gt;
        Payment Required
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        403
      &lt;/td&gt;
      &lt;td&gt;
        You are bankrupt
      &lt;/td&gt;
      &lt;td&gt;
        Forbidden
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        404
      &lt;/td&gt;
      &lt;td&gt;
        Reconsidering sexuality
      &lt;/td&gt;
      &lt;td&gt;
        Not Found
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        405
      &lt;/td&gt;
      &lt;td&gt;
        In your ass
      &lt;/td&gt;
      &lt;td&gt;
        Method Not Allowed
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        406
      &lt;/td&gt;
      &lt;td&gt;
        Confused
      &lt;/td&gt;
      &lt;td&gt;
        Not Acceptable
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        407
      &lt;/td&gt;
      &lt;td&gt;
        Back to your wife's
      &lt;/td&gt;
      &lt;td&gt;
        Proxy Authentication Required
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        408
      &lt;/td&gt;
      &lt;td&gt;
        Too late to say I miss you
      &lt;/td&gt;
      &lt;td&gt;
        Request Timeout
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        409
      &lt;/td&gt;
      &lt;td&gt;
        I want the kids!
      &lt;/td&gt;
      &lt;td&gt;
        Conflict
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        410
      &lt;/td&gt;
      &lt;td&gt;
        Custody trial
      &lt;/td&gt;
      &lt;td&gt;
        Gone
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        411
      &lt;/td&gt;
      &lt;td&gt;
        Penis enlargement
      &lt;/td&gt;
      &lt;td&gt;
        Length Required
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        412
      &lt;/td&gt;
      &lt;td&gt;
        That was not the problem
      &lt;/td&gt;
      &lt;td&gt;
        Precondition Failed
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        413
      &lt;/td&gt;
      &lt;td&gt;
        That does not fit in
      &lt;/td&gt;
      &lt;td&gt;
        Request Entity Too Large
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        414
      &lt;/td&gt;
      &lt;td&gt;
        Too long
      &lt;/td&gt;
      &lt;td&gt;
        Request-URI Too Long
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        415
      &lt;/td&gt;
      &lt;td&gt;
        Try the other gender
      &lt;/td&gt;
      &lt;td&gt;
        Unsupported Media Type
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        416
      &lt;/td&gt;
      &lt;td&gt;
        Not a good idea
      &lt;/td&gt;
      &lt;td&gt;
        Requested Range Not Satisfiable
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        417
      &lt;/td&gt;
      &lt;td&gt;
        Not enjoying it
      &lt;/td&gt;
      &lt;td&gt;
        Expectation Failed
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        500
      &lt;/td&gt;
      &lt;td&gt;
        You feel like crap: Psychiatrist
      &lt;/td&gt;
      &lt;td&gt;
        Internal Server Error
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        501
      &lt;/td&gt;
      &lt;td&gt;
        No cure found yet
      &lt;/td&gt;
      &lt;td&gt;
        Not Implemented
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        502
      &lt;/td&gt;
      &lt;td&gt;
        Bingos, hookers and alcohol&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
        Bad Gateway
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        503
      &lt;/td&gt;
      &lt;td&gt;
        You are getting old
      &lt;/td&gt;
      &lt;td&gt;
        Service Unavailable
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        504
      &lt;/td&gt;
      &lt;td&gt;
        Viagra
      &lt;/td&gt;
      &lt;td&gt;
        Gateway Timeout
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        505
      &lt;/td&gt;
      &lt;td&gt;
        Mental institution
      &lt;/td&gt;
      &lt;td&gt;
        HTTP Version Not Supported
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
  HTTP specification can be found &lt;a href=
  "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;here&lt;/a&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/life-explained-in-http-status-codes-2246877" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/6eOx_6ZOhLc" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fun]]></category>
		<comments>http://www.harecoded.com/life-explained-in-http-status-codes-2246877#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/life-explained-in-http-status-codes-2246877</guid>
		<pubDate>Mon, 04 Feb 2013 15:47:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/life-explained-in-http-status-codes-2246877</feedburner:origLink></item>
	<item>
		<title><![CDATA[Apache RewriteCond -f check file exists solution]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/BuVZCZbGKYY/apache-rewritecond-f-check-file-exists-solution-2246468</link>
		<description>&lt;p style='text-align:center'&gt;
				&lt;a href='http://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468' title="Apache RewriteCond -f check file exists solution"&gt;&lt;img src='http://stc.obolog.net/photos/5136/51361b01b99f8s6899_p.jpg' alt=''&gt;&lt;/a&gt;
			&lt;/p&gt;
			&lt;p&gt;
  If your Apache &lt;strong&gt;virtualhost or htaccess&lt;/strong&gt;
  configuration uses a rewrite condition
  (&lt;strong&gt;RewriteCond&lt;/strong&gt;) in order to allow nice URLs, you
  should be aware that since &lt;strong&gt;Apache 2.2 the &lt;strong&gt;"check
  if file or exists"&lt;/strong&gt; works a little bit different. Any of
  the following examples might have stopped working for
  you:&lt;/strong&gt;
&lt;/p&gt;
&lt;pre&gt;
   RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-s
&lt;/pre&gt;
&lt;p&gt;
  The solution to correct it is very simple, but I couldn't see it
  documented. All you have to do is to add the variable
  &lt;strong&gt;DOCUMENT_ROOT&lt;/strong&gt; before the
  &lt;strong&gt;REQUEST_FILENAME&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  The following example redirects all non existing files to
  index.php, here is the difference.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Before Apache 2.2:&lt;/strong&gt;
&lt;/p&gt;
&lt;pre&gt;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(.+) /index.php [QSA,L]
&lt;/pre&gt;
&lt;p&gt;
  &lt;strong&gt;Apache 2.2 and later:&lt;/strong&gt;
&lt;/p&gt;
&lt;pre&gt;
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^/(.+) /index.php [QSA,L]
&lt;/pre&gt;
&lt;p&gt;
  The Apache 2.2 documentation is here: &lt;a href=
  "http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html"&gt;http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html&lt;/a&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/BuVZCZbGKYY" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tricks]]></category>
		<comments>http://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468</guid>
		<pubDate>Sat, 02 Feb 2013 19:44:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/apache-rewritecond-f-check-file-exists-solution-2246468</feedburner:origLink></item>
	<item>
		<title><![CDATA[Convertir de ISO a UTF-8 por línea de comandos]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/7eDkvweaXhU/convertir-iso-utf-8-linea-comandos-2230931</link>
		<description>&lt;p&gt;
  &lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/5137/513752c3ba8c4s5684.jpg"
  alt=" TAGS:"&gt;Esta mañana he tenido que utilizar un .CSV generado
  desde Excel.
&lt;/p&gt;
&lt;p&gt;
  Al acceder a él desde la línea de comandos me he encontrado que
  se perdían todos los acentos. Un problema ya clásico este de "los
  carácteres especiales".
&lt;/p&gt;
&lt;p&gt;
  Gracias al comando 'file' he podido descubrir la codificación que
  Excel le da a nuestro fichero en el momento de hacer la
  exportación.
&lt;/p&gt;
&lt;pre&gt;
&amp;gt;file nombre_fichero.csv&lt;br&gt;nombre_fichero.csv: ISO-8859 text, with CRLF line terminators
&lt;/pre&gt;
&lt;p&gt;
  Lo único que he tenido que hacer es convertirlo en la misma
  terminal a &lt;em&gt;UTF-8&lt;/em&gt;. Conviene fijarse en que,
  &lt;strong&gt;iconv&lt;/strong&gt; utiliza &lt;em&gt;ISO-8859-15&lt;/em&gt; en lugar del
  &lt;em&gt;ISO-8859&lt;/em&gt; que me ha devuelto file:
&lt;/p&gt;
&lt;pre&gt;
&amp;gt; iconv -f ISO-8859-15 -t UTF-8 fichero_origen.csv &amp;gt; fichero_convertido.csv
&lt;/pre&gt;
&lt;p&gt;
  Con esto ya tengo en &lt;code&gt;fichero_convertido.csv&lt;/code&gt; los
  datos con el formato esperado.&lt;br&gt;
  Suerte.
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/convertir-iso-utf-8-linea-comandos-2230931" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/7eDkvweaXhU" height="1" width="1"/&gt;</description>
		<author>sergiambel</author>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[trucos]]></category>
		<comments>http://www.harecoded.com/convertir-iso-utf-8-linea-comandos-2230931#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/convertir-iso-utf-8-linea-comandos-2230931</guid>
		<pubDate>Mon, 10 Dec 2012 11:00:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/convertir-iso-utf-8-linea-comandos-2230931</feedburner:origLink></item>
	<item>
		<title><![CDATA[Textos grandes a partir de caracteres básicos en terminal]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/6vjde1wV0Ak/textos-grandes-partir-caracteres-basicos-terminal-2186683</link>
		<description>&lt;p&gt;
  Estaba haciendo un script para automatizar el proceso de conexión
  a una base de datos, en producción.
&lt;/p&gt;
&lt;p&gt;
  Uno de esos scripts que conviene usar con cuidad así que pensé en
  poner un aviso que se mostrara al ejecutarlo:
&lt;/p&gt;
&lt;pre&gt;
[user~]$ cat prod_mysql.sh&lt;br&gt;echo "CUIDAOOOOOOOOO!!!!!" mysql -h localhost -u user_prod -plucksoytuhijo main_data
&lt;/pre&gt;
&lt;p&gt;
  Pero al ejecutarlo pensé que ese aviso no era tan visible com me
  gustaría así que recordé una herramienta que usaba hace muchos
  años. Su nombre es &lt;strong&gt;figlet&lt;/strong&gt; y, casualidades de la
  vida, todavía está disponible para correr en mi CentOS
  6.3&amp;nbsp;&lt;a href=
  "http://www.figlet.org/"&gt;http://www.figlet.org/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  La instalación de figlet en CentOS es muy sencilla:
&lt;/p&gt;
&lt;pre&gt;
cd /tmp&lt;br&gt; wget http://pkgs.repoforge.org/figlet/figlet-2.2.2-1.el6.rf.x86_64.rpm&lt;br&gt; sudo  rpm -U figlet-2.2.2-1.el6.rf.x86_64.rpm
&lt;/pre&gt;
&lt;p&gt;
  Y ahora sólo me queda adaptar mi script:
&lt;/p&gt;
&lt;pre&gt;
&lt;span&gt;[user~]$ cat prod_mysql.sh&lt;/span&gt;&lt;br&gt; &lt;span&gt;figlet "CUIDAOOO!"&lt;/span&gt;&lt;br&gt; &lt;span&gt;mysql -h localhost -u user_prod -plucksoytuhijo main_data&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;
  Mucho mejor:
&lt;/p&gt;
&lt;pre&gt;
[user~]$ ./prod_mysql.sh
  ____ _   _ ___ ____    _    ___   ___   ___  _
 / ___| | | |_ _|  _ \  / \  / _ \ / _ \ / _ \| |
| |   | | | || || | | |/ _ \| | | | | | | | | | |
| |___| |_| || || |_| / ___ \ |_| | |_| | |_| |_|
 \____|\___/|___|____/_/   \_\___/ \___/ \___/(_)

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18432
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt;
&lt;/pre&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/textos-grandes-partir-caracteres-basicos-terminal-2186683" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/6vjde1wV0Ak" height="1" width="1"/&gt;</description>
		<author>sergiambel</author>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[trick]]></category>
		<comments>http://www.harecoded.com/textos-grandes-partir-caracteres-basicos-terminal-2186683#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/textos-grandes-partir-caracteres-basicos-terminal-2186683</guid>
		<pubDate>Wed, 14 Nov 2012 10:19:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/textos-grandes-partir-caracteres-basicos-terminal-2186683</feedburner:origLink></item>
	<item>
		<title><![CDATA[Llamadas cURL a través de distintas interfaces]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/JpiZct4LRMA/llamadas-curl-traves-distintas-interfaces-2183696</link>
		<description>&lt;p&gt;
  &lt;br&gt;
  &lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/5136/51361cfd711cbs59638_p.jpg"
  alt=" - "&gt;Si tu servidor web dispone de varias interfaces de red
  y quieres que ciertas peticiones que haces con cURL salgan a
  través de una IP específica puedes modificar el flag
  CURLOPT_INTERFACE de cURL pásandole la IP.
&lt;/p&gt;
&lt;p&gt;
  Un ejemplo tonto podría ser:
&lt;/p&gt;
&lt;pre&gt;
...
// Todas mis interfaces de red:
$interfaces = array(
        '91.121.157.41',
        '178.33.161.225',
        '188.165.128.67',
        '178.33.166.125',
        '178.33.163.125',
);
// Salir aleatoriamente por una de ellas:
$rand_interface = $interfaces[rand(0,count($interfaces)-1)];
curl_setopt($curl_handle, CURLOPT_INTERFACE, $rand_interface );
...
&lt;/pre&gt;
&lt;p&gt;
  Esto te puede servir tanto para balancear carga, como para forzar
  que una petición venga de un orígen único. Especialmente útil
  para hacer cosas feas en servidores con &lt;a href=
  "http://www.rackspace.com/knowledge_center/article/ip-failover-high-availability-explained#Failover_IPs"&gt;
  IP failover&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  En una máquina con IP Failover la lista de interface de red puede
  ser:
&lt;/p&gt;
&lt;pre&gt;
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 91.121.157.41
        netmask 255.255.255.0
        network 91.121.157.0
        broadcast 91.121.157.255
        gateway 91.121.157.254


auto eth0:0
iface eth0:0 inet static
        address 178.33.161.225
        netmask 255.255.255.255

auto eth0:1
iface eth0:1 inet static
        address 188.165.128.67
        netmask 255.255.255.255


auto eth0:2
iface eth0:2 inet static
        address 178.33.166.125
        netmask 255.255.255.255

auto eth0:3
iface eth0:3 inet static
        address 178.33.163.125
        netmask 255.255.255.255
&lt;/pre&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/llamadas-curl-traves-distintas-interfaces-2183696" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/JpiZct4LRMA" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<comments>http://www.harecoded.com/llamadas-curl-traves-distintas-interfaces-2183696#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/llamadas-curl-traves-distintas-interfaces-2183696</guid>
		<pubDate>Tue, 13 Nov 2012 07:50:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/llamadas-curl-traves-distintas-interfaces-2183696</feedburner:origLink></item>
	<item>
		<title><![CDATA[Copy/clone/duplicate a mysql database script]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/4iMmYwPbu3c/copycloneduplicate-mysql-database-script-2184438</link>
		<description>&lt;p&gt;
  &lt;img title="" src=
  "http://stc.obolog.net/photos/5136/51361d7c353c9s4182_t.jpg" alt=
  " TAGS:" align="left"&gt;This is a simple script that
  &lt;strong&gt;duplicates your entire database&lt;/strong&gt;. There are many
  ways in which you can take advantage of having an exact replica
  of your production database.
&lt;/p&gt;
&lt;p&gt;
  In short, the behaviour of the script is the following (in this
  order, all piped):
&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Delete the COPY database if possible to start with a fresh
  one
  &lt;/li&gt;
  &lt;li&gt;Create the COPY database
  &lt;/li&gt;
  &lt;li&gt;Dump the PRODUCTION database
  &lt;/li&gt;
  &lt;li&gt;Inject the output of the dump into the COPY database
  &lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;
  Any errors during the process will be logged to the file defined
  as $ERROR. Be aware that the user you you choose to connect to
  mysql needs CREATE and DROP database permissions. Note that there
  are some --force parameters. That will make the script continue
  even if something fails. The first time you launch the script
  you'll see that cannot drop the copy database.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  Copy &amp;amp; paste the following into a new file
  ~/duplicate_database.sh, and modify the credentials:
&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash
# Albert Lombarte
# Docs: http://www.harecoded.com/copycloneduplicate-mysql-database-script-2184438

PRODUCTION_DB=myapp
# The following database will be DELETED first:
COPY_DB=myapp_copy
USER=root
PASS="yourP4ssw0rd"
ERROR=/tmp/duplicate_mysql_error.log
echo "Droping '$COPY_DB' and generating it from '$PRODUCTION_DB' dump"
mysql -u$USER -p$PASS -e "drop database $COPY_DB;" --force &amp;amp;&amp;amp; mysql -u$USER -p$PASS -e "create database $COPY_DB;" &amp;amp;&amp;amp; mysqldump --force --log-error=$ERROR -u$USER -p$PASS $PRODUCTION_DB | mysql -u$USER -p$PASS $COPY_DB
&lt;/pre&gt;
&lt;p&gt;
  And launch it:
&lt;/p&gt;
&lt;pre&gt;
bash ~/duplicate_database.sh
&lt;/pre&gt;
&lt;p&gt;
  If you want to do it on a daily basis, you can add it in your
  crontab. Type &lt;code&gt;crontab -e&lt;/code&gt; and write something like
  this:
&lt;/p&gt;
&lt;pre&gt;
# At 7am clone the production database
7 0 * * * bash /home/myusername/duplicate_database.sh 
&lt;/pre&gt;
&lt;p&gt;
  If you want to make this copy in another host you have to add the
  SSH connection with &lt;code&gt;ssh -C "command"&lt;/code&gt; in the first
  and last &lt;code&gt;mysql&lt;/code&gt;commands
&lt;/p&gt;
&lt;p&gt;
  Like:
&lt;/p&gt;
&lt;pre&gt;
ssh -C user@remotehost "mysql -u root -p -e 'create database ...... | ssh -C user@remotehost "mysql -u"
&lt;/pre&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/copycloneduplicate-mysql-database-script-2184438" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/4iMmYwPbu3c" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[crons]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[mysql]]></category>
		<comments>http://www.harecoded.com/copycloneduplicate-mysql-database-script-2184438#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/copycloneduplicate-mysql-database-script-2184438</guid>
		<pubDate>Thu, 08 Nov 2012 12:25:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/copycloneduplicate-mysql-database-script-2184438</feedburner:origLink></item>
	<item>
		<title><![CDATA[Varnish allow/reject connections with IPs list (ACL)]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/75v9-LkN7dw/varnish-allowreject-connections-with-ips-list-acl-2183580</link>
		<description>&lt;p&gt;
  &lt;img title="" src=
  "http://stc.obolog.net/photos/5136/51361ddca7dcds10808_t.jpg"
  alt=" TAGS:" align="right"&gt;In a web server you can use directives
  to deny the unwanted eye to look at your content. This is an
  example of how Apache would handle a &lt;strong&gt;virtual
  host&lt;/strong&gt; that only accepts connections from a series of IPs,
  but in &lt;strong&gt;Varnish&lt;/strong&gt; that won't work.
&lt;/p&gt;
&lt;pre&gt;
        Order Deny,Allow
        Deny from all
        # Barcelona IPs
        Allow from 89.140.xxx.xxx/27
        # Japan IP
        Allow from 222.229.xxx.xxx/32

&lt;/pre&gt;
&lt;p&gt;
  The reason that this won't work in Varnish is because the IP
  Apache is receiving is 127.0.0.1. (Varnish is the one connecting
  to Apache, not the client). The real client IP comes in the
  header &lt;strong&gt;X-HTTP-FORWARDED-FOR&lt;/strong&gt;. If you want to fix
  this situation with Varnish in the middle you have basically two
  options:
&lt;/p&gt;&lt;ol&gt;
  &lt;li&gt;Fix Apache (or Nginx) to allow connections by looking into
  this header (explained&amp;nbsp;&lt;a href=
  "http://www.ultimatewebtips.com/how-to-blockallow-ip-addresses-behind-a-load-balancer-with-htaccess/"&gt;here&lt;/a&gt;)
  &lt;/li&gt;
  &lt;li&gt;
    &lt;strong&gt;Handle the ACL by Varnish&amp;nbsp;&lt;/strong&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
  The following recipe handles this second scenario and helps you
  create a &lt;strong&gt;whitelist&lt;/strong&gt; with IPs that Varnish will
  serve content to. Any other incoming source will be denied.
&lt;/p&gt;
&lt;h3&gt;
  Whitelist
&lt;/h3&gt;
&lt;p&gt;
  So, open your /etc/varnish/default.vcl and add:
&lt;/p&gt;
&lt;pre&gt;
acl offices {
    "localhost";
    "11.22.33.44"/32; # You can remove the mask /32 if you need one IP only
    # Add as many IPs as you need here&lt;br&gt;}
&lt;/pre&gt;
&lt;p&gt;
  Then put in the beginning of your vcl_recv:
&lt;/p&gt;
&lt;pre&gt;
 sub vcl_recv {

     # Ban all requests to domains like xx.myhost.com or xxx.myhost.com
     if ( req.http.host ~ "([a-z]{2,3}\.myhost\.com)$" &amp;amp;&amp;amp; !(client.ip ~ offices) ) {
         error 403 "Access denied";
     }
&lt;/pre&gt;
&lt;h3&gt;
  Blacklist
&lt;/h3&gt;
&lt;p&gt;
  This will discard any request not coming from the list. If you
  want to create a &lt;strong&gt;blacklist&lt;/strong&gt; (e.g: undesired bots)
  then you only have to remove the negation of the condition,
  being:
&lt;/p&gt;
&lt;pre&gt;
acl suckers {
    "11.22.33.44"/32; # You can remove the mask /32 if you need one IP only
    # Add as many IPs as you need here
}
&lt;/pre&gt;
&lt;p&gt;
  And in the vcl_recv:
&lt;/p&gt;
&lt;pre&gt;
 sub vcl_recv {

     # Ban all requests to domains like xx.myhost.com or xxx.myhost.com
     if ( req.http.host ~ "([a-z]{2,3}\.myhost\.com)$" &amp;amp;&amp;amp; client.ip ~ suckers ) {
         error 403 "Access denied";
     }
&lt;/pre&gt;
&lt;p&gt;
  I added a regular expression in the virtualhost to make an
  example a little bit more useful, but you can just write the host
  as is. Bad news is that the req.http.host does not accept a list
  like you did with the IPs.
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/varnish-allowreject-connections-with-ips-list-acl-2183580" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/75v9-LkN7dw" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[vcl]]></category>
		<comments>http://www.harecoded.com/varnish-allowreject-connections-with-ips-list-acl-2183580#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/varnish-allowreject-connections-with-ips-list-acl-2183580</guid>
		<pubDate>Tue, 06 Nov 2012 12:29:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/varnish-allowreject-connections-with-ips-list-acl-2183580</feedburner:origLink></item>
	<item>
		<title><![CDATA[Evitar que Chrome lance a Google tu url como búsqueda]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/8oKFtZP8GqM/evitar-chrome-lance-google-url-busqueda-2180657</link>
		<description>&lt;h3&gt;
  El problema
&lt;/h3&gt;
&lt;p&gt;
  Como desarrollador cada vez me siento más cómodo trabajando con
  Google Chrome pero hay una cosa que muchas veces me hace perder
  algo de tiempo:
&lt;/p&gt;
&lt;p&gt;
  En ocasiones, al intentar buscar una url poco "normal", como
  puede ser en un dominio típico en un entorno de desarrollo,
  Chrome detecta que no es una url válida y la lanza contra Google
  en forma de búsqueda.
&lt;/p&gt;
&lt;h3&gt;
  Un ejemplo
&lt;/h3&gt;
&lt;p&gt;
  Queremos acceder a nuestra working copy con una url como
  ésta:&amp;nbsp;development_area/test_script.php
&lt;/p&gt;
&lt;p&gt;
  &lt;img title="" src=
  "http://stc.obolog.net/photos/508a/508ad3eb3ec92s13163.jpg" alt=
  " TAGS:" align="left"&gt;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  Cuando pulsamos Enter, Chrome nos lleva a esta pantalla por
  tratarse de un dominio que, bajo su opinión, es inválido:
&lt;/p&gt;
&lt;p&gt;
  &lt;img title="" src=
  "http://stc.obolog.net/photos/508a/508ad3ea290dfs21009.jpg" alt=
  " TAGS:" align="left"&gt;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;h3&gt;
  La solución
&lt;/h3&gt;
&lt;p&gt;
  La solución pasa por cambiar el buscador por defecto de Chrome.
&lt;/p&gt;
&lt;p&gt;
  Vayamos a&amp;nbsp;&lt;a href="chrome://chrome/settings/" target=
  "_blank"&gt;chrome://chrome/settings/&lt;/a&gt; y pulsemos en "Administrar
  motores de búsqueda..."
&lt;/p&gt;
&lt;p&gt;
  &lt;img title="" src=
  "http://stc.obolog.net/photos/508a/508ad3e8ad5fas29149.jpg" alt=
  " TAGS:" align="left"&gt;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;Ahora, elige cualquiera de los que hay y lo modificamos
  escribiendo 'null' en el campo del medio y http://%s en el de la
  derecha. Para poder editarlo sólo hay que pulsar sobre lo que ya
  hay escrito.
&lt;/p&gt;
&lt;p&gt;
  Ahora pulsa en "Establecer como predeterminado".&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/508a/508ad3ec45de0s35513.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/508a/508ad3ec45de0s35513_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  Lo sé!, es una de esas pequeñas cosas que mejorán tu vida ;).
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  Fuente:&amp;nbsp;&lt;a href=
  "http://superuser.com/questions/354338/force-chrome-to-open-urls-as-urls-instead-of-searching"&gt;http://superuser.com/questions/354338/force-chrome-to-open-urls-as-urls-instead-of-searching&lt;/a&gt;
&lt;/p&gt;
			&lt;p&gt;
							&lt;a href="http://www.harecoded.com/fotos-articulo_evitar-chrome-lance-google-url-busqueda-2180657" title="Pictures of Evitar que Chrome lance a Google tu url como búsqueda"&gt;View image gallery&lt;/a&gt; |
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/evitar-chrome-lance-google-url-busqueda-2180657" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/8oKFtZP8GqM" height="1" width="1"/&gt;</description>
		<author>sergiambel</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[trucos]]></category>
		<comments>http://www.harecoded.com/evitar-chrome-lance-google-url-busqueda-2180657#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/evitar-chrome-lance-google-url-busqueda-2180657</guid>
		<pubDate>Fri, 26 Oct 2012 20:09:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/evitar-chrome-lance-google-url-busqueda-2180657</feedburner:origLink></item>
	<item>
		<title><![CDATA[Determining the client IP with Varnish in the middle]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/k43U-GJIL50/determining-the-client-ip-with-varnish-in-the-middle-2177289</link>
		<description>&lt;p&gt;
  If you implement Varnish in your application one of the early
  things that you discover is that &amp;nbsp;any IP functionalities you
  had are now gone. Some examples are:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;GEOIP does not resolve the country
  &lt;/li&gt;
  &lt;li&gt;Apache logs write 127.0.0.1 as request client IP (or another
  IP of your LAN)
  &lt;/li&gt;
  &lt;li&gt;My own PHP logic cannot longer apply filters by IP
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  Why? Well, it's easy to answer. That's because your
  &lt;strong&gt;Apache or Ngnix will receive the request from Varnish,
  not from the real client&lt;/strong&gt; as it used to be.
&lt;/p&gt;
&lt;p&gt;
  But that has an easy fix. All you need to do is to tell Varnish
  to send the client IP to the backend. This can be easily
  accomplished by setting in your VLC
  (&lt;code&gt;/etc/varnish/default.vcl&lt;/code&gt;) the following:
&lt;/p&gt;
&lt;pre&gt;
sub vcl_recv {

     remove req.http.X-Forwarded-For;
     set req.http.X-Forwarded-For = client.ip;
...
&lt;/pre&gt;
&lt;p&gt;
  With this change your &amp;nbsp;application will be able to get the
  client IP and resolve correctly the country using GeoIP. When
  your application needs the client IP you only have to access to
  the header&amp;nbsp;&lt;strong&gt;X-Forwareded-For.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  Now, &amp;nbsp;you might want to see the original IP in the apache
  logs too. To do that you have to use a custom log that prints the
  &lt;strong&gt;X-Forwareded-For&lt;/strong&gt; header. Just add inside your
  Virtualhost declaration:
&lt;/p&gt;
&lt;pre&gt;
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" varnish
CustomLog /var/log/httpd/access_combined_SOMEDOMAIN.log varnish
&lt;/pre&gt;
&lt;p&gt;
  You should also have in mind that this configuration is appended,
  so it might happen that you vcl has already a line like this, so
  you are doing it twice. See the commented code in the default.vcl
  file.
&lt;/p&gt;
&lt;p&gt;
  The latest VCL file includes already the client.ip, just that it
  might appear twice! Copy all the file and tune the lines you like
&lt;/p&gt;
&lt;p&gt;
  Mine looks like this
&lt;/p&gt;
&lt;pre&gt;
sub vcl_recv {

     remove req.http.X-Forwarded-For;
     set req.http.X-Forwarded-For = client.ip;

     # Ignore all requests from Working Copies
     if ( req.http.host ~ "([a-z]{2,3}\.development\.lan)$" )
     {
        return(pipe);
     }

     unset req.http.Cookie;

#Copy paste...

     if (req.request != "GET" &amp;amp;&amp;amp;
       req.request != "HEAD" &amp;amp;&amp;amp;
       req.request != "PUT" &amp;amp;&amp;amp;
       req.request != "POST" &amp;amp;&amp;amp;
       req.request != "TRACE" &amp;amp;&amp;amp;
       req.request != "OPTIONS" &amp;amp;&amp;amp;
       req.request != "DELETE") {
         /* Non-RFC2616 or CONNECT which is weird. */
         return (pipe);
     }
     if (req.request != "GET" &amp;amp;&amp;amp; req.request != "HEAD") {
         /* We only deal with GET and HEAD by default */
         return (pass);
     }
     if (req.http.Authorization || req.http.Cookie) {
         /* Not cacheable by default */
         return (pass);
     }
     return (lookup);

 }
&lt;/pre&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
  After that Varnish will shine again.
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/determining-the-client-ip-with-varnish-in-the-middle-2177289" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/k43U-GJIL50" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[geoip]]></category>
		<category><![CDATA[varnish]]></category>
		<comments>http://www.harecoded.com/determining-the-client-ip-with-varnish-in-the-middle-2177289#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/determining-the-client-ip-with-varnish-in-the-middle-2177289</guid>
		<pubDate>Mon, 15 Oct 2012 11:03:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/determining-the-client-ip-with-varnish-in-the-middle-2177289</feedburner:origLink></item>
	<item>
		<title><![CDATA[Puppet Syntax highlighting under Textmate]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/lcoMdUAMmVM/puppet-syntax-highlighting-under-textmate-2176234</link>
		<description>&lt;p&gt;
  Add some color to your puppet scripts opened in TextMate! Fire
  this in a terminal:
&lt;/p&gt;
&lt;pre&gt;
mkdir -p ~/Application\ Support/TextMate/Bundles
git clone https://github.com/masterzen/puppet-textmate-bundle.git Puppet.tmbundle
mv Puppet.tmbundle/ ~/Library/Application\ Support/TextMate/Bundles/
rm -fr Puppet.tmbundle
&lt;/pre&gt;
&lt;p&gt;
  And voilà!
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5076/5076de954b32bs90761.jpg"&gt;&lt;img class="fotobonita"
  style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5076/5076de954b32bs90761_p.jpg"
  alt=" - "&gt;&lt;/a&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/puppet-syntax-highlighting-under-textmate-2176234" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/lcoMdUAMmVM" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[puppet]]></category>
		<comments>http://www.harecoded.com/puppet-syntax-highlighting-under-textmate-2176234#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/puppet-syntax-highlighting-under-textmate-2176234</guid>
		<pubDate>Thu, 11 Oct 2012 16:55:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/puppet-syntax-highlighting-under-textmate-2176234</feedburner:origLink></item>
	<item>
		<title><![CDATA[Varnish VCL: Delete ALL cookies and other magic]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/fa8RGteaWNY/varnish-vcl-delete-all-cookies-and-other-magic-2175580</link>
		<description>&lt;p&gt;
  This morning &lt;a href="https://twitter.com/javier_callon"&gt;Javi
  Callón&lt;/a&gt;&amp;nbsp;gave me a great introduction in few minutes to
  the Varnish in steroids world, I really appreciate it. &amp;nbsp;I'd
  like to share this snippet which might be very interesting for
  you if you are new to the Varnish magic too.
&lt;/p&gt;
&lt;p&gt;
  This has been my first contact with Varnish ever, and I have to
  say I am quite amazed on how the application is responding now in
  terms of performance. Do not take this snippet as a definitive
  solution to your problems.
&lt;/p&gt;
&lt;p&gt;
  I wrote an article yesterday on&amp;nbsp;&lt;a title=
  "Install Varnish on CentOS" href=
  "http://www.harecoded.com/simple-varnish-installation-2175362"&gt;how
  to install Varnish&lt;/a&gt;. Truth is that if you install Varnish and
  you do not tune the VCL file chances are that Varnish is not
  caching anything because of the cookies. In a dynamic application
  there are a lot of factors that have to be taken (headers,
  user-agents, variations...)
&lt;/p&gt;
&lt;p&gt;
  This sample VCL tries to address the following problems:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Ignore a specific host (do not cache)
  &lt;/li&gt;
  &lt;li&gt;Remove ALL the cookies in the caching (the application does
  not need any of them)
  &lt;/li&gt;
  &lt;li&gt;Change the varnish cache of the images to 5 minutes
  &lt;/li&gt;
  &lt;li&gt;Special case when the URL contains a GET parameter ?rev=
  &lt;/li&gt;
  &lt;li&gt;Add in the response headers number of hits and if was a HIT
  or a MISS
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  Open the file&lt;code&gt;/etc/varnish/default.vcl&lt;/code&gt; and add the
  following. It is recommended to leave the rest of the comments as
  they are for future reference of what Varnish does by default.
&lt;/p&gt;
&lt;p&gt;
  The code is commented so you properly understand what it does and
  you can remove any pieces you don't need.
&lt;/p&gt;
&lt;pre&gt;
# You already have a block like this one when you installed Varnish, keep it safe:
backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

# ADD THE FOLLOWING
# -----------------

# 2 things are done here:
# First, ignore any request to a specific host. For instance, you don't want Varnish on a specific host.
# Second, remove cookies, because my application does not rely on cookies at all.
sub vcl_recv {

     # Varnish will Ignore any request to this host  (e.g: xx.mydomain.com)
     if ( req.http.host ~ "([a-z0-9]{2}\.mydomain\.com)$" )
     {
        return(pipe);
     }

     #Goodbye incoming cookies:
     unset req.http.Cookie;

}


sub vcl_fetch {
    # Remove cookies that destroy cache:    
     unset beresp.http.Set-Cookie;

     # 5 minutes (300s) cache for images
    if ( req.url ~ "\.(jpg|jpeg|png|gif)$" )
     {
        set beresp.ttl = 300 s;
     }

    # This is very specific of SIFO.me framework, but you can recycle it:
    # Any static URL containing ?rev= (this is JS and CSS) cache it almost forever.
    # The following regexp will find urls like http://.../file.js?rev=1747c3872495221156287e2000a0d110
    if ( req.url ~ "\?rev=[a-f0-9]{32}$" )
    {
       set beresp.ttl = 600000 s;
    }
}

# Add some debug info headers when delivering the content:
# X-Cache: if content was served from Varnish or not
# X-Cache-Hits: Number of times the cached page was served
sub vcl_deliver {

        # Was a HIT or a MISS?
        if ( obj.hits &amp;gt; 0 )
        {
                set resp.http.X-Cache = "HIT";
        }
        else
        {
                set resp.http.X-Cache = "MISS";
        }

        # And add the number of hits in the header:
        set resp.http.X-Cache-Hits = obj.hits;
}
&lt;/pre&gt;
&lt;p&gt;
  Try if the configuration syntax is OK with:
&lt;/p&gt;
&lt;pre&gt;
/etc/init.d/varnish configtest
&lt;/pre&gt;
&lt;p&gt;
  And then restart the service (also wipes the cache).
&lt;/p&gt;
&lt;pre&gt;
/etc/init.d/varnish restart
&lt;/pre&gt;
&lt;p&gt;
  The new headers should appear and you will be able to see what
  Varnish is doing with a simple CURL or with any browser
  Inspector. Example:
&lt;/p&gt;
&lt;pre&gt;
[root@mnm1 mnm]# curl --head http://yourhost,com
HTTP/1.1 200 OK
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Cache-Control: public, must-revalidate, max-age=30, s-maxage=43200
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Date: Tue, 09 Oct 2012 13:38:41 GMT
X-Varnish: 1572155458 1572155457
Age: 12
Via: 1.1 varnish
Connection: keep-alive
X-Cache: HIT
X-Cache-Hits: 1
&lt;/pre&gt;
&lt;p&gt;
  Have in mind that all these functions are &lt;strong&gt;appended to the
  default behaviour&lt;/strong&gt;. So they are adding extra things, but
  not preventing the default Varnish workflow take action.
&lt;/p&gt;
&lt;p&gt;
  In the cases where the time to live of the cache (TTL) is not set
  ,Varnish will cache it for 2 minutes (look for "120 s" in the
  deafault.vcl code).
&lt;/p&gt;
&lt;p&gt;
  All in all, it seems to me that for the &lt;strong&gt;huge
  benefit&lt;/strong&gt; that Varnish adds to a project, the investment
  of time and resources you have to put on are ridiculous (half
  morning if your dynamic app doesn't have excessive magic). Do not
  be scared and try to add Varnish at least in your static files,
  then move to the dynamics.
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/varnish-vcl-delete-all-cookies-and-other-magic-2175580" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/fa8RGteaWNY" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[varnish]]></category>
		<comments>http://www.harecoded.com/varnish-vcl-delete-all-cookies-and-other-magic-2175580#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/varnish-vcl-delete-all-cookies-and-other-magic-2175580</guid>
		<pubDate>Tue, 09 Oct 2012 14:48:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/varnish-vcl-delete-all-cookies-and-other-magic-2175580</feedburner:origLink></item>
	<item>
		<title><![CDATA[Simple Varnish Installation]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/N0d-3Jt-PG8/simple-varnish-installation-2175362</link>
		<description>&lt;p&gt;
  The first thing to do is to make sure your application is passing
  the headers properly. At least you'll need this (in PHP):
&lt;/p&gt;
&lt;pre&gt;
// Let's say Varnish caches for 12 hours:
$cache_max_age = 60*60*12;
header( "Cache-Control: public, must-revalidate, max-age=0, s-maxage=$cache_max_age" ); 
&lt;/pre&gt;
&lt;p&gt;
  Varnish installation (CentOS/Redhat):&lt;br&gt;
  &lt;small&gt;RPM taken from &lt;a href=
  "https://www.varnish-cache.org/installation/redhat"&gt;https://www.varnish-cache.org/installation/redhat&lt;/a&gt;&lt;/small&gt;
&lt;/p&gt;
&lt;pre&gt;
rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release-3.0-1.noarch.rpm
&lt;/pre&gt;
&lt;p&gt;
  After adding the package:
&lt;/p&gt;
&lt;pre&gt;
yum install varnish
&lt;/pre&gt;
&lt;p&gt;
  If you have another Linux see in the link, is more or less the
  same.
&lt;/p&gt;
&lt;p&gt;
  Now Varnish is installed. What we want to do next is to configure
  Apache to listen in another port and let the port 80 for Varnish.
  Varnish will be the one requesting to Apache the html and saving
  it in the memory for later accesses.
&lt;/p&gt;
&lt;p&gt;
  We will use as example the port 8080 for Apache. The first thing
  is to tell Varnish, where Apache will be listening to:
&lt;/p&gt;
&lt;pre&gt;
vi /etc/varnish/default.vcl

# Change the port to 8080, like this. Leave the rest of file as is:
backend default {
  .host = "127.0.0.1";
  .port = "8080";
}
&lt;/pre&gt;
&lt;p&gt;
  Then we have to change Varnish to make it listen in port 80:
&lt;/p&gt;
&lt;pre&gt;
vi /etc/sysconfig/varnish

# Change VARNISH_LISTEN_PORT variable to 80, like this:
VARNISH_LISTEN_PORT=80
&lt;/pre&gt;
&lt;p&gt;
  And now in the Apache settings make it listen to 8080:
&lt;/p&gt;
&lt;pre&gt;
vi /etc/httpd/conf/httpd.conf
# Change the Listen variable to 8080:

Listen 8080
&lt;/pre&gt;
&lt;p&gt;
  If you use Named Virtualhosts using the port number (e.g: You
  declare them with&amp;nbsp;&lt;em&gt;NameVirtualHost *:80&lt;/em&gt;) you'll need
  to change them to 8080 too. I usually store my virtual
  configurations under this file, use yours:
&lt;/p&gt;
&lt;pre&gt;
vi /etc/httpd/conf.d/virtual.conf

# You can replace all the 80 by 8080 easily with vi with (take care there aren't other things changed):
:%s/80/8080/g
&lt;/pre&gt;
&lt;p&gt;
  And now hold your breathe. Stop both services and start them
  again to make changes effective:
&lt;/p&gt;
&lt;pre&gt;
/etc/init.d/httpd stop
/etc/init.d/varnish stop
/etc/init.d/httpd start
/etc/init.d/varnish start
&lt;/pre&gt;
&lt;p&gt;
  Your application should be served by Varnish now. Check in the
  "Network" tab of your Google Chrome or Firefox that the headers
  are properly passed:
&lt;/p&gt;
&lt;p&gt;
  &lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/5073/50730b6cb6792s50700.jpg"
  alt=" TAGS:"&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/simple-varnish-installation-2175362" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/N0d-3Jt-PG8" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[varnish]]></category>
		<comments>http://www.harecoded.com/simple-varnish-installation-2175362#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/simple-varnish-installation-2175362</guid>
		<pubDate>Mon, 08 Oct 2012 19:18:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/simple-varnish-installation-2175362</feedburner:origLink></item>
	<item>
		<title><![CDATA[Smarty: Concatenation of variables inside block parameters]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/WWk5VkcjHlg/smarty-concatenation-variables-inside-block-parameters-2162707</link>
		<description>&lt;p&gt;
  In Smarty sometimes you need to concatenate 2 variables and pass
  it as a single variable inside a&amp;nbsp;block. But the placeholder
  won't allow any expected PHP syntax
&lt;/p&gt;
&lt;p&gt;
  You want to accomplish something like:
&lt;/p&gt;
&lt;pre&gt;
{assign var="MYVAR" value=$variable1.$variable2}
&lt;/pre&gt;
&lt;p&gt;
  But, the dot in smarty is for array access, so, what about...
&lt;/p&gt;
&lt;pre&gt;
{assign var="MYVAR" value=$variable1+$variable2}
&lt;/pre&gt;
&lt;p&gt;
  &lt;strong&gt;No.&lt;/strong&gt; It does not work either. Ah! &lt;strong&gt;Let's
  try a modifier&lt;/strong&gt;:
&lt;/p&gt;
&lt;pre&gt;
{assign var="MYVAR" value=$variable1|cat:$variable2}
&lt;/pre&gt;
&lt;p&gt;
  &lt;strong&gt;Aha! That's the solution!&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;small&gt;Dedicated to my friend Sambel, no pun intended!&lt;/small&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/smarty-concatenation-variables-inside-block-parameters-2162707" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/WWk5VkcjHlg" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>
		<comments>http://www.harecoded.com/smarty-concatenation-variables-inside-block-parameters-2162707#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/smarty-concatenation-variables-inside-block-parameters-2162707</guid>
		<pubDate>Tue, 04 Sep 2012 11:37:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/smarty-concatenation-variables-inside-block-parameters-2162707</feedburner:origLink></item>
	<item>
		<title><![CDATA[Mantener la sesión abierta en iTerm (keep-alive)]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/fdQkfS5jqlc/mantener-sesion-abierta-iterm-keep-alive-2160763</link>
		<description>&lt;p&gt;
  Similarmente a como explicamos sobre &lt;a href=
  "http://www.harecoded.com/putty-keep-alive-session-mantener-activa-sesion-2136431"&gt;
  cómo mantener la sesión activa en Putty&lt;/a&gt;, si queremos dejar la
  terminal abierta y que no se nos cierre con&amp;nbsp;&lt;a href=
  "http://iterm.sourceforge.net/"&gt;iTerm&lt;/a&gt; cada vez que vamos a
  hacer un café, comer, o liberar la próstata, hay que seguir estos
  sencillos pasos:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Abrir &lt;code&gt;Bookmarks&lt;/code&gt;&amp;nbsp;-&amp;gt;&amp;nbsp;&lt;code&gt;Manage
  Profiles&lt;/code&gt;
  &lt;/li&gt;
  &lt;li&gt;Desplegar &lt;code&gt;Terminal Profiles&lt;/code&gt; y seleccionar &lt;code&gt;
    Default&lt;/code&gt;
  &lt;/li&gt;
  &lt;li&gt;Marcar &lt;em&gt;When idle, sends ASCII code&lt;/em&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  El valor de esta casilla por defecto es &lt;code&gt;0&lt;/code&gt;, pero lo
  podéis cambiar a cualquier otro código ASCII. Yo lo he dejado tal
  cual.
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/503d/503dd8fd5c9f7s72812.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/503d/503dd8fd5c9f7s72812_p.jpg"
  alt=" - "&gt;&lt;/a&gt;
&lt;/p&gt;
			&lt;p&gt;
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/mantener-sesion-abierta-iterm-keep-alive-2160763" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/fdQkfS5jqlc" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[iterm]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[terminal]]></category>
		<comments>http://www.harecoded.com/mantener-sesion-abierta-iterm-keep-alive-2160763#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/mantener-sesion-abierta-iterm-keep-alive-2160763</guid>
		<pubDate>Wed, 29 Aug 2012 10:12:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/mantener-sesion-abierta-iterm-keep-alive-2160763</feedburner:origLink></item>
	<item>
		<title><![CDATA[How to setup a remote development environment over SFTP (working copy)]]></title>
		<link>http://feeds.nexoblogs.com/~r/harecoded/~3/_ebZJupKqLI/how-to-setup-remote-development-environment-over-sftp-working-copy-2139989</link>
		<description>&lt;p&gt;
  This article explains how to setup the server and client to work
  with a remote working copy.
&lt;/p&gt;
&lt;p&gt;
  To properly understand this post you should have read the
  previous post, &lt;a href=
  "http://www.harecoded.com/when-to-setup-remote-development-environment-over-sftp-working-copy-2139816"&gt;
  When to setup a remote development environment over SFTP (working
  copy)&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  To have the enviroment up and running you must setup once the
  server, and then apply the configuration of the client in every
  developer machine. But the client side is very simple and
  requires no installation at all.
&lt;/p&gt;
&lt;p&gt;
  Here's how:
&lt;/p&gt;&lt;h3&gt;
  Server Side
&lt;/h3&gt;
&lt;p&gt;
  These are the basic steps you need to do to get the server ready
  to create the remote working copy:
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Create a catch-all DNS&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  You should point a domain to the development machine. It is
  recommended to use a different one than the live DNS, or you can
  use a fake entry in the hosts file of the clients, but it's not
  very convenient. In this new domain you should configure a
  cath-all behavior (wildcard).
&lt;/p&gt;
&lt;p&gt;
  As example, if your domain is awesomedevelopers.com than you
  should create a wildcard *.awesomedevelopers.com in your DNS
  panel so any request goes there.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Limit the access to the server&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  The idea is to disallow any possible indexation to Google and do
  not let others see your page while you are working on it. Some
  methods you can use:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Simple IP control through iptables or similar
  &lt;/li&gt;
  &lt;li&gt;.htacces file or apache control
  &lt;/li&gt;
  &lt;li&gt;&amp;nbsp;header with www-authenticate
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  &lt;strong&gt;Install all the services you are going to need in this
  machine.&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  PHP, Mysql, Apache, Redis... anything that you might need must be
  installed in the server. A clone of the production machine is
  recommended. Avoids hearing in the future sentences like &lt;em&gt;"In
  my working copy worked like a charm"&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Configure the working copies&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  Create the folders where the working copies go, for instance,
  this creates the working copies &amp;nbsp;structure for the users
  named jta, api and alo.:
&lt;/p&gt;
&lt;pre&gt;
mkdir -p /var/www/wc/{jta,api,alo}
&lt;/pre&gt;
&lt;p&gt;
  Then create a user and password for each. Set desired permissions
  and clone the code at this stage if necessary (can be uploaded
  later):
&lt;/p&gt;
&lt;pre&gt;
adduser jta&lt;br&gt;adduser api&lt;br&gt;adduser alo
&lt;/pre&gt;
&lt;pre&gt;
passwd jta&lt;br&gt;passwd api&lt;br&gt;passwd alo
&lt;/pre&gt;
&lt;p&gt;
  &lt;strong&gt;Modify the Virtual Hosts&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  To make every working copy subdomain point to this folder.
  Example:
&lt;/p&gt;
&lt;pre&gt;
&lt;br&gt;   ServerName &lt;strong&gt;alo&lt;/strong&gt;.awesomedevelopers.com&lt;br&gt;   DocumentRoot "/var/www/wc/alo/htdocs"
&lt;br&gt;    ServerName &lt;strong&gt;api&lt;/strong&gt;.awesomedevelopers.com&lt;br&gt;    DocumentRoot "/var/www/wc/api/htdocs"
&lt;br&gt;    ServerName &lt;strong&gt;jta&lt;/strong&gt;.awesomedevelopers.com 
    DocumentRoot "/var/www/wc/jta/htdocs"&lt;br&gt;
&lt;/pre&gt;
&lt;h3&gt;
  Client Side
&lt;/h3&gt;
&lt;p&gt;
  Then in the client, based on the cross-platform&amp;nbsp;&lt;a href=
  "http://www.jetbrains.com/phpstorm/"&gt;PHPStorm&lt;/a&gt; IDE the
  followint steps is all you have to do to start working with the
  working copy. It is pretty fast and does not involve working
  copies or service maintenance.
&lt;/p&gt;
&lt;p&gt;
  All you have to do is create a new project, or reuse an existing
  one and then configure the editor to upload files automatically
  to the server.
&lt;/p&gt;
&lt;p&gt;
  In detail...
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Configure the deployment settings&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  The first thing to do is to configure the deployment server.
  PHPStorm needs to know where the machine is. To do so, go to:
&lt;/p&gt;
&lt;pre&gt;
Tools &amp;gt; Deployment &amp;gt; Configuration
&lt;/pre&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5023/5023cb0061f4bs85951.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5023/5023cb0061f4bs85951_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Nothing special to say here, except that make sure to set
  correctly the root path which is the real path in the server. The
  user should have enough permissions to write in the server.
&lt;/p&gt;
&lt;p&gt;
  Then go to the&amp;nbsp;"Mappings" tab and add a couple of slashes if
  your web has no additional path needed in the URL:
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5023/5023cb092797as65900.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5023/5023cb092797as65900_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Configure the deployment behaviour&lt;/strong&gt;
&lt;/p&gt;
&lt;pre&gt;
Tools &amp;gt; Deployment &amp;gt; Options
&lt;/pre&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5023/5023cb0367504s66967.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5023/5023cb0367504s66967_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  Things you should take care of here are:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Items you don't want to upload, such as the .git repo.
  &lt;/li&gt;
  &lt;li&gt;The level of logging. I always set it to Details so I can see
  what the IDE is doing anytime in the File transfer window
  &lt;/li&gt;
  &lt;li&gt;Overwrite files
  &lt;/li&gt;
  &lt;li&gt;Create empty directories (if you usually work with git, this
  is something you already know how to handle)
  &lt;/li&gt;
  &lt;li&gt;Automatic upload and external changes, are the 2 most
  important checkboxes. They make the IDE puts everything in the
  remote server as you work.
  &lt;/li&gt;
  &lt;li&gt;Notify remote changes. This option will show a yellow bar
  asking you what to do if the file has changed in the remote
  server. Very convenient.
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5023/5023cb06436b0s60359.jpg"&gt;&lt;br&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Upload &amp;nbsp;the code to the server&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  For the first time. If the code is already in the server and you
  start fresh then do it the other way around, download it from the
  server. To upload:
&lt;/p&gt;
&lt;p&gt;
  &lt;a class="thickbox" href=
  "http://stc.obolog.net/photos/5023/5023cafcbc093s78988.jpg"&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;"
  title="" src=
  "http://stc.obolog.net/photos/5023/5023cafcbc093s78988_p.jpg"
  alt=" TAGS:"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  If the Menu "Deployment does not show up" then you need to go
  back to the deployment configuration and set the remote server as
  default (a small green tickbox in top of the server name)
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Tick automatic upload&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;img style=
  "display: block; margin-left: auto; margin-right: auto;" title=""
  src="http://stc.obolog.net/photos/5023/5023cb06436b0s60359_p.jpg"
  alt=" TAGS:"&gt;
&lt;/p&gt;
&lt;p&gt;
  And now, PHPStorm will upload everything to the server. You don't
  need to save because PHPStorm does it automatically when the tab
  lose the focus (while you switch to the browser)
&lt;/p&gt;
&lt;p&gt;
  Hope this seres of articles help :)
&lt;/p&gt;
&lt;p&gt;
  &amp;nbsp;
&lt;/p&gt;
			&lt;p&gt;
							&lt;a href="http://www.harecoded.com/fotos-articulo_how-to-setup-remote-development-environment-over-sftp-working-copy-2139989" title="Pictures of How to setup a remote development environment over SFTP (working copy)"&gt;View image gallery&lt;/a&gt; |
							Read &lt;strong&gt;&lt;a href="http://www.harecoded.com/how-to-setup-remote-development-environment-over-sftp-working-copy-2139989" title="Web development, systems, linux and Mac OS X"&gt;Web development, systems, linux and Mac OS X&lt;/a&gt;&lt;/strong&gt; in &lt;a href="http://www.harecoded.com/" title="Web development, systems, linux and Mac OS X"&gt;Harecoded&lt;/a&gt;
            &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/harecoded/~4/_ebZJupKqLI" height="1" width="1"/&gt;</description>
		<author>alombarte</author>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[web]]></category>
		<comments>http://www.harecoded.com/how-to-setup-remote-development-environment-over-sftp-working-copy-2139989#comments-form</comments>
		<guid isPermaLink="false">http://www.harecoded.com/how-to-setup-remote-development-environment-over-sftp-working-copy-2139989</guid>
		<pubDate>Thu, 09 Aug 2012 00:10:00 +0100</pubDate>
	<feedburner:origLink>http://www.harecoded.com/how-to-setup-remote-development-environment-over-sftp-working-copy-2139989</feedburner:origLink></item>
</channel>
</rss>
