<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nacho Martín</title>
	<atom:link href="http://www.nacho-martin.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nacho-martin.com</link>
	<description>Blog about Symfony and more...</description>
	<lastBuildDate>Thu, 02 Sep 2010 16:34:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hint to avoid memory exhausted error (symfony + doctrine1.2)</title>
		<link>http://www.nacho-martin.com/hint-to-avoid-memory-exhausted-error-symfony-doctrine1-2</link>
		<comments>http://www.nacho-martin.com/hint-to-avoid-memory-exhausted-error-symfony-doctrine1-2#comments</comments>
		<pubDate>Wed, 01 Sep 2010 14:16:45 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=135</guid>
		<description><![CDATA[It is usual to have tasks that load a lot of objects from the database and do something with them. It can be generating a sitemap, generating thumbnails, etc.
When you do that, it is very likely that you find memory exhaustion problems like:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 ]]></description>
			<content:encoded><![CDATA[<p>It is usual to have tasks that load a lot of objects from the database and do something with them. It can be generating a sitemap, generating thumbnails, etc.</p>
<p>When you do that, it is very likely that you find memory exhaustion problems like:</p>
<pre class="brush: plain;">
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /blablabla/lib/vendor/symfony/lib/log/sfVarLogger.class.php on line 170
</pre>
<p>How to overcome this? Luckily I found <a href="http://groups.google.com/group/symfony-users/browse_thread/thread/6895a0595fda5260/f9b7ddb5b628a928?pli=1">this thread on the symfony group</a>. If I had discovered that thread earlier it would have saved a lot of time, so I&#8217;m replicating the solution here :)</p>
<p>The problem is that the <a href="http://www.doctrine-project.org/documentation/manual/1_1/hu/component-overview:profiler">doctrine profiler</a> is enabled for sfBaseTask, as sf_debug is set to true.</p>
<p>To disable the profiler, you have to create a new environment in config/databases.yml:</p>
<pre class="brush: plain;">
task:
  symfony:
      param:
        profiler: false

all:
  symfony:
    class: sfDoctrineDatabase
      param:
        dsn:   ....
        username:   ...
        password:   ...
</pre>
<p>And then run the task with the option &#8211;env=task</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/hint-to-avoid-memory-exhausted-error-symfony-doctrine1-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>De vuelta de las Jornadas Symfony</title>
		<link>http://www.nacho-martin.com/de-vuelta-de-las-jornadas-symfony</link>
		<comments>http://www.nacho-martin.com/de-vuelta-de-las-jornadas-symfony#comments</comments>
		<pubDate>Thu, 08 Jul 2010 19:27:00 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=131</guid>
		<description><![CDATA[Esta semana he estado en las jornadas de symfony en la Universitat Jaume I de Castellón, que tuvieron la amabilidad de invitarme como ponente.Tenéis una crónica muy completa de Javier Eguiluz en symfony.es. Fue un éxito de asistencia, participación y organización. David Castelló merece mención especial por lo mucho que se lo curró. Dejo aquí ]]></description>
			<content:encoded><![CDATA[<p>Esta semana he estado en las <a href="http://decharlas.uji.es/symfony/">jornadas de symfony en la Universitat Jaume I de Castellón</a>, que tuvieron la amabilidad de invitarme como ponente.Tenéis <a href="http://www.symfony.es/2010/07/06/cronica-de-las-primeras-jornadas-de-symfony/">una crónica muy completa de Javier Eguiluz</a> en symfony.es. Fue un éxito de asistencia, participación y organización. David Castelló merece mención especial por lo mucho que se lo curró. Dejo aquí las transparencias de mi presentación sobre Doctrine y más abajo el vídeo.</p>
<p><a style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;" title="View Doctrine - Nacho Martín - Jornadas Symfony en Castellón. Julio 2010 on Scribd" href="http://www.scribd.com/doc/34063724/Doctrine-Nacho-Martin-Jornadas-Symfony-en-Castellon-Julio-2010">Doctrine &#8211; Nacho Martín &#8211; Jornadas Symfony en Castellón. Julio 2010</a> <object id="doc_401265173249044" style="outline: none;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="500" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="doc_401265173249044" /><param name="data" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#ffffff" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="FlashVars" value="document_id=34063724&amp;access_key=key-1zlafrbm92djaj77dr6a&amp;page=1&amp;viewMode=slideshow" /><param name="src" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="document_id=34063724&amp;access_key=key-1zlafrbm92djaj77dr6a&amp;page=1&amp;viewMode=slideshow" /><embed id="doc_401265173249044" style="outline: none;" type="application/x-shockwave-flash" width="100%" height="500" src="http://d1.scribdassets.com/ScribdViewer.swf" flashvars="document_id=34063724&amp;access_key=key-1zlafrbm92djaj77dr6a&amp;page=1&amp;viewMode=slideshow" allowscriptaccess="always" allowfullscreen="true" bgcolor="#ffffff" wmode="opaque" data="http://d1.scribdassets.com/ScribdViewer.swf" name="doc_401265173249044"></embed></object></p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13324354&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13324354&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/13324354">ORM Doctrine &#8211; decharlas 2010</a> from <a href="http://vimeo.com/decharlas">decharlas.com</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/de-vuelta-de-las-jornadas-symfony/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating the creation of new symfony 1.4 projects (doctrine + git)</title>
		<link>http://www.nacho-martin.com/automating-the-creation-of-new-symfony-1-4-projects-doctrine-git</link>
		<comments>http://www.nacho-martin.com/automating-the-creation-of-new-symfony-1-4-projects-doctrine-git#comments</comments>
		<pubDate>Sat, 15 May 2010 23:15:41 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=119</guid>
		<description><![CDATA[Sometimes I want to create new symfony projects to try something, or, well, sometimes even to do some actual work.
Then, I go to the Jobeet tutorial and follow the first steps. After that, since I use git, I check out this post to setup symfony as a submodule.
I have written a simple bash script with ]]></description>
			<content:encoded><![CDATA[<p>Sometimes I want to create new symfony projects to try something, or, well, sometimes even to do some actual work.</p>
<p>Then, I go to the Jobeet tutorial and follow the first steps. After that, since I use git, I check out <a href="http://kahelamp.wordpress.com/2010/03/30/symfony-1-4-on-git-update/">this post</a> to setup symfony as a submodule.</p>
<p>I have written a simple bash script with that post and a few more lines, to automatize the process. It may be useful for others, and for me to have it accesible, so I will post it here:</p>
<p>setupsymfony.sh:</p>
<pre class="brush: bash;">

#!/bin/bash

SYMFREPO=&quot;git://symfony-git.git.sourceforge.net/gitroot/symfony-git/symfony-git&quot;
DBUSER=&quot;root&quot;
DBPASS=&quot;&quot;
VENDOR_DIR=&quot;lib/vendor/symfony&quot;

if [ -z &quot;$DBPASS&quot; ]; then
 echo edit setupsymfony.sh to add your mysql password on line 4: DBPASS=\&quot;password\&quot;
 exit
fi

if [ -z &quot;$1&quot; ]; then
 echo usage: $0 project name
 exit
fi

mkdir $1
cd $1

git init
git clone $SYMFREPO $VENDOR_DIR
git submodule add $SYMFREPO $VENDOR_DIR/

git submodule foreach 'git submodule init &amp;&amp; git submodule update'

git commit -m 'Initial commit; initialized symfony-git (1.4)'

$VENDOR_DIR/data/bin/symfony generate:project $1
echo &quot;config/databases.yml&quot; &gt; .gitignore
echo &quot;cache/*&quot; &gt;&gt; .gitignore
echo &quot;log/*&quot; &gt;&gt; .gitignore

./symfony project:permissions
git add .
git commit -m 'Initialized symfony project'

./symfony generate:app frontend
git add .
git commit -m 'Initialized frontend application'

mysqladmin -u$DBUSER -p$DBPASS create $1
./symfony configure:database &quot;mysql:dbname=$1;hostname=localhost&quot; $DBUSER $DBPASS
</pre>
<p>usage:  ./setupsymfony.sh name_of_the_new_project</p>
<p>remember to write your database password in the line 4 of the script.</p>
<p>#Edit: updated to include the changes proposed by kbsali. Thanks!</p>
<p>#Edit2: I have posted it in <a href="http://gist.github.com/402939">a gist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/automating-the-creation-of-new-symfony-1-4-projects-doctrine-git/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>List &amp; Check, an open source symfony project</title>
		<link>http://www.nacho-martin.com/list-check-an-open-source-symfony-project</link>
		<comments>http://www.nacho-martin.com/list-check-an-open-source-symfony-project#comments</comments>
		<pubDate>Sat, 15 May 2010 14:23:27 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=110</guid>
		<description><![CDATA[I have just released a pet project I have been developing lately. It is called List &#38; check, and it is about making (beautiful) lists easily.
What it is about
I use lists for almost everything: things I want t o try, things I want to do this week, books to read, movies to watch, places to ]]></description>
			<content:encoded><![CDATA[<p>I have just released a pet project I have been developing lately. It is called <a title="To Do lists" href="http://www.listandcheck.com/">List &amp; check</a>, and it is about making (beautiful) lists easily.<a href="http://www.nacho-martin.com/wp-content/uploads/2010/05/screenshot.jpg"><img class="aligncenter size-full wp-image-111" title="screenshot" src="http://www.nacho-martin.com/wp-content/uploads/2010/05/screenshot.jpg" alt="" width="300" height="270" /></a></p>
<h3>What it is about</h3>
<p>I use lists for almost everything: things I want t o try, things I want to do this week, books to read, <a title="list classical movies" href="http://www.listandcheck.com/peter-bogdanovich-s-movie-of-the-week">movies to watch</a>, places to visit, steps to do before a deployment&#8230; and since I saw the beautiful <a href="http://symfony-check.org/">symfony-check</a> website, I just wanted to be able to create lists with that beautiful look and great user experience.</p>
<p>I think that other list fans may enjoy it.</p>
<h3>Things I wanted to try</h3>
<p>I wanted to use this pet project as playground to try some things:</p>
<ul>
<li>I used the Doctrine ORM, because I was using before Propel. I think that the change is worthwile only looking at the amount of documentation available for each ORM. I used the <a href="http://www.symfony-project.org/plugins/csDoctrineActAsSortablePlugin">csDoctrineActAsSortablePlugin</a> to make items sortable and it worked smoothly.</li>
<li><a href="http://www.redmine.org/">Redmine</a> as a replacement of trac and pivotal tracker. I hate the installation of trac, Redmine gives me just what I wanted with a good user interface. It integrates well with git as well.</li>
<li>Git for Symfony. I am big fan of git, but I have had problems in the past working with Symfony and the huge amount of svn:externals you have to deal with. I have tried several scripts for doing the job, but none of them worked properly, and I had to tweak them&#8230; But, thanks to <a href="http://www.devorigin.fr/">vjousse</a>, that has placed <a href="http://github.com/vjousse/symfony-1.4">a Symfony git repository</a> in github, this time was very easy.</li>
<li>Ajaxized edit view. I wanted to have only a view both for editing the lists and for showing them better than having separate views for these actions. I think that for this project it makes sense to have everything in one place and the user experience is better, as in projects like <a href="http://www.pivotaltracker.com">Pivotal Tracker</a>.</li>
<li>Focus in user experience. Related to the previous point, it is important that you can create lists, create new items, sorting and deleting them quickly, just writing the title and pressing enter over and over. At the same time, I wanted to make possible to detail the items. It may be stupid for a list of places to visit or a to-do list for this evening, but it makes sense for lists like steps to set up a workstation. This is a feature I miss in Tadalist. So now I can create lists quicky and as detailed as I want, given the markdown editor. I used also <a href="http://jqueryui.com/">jquery-ui</a> that made my life easier.</li>
<li>Markdown editor. Markdown is just great for creating content, and was very useful as format for the items&#8217; description.</li>
<li><a href="http://seleniumhq.org/">Selenium</a>. In my roadmap I want to create selenium tests for the whole site. I have not done it yet, because I have been tuning the user interface until the last moment, but looks like the perefect project to test with Selenium.</li>
</ul>
<h3>It is Open source</h3>
<p>The full code is <a href="http://github.com/nacmartin/skinny">hosted at github</a>. The idea is more to give ideas to other people for doing their websites, but if you want you can set up a list&amp;check server. I have learnt a lot from the source code of symfonians and other OS projects, and I wanted to give something back to the community.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/list-check-an-open-source-symfony-project/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My experience with Diem CMS</title>
		<link>http://www.nacho-martin.com/my-experience-with-diem-cms</link>
		<comments>http://www.nacho-martin.com/my-experience-with-diem-cms#comments</comments>
		<pubDate>Fri, 14 May 2010 20:57:57 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[diem]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=96</guid>
		<description><![CDATA[Lately, I wanted to do a website for a non profit association in which I am involved. Since I really like symfony, I decided to do it using one of the CMS that extend symfony. Looks like there are three main choices: Apostrophe, Diem and Sympal.
I tried first Apostrophe, because I liked a lot the ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nacho-martin.com/wp-content/uploads/2010/05/logo_horiz_green_shadow.png"><img class="aligncenter size-full wp-image-98" title="diem cms logo" src="http://www.nacho-martin.com/wp-content/uploads/2010/05/logo_horiz_green_shadow.png" alt="Diem CMS logo" width="176" height="76" /></a>Lately, I wanted to do a website for a non profit association in which I am involved. Since I really like <a href="http://www.symfony-project.org/">symfony</a>, I decided to do it using one of the <strong>CMS that extend symfony</strong>. Looks like there are three main choices: <strong><a href="http://www.apostrophenow.com/">Apostrophe</a>, <a href="http://diem-project.org/">Diem</a> and <a href="http://www.sympalphp.org/">Sympal</a></strong>.</p>
<p>I tried first Apostrophe, because I liked a lot the demo video they have in their page. The concept is awesome and it is really worth a shot. Unfortunatelly, we wanted to have a blog, and the blog plugin for apostrophe is not ready yet. I had to abandon it, although I want to use it back in the future.</p>
<p>Then, I asked other symfonians on Twitter (<a href="http://twitter.com/davidcastello">@davidcastello</a>, <a href="http://twitter.com/loalf">@loalf</a> &amp; <a href="http://twitter.com/ivandebenito">@ivandebenito</a> are always very helpful :), and, after seeing the demo on the Diem site, I installed it and followed the tutorial <a href="http://diem-project.org/diem-5-1/doc/en/a-week-of-diem-ipsum">A Week of Diem Ipsum</a>.</p>
<p>The tutorial is just great. Well explained and illustrative, and the CMS itself suited my needs, although I was disappointed when I saw that the last lesson ends with &#8220;On the next chapter we will add comments to the blog.&#8221;, and&#8230; there is not next lesson. Anyways, I asked on IRC and they pointed me to <a href="http://diem-project.org/plugins/dmcommentplugin">dmCommentPlugin</a>, which is the way to do it. #EDIT: <a title="Diem tutorial, blog comments" href="http://github.com/diem-project/diem-docs/blob/5.1/tuto/en/07%20-%207.%20Comments%20for%20the%20blog.markdown" target="_self">That chapter of the tutorial is now available</a>! :)</p>
<p>After following the tutorial you can notice that <strong>Diem gives what they promise</strong>:</p>
<ul>
<li>You don&#8217;t need to develop all those boring thinks common to lots of pages. They are already implemented, as you can expect from a CMS, but moreover everything works smoothly.</li>
<li>The wysiwyg editor of layout of pages is great. It makes the task of designing the layout <em>almost</em> pleasing (I hate dealing with CSS).</li>
<li>Extending it is quite easy, if you know symfony.</li>
</ul>
<p>I created two new widgets for the landing page, a sort of squares with rounding boxes, a background image and some text inside&#8230; not very complicated, but it was easy, although I had to dig a bit in the code of already implemented widgets to solve some issues. I suppose that the documentation will grow and this won&#8217;t be necessary in the future, but anyways it is not a big pain. It was quite easy. After all, I was new in Diem.</p>
<p>I developed a system to synchronize pages and the blog with pages in Mediawiki (so that you can edit the wiki and the content is shown on the Diem website) too, and this apparently not so easy task was just smooth because, hey, you have symfony there and you can write tasks using doctrine records and so on.</p>
<p>So, given that I was a total newbie at Diem and I could do everything I wanted  without much pain (less than expected for a new platform), and that the base (layout, editor, admin panel, search engine, etc.) worked just fine, I am very glad.</p>
<p>PS: Given that I found that Diem suited my needs, I didn&#8217;t try Sympal, so I cannot say anything about it. It was a matter of luck and perhaps eye candy to try Diem before Sympal, I don&#8217;t have rational arguments for this choice. I will install it in the future and play a bit with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/my-experience-with-diem-cms/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Changing colors of ls</title>
		<link>http://www.nacho-martin.com/changing-colors-of-ls</link>
		<comments>http://www.nacho-martin.com/changing-colors-of-ls#comments</comments>
		<pubDate>Wed, 05 May 2010 16:55:49 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=91</guid>
		<description><![CDATA[I have been quite a long time living with files with 777 permission being displayed in blue over green background whenever i do ls, which makes text quite illegible. Sometimes you don&#8217;t see a problem even when it is in front of you. Well, I took the time to fix it today. Here is the ]]></description>
			<content:encoded><![CDATA[<p>I have been quite a long time living with files with 777 permission being displayed in blue over green background whenever i do <strong>ls</strong>, which makes text quite illegible. Sometimes you don&#8217;t see a problem even when it is in front of you. Well, I took the time to fix it today. Here is the solution:</p>
<pre class="brush: bash;">
dircolors --print-database &gt; ~/.dircolors
</pre>
<p>It will create a .dircolors file with the color specification<br />
vim .dircolors. Now we edit this file and change this line:</p>
<pre class="brush: bash;">
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
</pre>
<p>for this one:</p>
<pre class="brush: bash;">
OTHER_WRITABLE 01;37;42 # dir that is other-writable (o+w) and not sticky
</pre>
<p>That will tell ls to display these files with white bold letters over green background, mucho more legible.</p>
<p>In case you prefer different colors, here is what these codes mean:</p>
<pre class="brush: bash;">
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
</pre>
<p>Last step is to edit ~/.bashrc to make dircolors load these colors each time a new term is opened. Open .bashrc and add these lines:</p>
<pre class="brush: bash;">
if [ -x /usr/bin/dircolors ]; then
 d=.dircolors
 test -r $d &amp;&amp; eval &quot;$(dircolors $d)&quot; || eval &quot;`dircolors -b`&quot;
fi
</pre>
<p>Open a new terminal to see the changes o just run</p>
<pre class="brush: bash;">
source .bashrc
</pre>
<p>If you want to see the changes applied in the current terminal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/changing-colors-of-ls/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A workflow with remote branches on git</title>
		<link>http://www.nacho-martin.com/a-workflow-with-remote-branches-on-git</link>
		<comments>http://www.nacho-martin.com/a-workflow-with-remote-branches-on-git#comments</comments>
		<pubDate>Fri, 12 Mar 2010 01:09:50 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=84</guid>
		<description><![CDATA[This is the workflow that we are currently using for work with remote branches.
Pushing local branch to remote

git push origin my-branch:refs/heads/my-branch
git config branch.my-branch.remote origin
git config branch.my-branch.merge refs/heads/my-branch

That will create a new branch in the remote repository and the appropriate ref.
Pulling from remote to local branch
Before checking out, we need to fetch the branch, because our ]]></description>
			<content:encoded><![CDATA[<p>This is the workflow that we are currently using for work with remote branches.</p>
<h3>Pushing local branch to remote</h3>
<pre class="brush: bash;">
git push origin my-branch:refs/heads/my-branch
git config branch.my-branch.remote origin
git config branch.my-branch.merge refs/heads/my-branch
</pre>
<p>That will create a new branch in the remote repository and the appropriate ref.</p>
<h3>Pulling from remote to local branch</h3>
<p>Before checking out, we need to fetch the branch, because our repo is not aware of it. Run this to understand what I mean.:</p>
<pre class="brush: bash;">
git remote show origin
</pre>
<p>So&#8230; let&#8217;s fetch and then we&#8217;ll be able to do the checkout.</p>
<pre class="brush: bash;">
git fetch
git checkout -b my-branch origin/my-branch
</pre>
<p>You can add a &#8211;track to the last command to set up upstream configuration (see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">the docs</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/a-workflow-with-remote-branches-on-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grabar lo que está sonando (con pulseaudio)</title>
		<link>http://www.nacho-martin.com/grabar-lo-que-esta-sonando-con-pulseaudio</link>
		<comments>http://www.nacho-martin.com/grabar-lo-que-esta-sonando-con-pulseaudio#comments</comments>
		<pubDate>Wed, 24 Feb 2010 14:17:33 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=79</guid>
		<description><![CDATA[A veces interesa grabar en un fichero lo que está sonoando. Por ejemplo, yo me grabo una sesión de spotify para oirla cuando voy a correr. Aquí está el cómo hacerlo en Linux con pulseaudio: Encontré este script que explicaba cómo hacerlo, pero no me iba por tener el sistema en español. Un par de ]]></description>
			<content:encoded><![CDATA[<p>A veces interesa grabar en un fichero lo que está sonoando. Por ejemplo, yo me grabo una sesión de spotify para oirla cuando voy a correr. Aquí está el cómo hacerlo en Linux con pulseaudio: Encontré <a href="http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/">este script</a> que explicaba cómo hacerlo, pero no me iba por tener el sistema en español. Un par de cambios tontos en el script y queda:</p>
<pre class="brush: bash;">

#!/bin/bash
WAV=&quot;$1&quot;
if [ -z &quot;$WAV&quot; ]; then
 echo &quot;Uso: $0 OUTPUT.WAV&quot; &gt;&amp;2
 exit 1
fi
rm -f &quot;$WAV&quot;

# Get sink monitor:
MONITOR=$(pactl list | grep -A1 '^\*\*\* Origen #' | \
 grep '^Nombre: .*\.monitor$' | cut -d&quot; &quot; -f2 | tail -n1)

# Record it raw, and convert to a wav
echo &quot;Grabando a $WAV ...&quot;
echo &quot;Cierra esta ventana para terminar&quot;
parec -d &quot;$MONITOR&quot; | sox -t raw -r 44k -sLb 16 -c 2 - &quot;$WAV&quot;
</pre>
<p>Lo graba en un wav que luego puede uno pasar a mp3 o a lo que quiera.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/grabar-lo-que-esta-sonando-con-pulseaudio/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing a javascript file to be loaded at the end in symfony</title>
		<link>http://www.nacho-martin.com/forcing-a-javascript-file-to-be-loaded-at-the-end-in-symfony</link>
		<comments>http://www.nacho-martin.com/forcing-a-javascript-file-to-be-loaded-at-the-end-in-symfony#comments</comments>
		<pubDate>Tue, 23 Feb 2010 19:18:15 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=76</guid>
		<description><![CDATA[Very often, we  want javascript files to be loaded after another. For instance, you may your files containing jquery functions to be loaded after the main jquery.js file to avoid the typical error:

$ is not defined

use_javascript (and addJavascript) accepts a &#8216;position&#8217; parameter to deal with this. Position can be &#8216;first&#8217; or &#8216;last&#8217;. For instance:

&#60;?php use_javascript('file-you-want-to-load-at-the-end.js', ]]></description>
			<content:encoded><![CDATA[<p>Very often, we  want <strong>javascript</strong> files to be loaded after another. For instance, you may your files containing <strong>jquery</strong> functions to be loaded after the main jquery.js file to avoid the typical error:</p>
<pre class="brush: plain;">
$ is not defined
</pre>
<p>use_javascript (and addJavascript) accepts a &#8216;position&#8217; parameter to deal with this. Position can be &#8216;first&#8217; or &#8216;last&#8217;. For instance:</p>
<pre class="brush: php;">
&lt;?php use_javascript('file-you-want-to-load-at-the-end.js', 'last')?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/forcing-a-javascript-file-to-be-loaded-at-the-end-in-symfony/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mechanize force encoding error</title>
		<link>http://www.nacho-martin.com/mechanize-force-encoding-error</link>
		<comments>http://www.nacho-martin.com/mechanize-force-encoding-error#comments</comments>
		<pubDate>Sun, 17 Jan 2010 00:38:25 +0000</pubDate>
		<dc:creator>nacho</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.nacho-martin.com/?p=64</guid>
		<description><![CDATA[Ruby&#8217;s mechanize gem is very useful, specially when combined with Nokogiri. But if you find an encoding error like:

/var/lib/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize/page.rb:37:in `initialize': undefined method `force_encoding' for &#60;String:0xb7410070&#62; (NoMethodError)

Then you will need to apply this patch ;)
http://github.com/eric/mechanize/commit/7fd877c60cbb3855652c390c980df1dedfaed820
]]></description>
			<content:encoded><![CDATA[<p>Ruby&#8217;s mechanize gem is very useful, specially when combined with Nokogiri. But if you find an encoding error like:</p>
<pre class="brush: plain;">
/var/lib/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize/page.rb:37:in `initialize': undefined method `force_encoding' for &lt;String:0xb7410070&gt; (NoMethodError)
</pre>
<p>Then you will need to apply this patch ;)</p>
<p><a href="http://github.com/eric/mechanize/commit/7fd877c60cbb3855652c390c980df1dedfaed820">http://github.com/eric/mechanize/commit/7fd877c60cbb3855652c390c980df1dedfaed820</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nacho-martin.com/mechanize-force-encoding-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
