<?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>Jj's blog</title>
	<atom:link href="http://jj.isgeek.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://jj.isgeek.net</link>
	<description></description>
	<lastBuildDate>Mon, 20 Feb 2012 06:32:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Crayola colors in JSON format</title>
		<link>http://jj.isgeek.net/2012/02/crayola-colors-in-json-format/</link>
		<comments>http://jj.isgeek.net/2012/02/crayola-colors-in-json-format/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 06:32:54 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=875</guid>
		<description><![CDATA[I ran into the Wikpedia page for Crayola offical colors. The list consists of 133 colors, with names and HEX values, so with a little help of Python, it was easy to extract them into a JSON file that we &#8230; <a href="http://jj.isgeek.net/2012/02/crayola-colors-in-json-format/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors"><img src="http://jj.isgeek.net/uploads/2012/02/220px-Assortedcrayolas.png" alt="Picture of crayolas" title="Assorted crayolas" width="220" height="256" class="alignleft size-full wp-image-876" /></a> I ran into the <a href="http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors">Wikpedia page for Crayola offical colors</a>.</p>
<p>The list consists of 133 colors, with names and HEX values, so with a little help of Python, it was easy to extract them into a JSON file that we can use:</p>
<pre>
[
    {
        "hex": "#EFDECD",
        "name": "Almond",
        "rgb": "(239, 222, 205)"
    },
    {
        "hex": "#CD9575",
        "name": "Antique Brass",
        "rgb": "(205, 149, 117)"
    },
    {
        "hex": "#FDD9B5",
        "name": "Apricot",
        "rgb": "(253, 217, 181)"
    },
    {
        "hex": "#78DBE2",
        "name": "Aquamarine",
        "rgb": "(120, 219, 226)"
    },
    {
        "hex": "#87A96B",
        "name": "Asparagus",
        "rgb": "(135, 169, 107)"
    },
    {
        "hex": "#FFA474",
        "name": "Atomic Tangerine",
...
</pre>
<p><a href="https://gist.github.com/1868136">Get the full list of crayola colors in JSON format</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2012/02/crayola-colors-in-json-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Usabilidad de las entradas del cine</title>
		<link>http://jj.isgeek.net/2011/12/usabilidad-de-las-entradas-del-cine/</link>
		<comments>http://jj.isgeek.net/2011/12/usabilidad-de-las-entradas-del-cine/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 00:15:04 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[es]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=839</guid>
		<description><![CDATA[Ayer fuí a ver Misión Imposible a Cineplanet. Como es de costumbre, hice una breve cola, fuí amáblemente atendido y recibí el ticket de entrada: Como siempre, confío plenamente que la entrada es para la función que pedí y procedo &#8230; <a href="http://jj.isgeek.net/2011/12/usabilidad-de-las-entradas-del-cine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ayer fuí a ver Misión Imposible a <a href="http://www.cineplanet.com.pe/">Cineplanet</a>. Como es de costumbre, hice una breve cola, fuí amáblemente atendido y recibí el ticket de entrada:</p>
<p><img src="http://jj.isgeek.net/uploads/2011/12/ticket-cine.jpg" alt="Foto de ticket de Cineplanet" title="Ticket de Cineplanet" width="237" height="398" class="alignnone size-full wp-image-848" /></p>
<p>Como siempre, confío plenamente que la entrada es para la función que pedí y procedo a <strong>memorizar la información que me confirma la chica que atiende por que va a ser imposible encontrar esos datos en la entrada</strong>.</p>
<p><img src="http://jj.isgeek.net/uploads/2011/12/secciones-ticket-cine.jpg" alt="Entrada de cine con secciones identificadas" title="Partes de una entrada de cine" width="237" height="398" class="alignnone size-full wp-image-851" /> <img src="http://jj.isgeek.net/uploads/2011/12/highlight-ticket-cine.jpg" alt="" title="highlight-ticket-cine" width="237" height="398" class="alignnone size-full wp-image-856" /></p>
<p>Como se puede ver gran parte de el papel está destinado a llevar información que como cliente no me es importante, y haciendo cálculos aproximadamente <strong>sólo el 4.5% del área del papel tiene datos que me interesan</strong>.</p>
<p>Por qué no pueden hacer algo más parecido a esto? Incluso en blanco y negro.</p>
<p><a href="http://jj.isgeek.net/uploads/2011/12/entrada-mejorada.png"><img src="http://jj.isgeek.net/uploads/2011/12/entrada-mejorada.png" alt="Diagrama de entrada de cine" title="Entrada del cine mejorada" width="581" height="341" class="size-full wp-image-855" /></a></p>
<p>No interesa si adicionalmente me entregan un comprobante de pago y si usan toooda la parte de atrás para poner publicidad y letras pequeñas.</p>
<p>No creería que siguen haciendo lo mismo sólo por que es más difícil de imprimir!</p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/12/usabilidad-de-las-entradas-del-cine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Update on Google reader reading space</title>
		<link>http://jj.isgeek.net/2011/12/update-on-google-reader-reading-space/</link>
		<comments>http://jj.isgeek.net/2011/12/update-on-google-reader-reading-space/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 18:06:41 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=832</guid>
		<description><![CDATA[This week <a href="http://googleblog.blogspot.com/2011/11/next-stage-in-our-redesign.html">Google launched its new top bar</a>, which changed Google Reader's DOM making the <a href="http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/">userContent rules I explained last month useless</a>. <a href="http://jj.isgeek.net/2011/12/update-on-google-reader-reading-space/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week <a href="http://googleblog.blogspot.com/2011/11/next-stage-in-our-redesign.html">Google launched its new top bar</a>, which changed Google Reader&#8217;s DOM making the <a href="http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/">userContent rules I explained last month useless</a>.</p>
<p>Well, here&#8217;s the fix for the new Topbar. This time it is much easier:</p>
<pre class="code">
/* userContent.css */
@-moz-document url-prefix(http://www.google.com/reader/) {
    #gb {
    display: none;
    }
}
</pre>
<p>Now you have more reading space in Google reader.</p>
<p><a href="http://jj.isgeek.net/uploads/2011/12/2011-12-04-130159_1366x768_scrot.jpg"><img src="http://jj.isgeek.net/uploads/2011/12/2011-12-04-130159_1366x768_scrot.jpg" alt="Screenshot of Google Reader in Firefox" title="More reading space in Google Reader" width="1366" height="768" class="alignnone size-full wp-image-833" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/12/update-on-google-reader-reading-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Como agregar un campo a todos los elementos en una collección Mongo</title>
		<link>http://jj.isgeek.net/2011/12/como-agregar-un-campo-a-todos-los-elementos-en-una-colleccion-mongo/</link>
		<comments>http://jj.isgeek.net/2011/12/como-agregar-un-campo-a-todos-los-elementos-en-una-colleccion-mongo/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 04:36:10 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[es]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=827</guid>
		<description><![CDATA[<a href="http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/">Lo acabo de poner en inglés</a>., pero también lo buscarán en español. Asó que aquí va.

Escribo esto por que encontrar la respuesta me tomó más de lo que esperaba. Finalmente <a href="ttp://stackoverflow.com/questions/5587677/mongodb-unconditional-updates">estaba en StackOverflow</a>, pero la pondré acá de nuevo explicando como funciona. <a href="http://jj.isgeek.net/2011/12/como-agregar-un-campo-a-todos-los-elementos-en-una-colleccion-mongo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/">Lo acabo de poner en inglés</a>., pero también lo buscarán en español. Asó que aquí va.</p>
<p>Escribo esto por que encontrar la respuesta me tomó más de lo que esperaba. Finalmente <a href="ttp://stackoverflow.com/questions/5587677/mongodb-unconditional-updates">estaba en StackOverflow</a>, pero la pondré acá de nuevo explicando como funciona.</p>
<p>Como las bases de datos <a href="http://www.mongodb.org/">Mongo</a> no tienen esquema, no existe comando <code>ALTER TABLE </code>para agregar un nuevo campo a todos los elementos, lo que se hace es actualizar la colección por medio del comando <code>update</code>.</p>
<p>La <a href="http://www.mongodb.org/display/DOCS/Updating">documentación de Update</a> es muy escasa al respecto y el <a href="http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart">mapeo de SQL a Mongo </a>tampoco indica nada al respecto.</p>
<p>Así es como se hace una modificación a todos los elementos sin ninguna condición en particular:</p>
<pre class="code">
db.collection.update( criteria, objNew, upsert, multi )
</pre>
<p>Queremos actializar todos así que nuestra condición será un objeto vacío.</p>
<pre class="code">{}</pre>
<p>Queremos añadir un nuevo atributo a todos los objetos, así que usaremos la clave &#8220;$set&#8221; para hacerlo. El valor que mandemos tendrá la forma de un documento que <em>combinaremos</em> con cada uno de los elementos.</p>
<pre class="code">{'$set': {new_key:value}}</pre>
<p>No queremos Upsert, asi que vamos a poner <code>False</code> ahí. Si mandaramos True, además de modificar los documentos, agregaríamos un nuevo elemento a al colección con el documento que estamos enviando como dato, y eso no queremos.</p>
<p>En multi, decimos que sí: True, esto es necesario para que se actualice toda la colección y no sólo el primer elemento.</p>
<p>El comando quedaríá así:</p>
<pre class="code">
db.collection.update( {}, {'$set': {new_key:value}}, false, true)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/12/como-agregar-un-campo-a-todos-los-elementos-en-una-colleccion-mongo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a key to all items on a MongoDB collection</title>
		<link>http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/</link>
		<comments>http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 04:26:13 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=823</guid>
		<description><![CDATA[Again, I am posting this because it took me more than expected to find this easy answer. <a href="http://stackoverflow.com/questions/5587677/mongodb-unconditional-updates">I found it on StackOverflow</a>, but I will repost and explain here.  <a href="http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Again, I am posting this because it took me more than expected to find this easy answer. <a href="http://stackoverflow.com/questions/5587677/mongodb-unconditional-updates">I found it on StackOverflow</a>, but I will repost and explain here. </p>
<p>Since <a href="http://www.mongodb.org/">Mongo</a> is a schemaless database, there is no &#8220;<code>ALTER TABLE</code>&#8220;, so what you need to do is update all the items.</p>
<p>The <a href="http://www.mongodb.org/display/DOCS/Updating">MongoDB documentation on Updates</a> is not very clear on how to do this. And the <a href="http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart">SQL to Mongo mapping </a>doesn&#8217;t explain this either.</p>
<p>So, here&#8217;s how you do it. You perform an <code>update</code> with empty criteria</p>
<pre class="code">
db.collection.update( criteria, objNew, upsert, multi )
</pre>
<p>We want to update all the elements, so we use empty criteria</p>
<pre class="code">{}</pre>
<p>We want to add an attribute, so we will $set the key, it will be in the form of a document to be &#8220;merged&#8221; with each item.</p>
<pre class="code">{'$set': {new_key:value}}</pre>
<p>We don&#8217;t want upsert. So we set that to <code>False</code>, if we set it to true, the update call will add an item to the collection containing the value we wanted to set and nothing more, which is not what we want.</p>
<p>For multi, we will say <code>True</code>, because we want the update to happen on all the collection item&#8217;s and not just the first one.</p>
<pre class="code">
db.collection.update( {}, {'$set': {new_key:value}}, false, true)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/12/add-a-key-to-all-items-on-a-mongodb-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sepia images with Django, Python and Sorl-thumbnail</title>
		<link>http://jj.isgeek.net/2011/11/sepia-images-with-django-python-and-sorl-thumbnail/</link>
		<comments>http://jj.isgeek.net/2011/11/sepia-images-with-django-python-and-sorl-thumbnail/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 07:26:20 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=809</guid>
		<description><![CDATA[Meet <a href="https://github.com/jjdelc/sorl-sepia" title="Sorl-sepia on Github">Sorl-sepia</a>, a Sorl engine backend (PIL only so far) to turn your images into sepia tones. <a href="https://github.com/jjdelc/sorl-sepia/blob/master/README.md" title="How to use sepia images with Django">See the README file for instructions</a>. <a href="http://jj.isgeek.net/2011/11/sepia-images-with-django-python-and-sorl-thumbnail/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://jj.isgeek.net/uploads/2011/11/bublebee-sepia.jpg" alt="Picture side by side of a toy in color and sepiia" title="Bumblebee in sepia" width="720" height="480" class="aligncenter size-full wp-image-815" /></p>
<p>Meet <a href="https://github.com/jjdelc/sorl-sepia" title="Sorl-sepia on Github">Sorl-sepia</a>, a Sorl engine backend (PIL only so far) to turn your images into sepia tones. <a href="https://github.com/jjdelc/sorl-sepia/blob/master/README.md" title="How to use sepia images with Django">See the README file for instructions</a>.</p>
<p>The interesting trick about sepia images is that they are just gray-scale pictures with a different color palette. In this case the sepia color I&#8217;m using is #FFF0C0.</p>
<p>Doing this on PIL is quite straight forward (<a href="http://effbot.org/zone/pil-sepia.htm" title="Sepia toning with PIL">from effbot&#8217;s blog</a>):</p>
<pre>
# You have your PIL Image instance on a 'im' variable

# Convert it to grayscale
im = im.convert('L') # L mode means gray-scale

# Set the sepia palette
im.putpalette(linear_ramp) # will explain this later

# Make RGB again
im = im.convert('RGB')
</pre>
<p>And there you have it. Now the <code>linear_ramp</code> variable. It is actually a map of 256 blocks indicating what color to use for each of the possible gray-scale values (white to black). You can see the original blog post on <a href="http://effbot.org/zone/pil-sepia.htm">how to build the <code>linear_ramp</code></a>.</p>
<p>If you just want to turn your images to gray-scale instead of sepia, set <a href="https://github.com/jjdelc/sorl-sepia">sorl-sepia</a> <code>SORL_DEFAULT_SEPIA_TONE</code> setting to (0, 0, 0).</p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/11/sepia-images-with-django-python-and-sorl-thumbnail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squeeze more readable space out of Google Reader&#8217;s new layout</title>
		<link>http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/</link>
		<comments>http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 06:07:59 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=791</guid>
		<description><![CDATA[I am not happy with the removal of Google Reader social features. I really enjoyed discovering new feeds following people.

Anyway, I don't mind the new look but it leaves too little readable space. A couple of years ago <a href="http://jj.isgeek.net/2009/08/google-reader-on-a-netbook/" title="Google reader on a Netbook">I blogged about how to use Firefox's userContent.css to optimize the layout</a>. <a href="http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am not happy with the removal of Google Reader social features. I really enjoyed discovering new feeds following people.</p>
<p>Anyway, I don&#8217;t mind the new look but it leaves too little readable space. A couple of years ago <a href="http://jj.isgeek.net/2009/08/google-reader-on-a-netbook/" title="Google reader on a Netbook">I blogged about how to use Firefox&#8217;s userContent.css to optimize the layout</a>.</p>
<p>Here&#8217;s how the new layout looks at the moment:</p>
<p><a href="http://jj.isgeek.net/uploads/2011/11/2011-11-02-014626_1366x768_scrot1.png"><img src="http://jj.isgeek.net/uploads/2011/11/2011-11-02-014626_1366x768_scrot1.png" alt="Screenshot of Google Chrome with Google Reader" title="Google reader new layout" width="1366" height="768" class="alignnone size-full wp-image-794" /></a></p>
<p>Here&#8217;s what it will look like (Notice the vertical space in the reader area):</p>
<p><a href="http://jj.isgeek.net/uploads/2011/11/2011-11-02-014631_1366x768_scrot.png"><img src="http://jj.isgeek.net/uploads/2011/11/2011-11-02-014631_1366x768_scrot.png" alt="Firefox screenshot of Google Reader ew layout" title="Firefox optimized version" width="1366" height="768" class="alignnone size-full wp-image-793" /></a></p>
<p>This is what you need to add to your <a href="http://www-archive.mozilla.org/unix/customizing.html#userContent" title="Firefox userContent.css">userContent.css </a>file.</p>
<pre>
@-moz-document url-prefix(http://www.google.com/reader/) {
    #top-bar {
    display: none;
    }
}
/* For some reason I had to take this out of @-moz-document */
body.gecko #lhn-add-subscription-section, body.gecko #viewer-header {
height: 40px !important;
}
</pre>
<p>Switching to full screen <code>F</code> plus <code>Sift + U</code> sort of does the trick as well, but I don&#8217;t like having the whole screen&#8217;s width to read as lines become too long.</p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/11/squeeze-more-readable-space-out-of-google-readers-new-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install PIL with Jpeg support on Ubuntu Oneiric 64bit</title>
		<link>http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/</link>
		<comments>http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 21:41:18 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=779</guid>
		<description><![CDATA[I am posting this because it took me ages to figure out how to solve this one.

I could not get PIL to compile with JPEG, Zlib or freetype support on my virtualenv. I am using Ubuntu Oneiric Beta1 on a Lenovo Thinkpad X220. That is a 64bits installation. <a href="http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am posting this because it took me ages to figure out how to solve this one.</p>
<p>I could not get PIL to compile with JPEG, Zlib or freetype support on my virtualenv. I am using Ubuntu Oneiric Beta1 on a <a href="http://jj.isgeek.net/2011/08/ordered-a-new-laptop/">Lenovo Thinkpad X220</a>. That is a 64bit installation.</p>
<p>As read in every blog post out there, you first need to install the system libraries so PIL can find them.</p>
<pre>
$ sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
</pre>
<p>After that, your regular <code>pip install PIL</code> should work under most situations. In my case I was still seeing this summary after the installation:</p>
<pre>
    ---------------------------------------------------------------
    *** TKINTER support not available
    --- JPEG support not available
    --- ZLIB (PNG/ZIP) support not available
    --- FREETYPE2 support not available
    *** LITTLECMS support not available
    ---------------------------------------------------------------
</pre>
<p>After a lot of googling around, I found <a href="http://ubuntuforums.org/showpost.php?p=10811107&#038;postcount=5">this solution on Ubuntu forums</a>.<br />
It turns out that the APT installations put the libraries under <code><strong>/usr/lib/x86_64-linux-gnu</strong></code> and PIL will search for them in <code><strong>/usr/lib/</strong></code>. So you have to create symlinks for PIL to see them.</p>
<pre>
# ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
</pre>
<p>Now proceed and reinstal PiL, <code>pip install -U PIL</code>:</p>
<pre>
    ---------------------------------------------------------------
    *** TKINTER support not available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available
    *** LITTLECMS support not available
    ---------------------------------------------------------------
</pre>
<p>tada <img src='http://jj.isgeek.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  !</p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Show http:// protocol in URL bar for Firefox 7+</title>
		<link>http://jj.isgeek.net/2011/08/show-http-protocol-in-url-bar-for-firefox-7/</link>
		<comments>http://jj.isgeek.net/2011/08/show-http-protocol-in-url-bar-for-firefox-7/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 06:30:57 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=772</guid>
		<description><![CDATA[Firefox 7 beta was just rolled out yesterday to users on the Beta channel (that would include me). One of the various improvements and changes is that now Firefox follows Opera and Chrome in hiding the http:// protocol prefix from &#8230; <a href="http://jj.isgeek.net/2011/08/show-http-protocol-in-url-bar-for-firefox-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Firefox 7 beta was just rolled out yesterday to users on the Beta channel (<em>that would include me</em>).</p>
<p>One of the various improvements and changes is that now Firefox follows <a href="http://opera.com">Opera</a> and <a href="http://google.com/chrome">Chrome</a> in<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=665580"> hiding the <strong>http://</strong> protocol prefix from URLs</a>.</p>
<p>I like my http, luckily you can switch to the old behavior from our good old friend <a href="http://jj.isgeek.net/2006/01/31/mozilla-aboutwhat/">about:config</a>. To enable them back set this pref to &#8216;<strong>false</strong>&#8216;</p>
<blockquote><p>browser.urlbar.trimURLs = false</p></blockquote>
<p>You&#8217;ll see the change immediately <img src='http://jj.isgeek.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/08/show-http-protocol-in-url-bar-for-firefox-7/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Programación con Azucar</title>
		<link>http://jj.isgeek.net/2011/08/programacion-con-azucar/</link>
		<comments>http://jj.isgeek.net/2011/08/programacion-con-azucar/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 22:22:50 +0000</pubDate>
		<dc:creator>Jj</dc:creator>
				<category><![CDATA[Forgot to categorize]]></category>

		<guid isPermaLink="false">http://jj.isgeek.net/?p=766</guid>
		<description><![CDATA[La semana pasada en el <a href="http://www.facebook.com/barcamplima">Barcamp</a> dí por primera vez la charla de Programación con Azucar que hace tiempo quería hacer. <a href="http://jj.isgeek.net/2011/08/programacion-con-azucar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>La semana pasada en el <a href="http://www.facebook.com/barcamplima">Barcamp</a> dí por primera vez la charla de <strong>Programación con Azucar</strong> que hace tiempo quería hacer.</p>
<p>Programación con Azucar es un nombre a algo que ya venimos haciendo, que es preparar nuestros programas para que al usarlos causen <em>placer</em> en los usuarios. Esto normalmente va más allá de cumplir especificaciones o casos de uso (El usuario debe poder agregar X, Se mostrará el listado de YY, etc).</p>
<p>Van a disculpar la presentación pero tuve que hacerla 15m antes que me toque salir <img src='http://jj.isgeek.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<div style="width:425px" id="__ss_8795531"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/jjdelc/programacion-con-azucar" title="Programacion con azucar" target="_blank">Programacion con azucar</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8795531" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jjdelc" target="_blank">jjdelc</a> </div>
</p></div>
<ul>
<li>No programar para 0 y n únicamente, existen otros números (Joel Spolsky)</li>
<li>Programa un escenario completo para la primera experiencia/Usuario nuevo</li>
<li>Te va a demorar más</li>
<li>Tu usuario es una persona con una vida y cosas más importantes</li>
<li>Interactúa con tus usuarios, respóndeles. Son MUY importantes!</li>
<li>Que sepan que hay una persona de tu lado</li>
<li>Hazlos sonreir</li>
</ul>
<p>Espero poder mejorar la charla en el futuro y tener una presentación más preparada visualmente con ejemplos más claros y una lista de tips más concisa <img src='http://jj.isgeek.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jj.isgeek.net/2011/08/programacion-con-azucar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

