Category Archives: programacion

Como agregar un campo a todos los elementos en una collección Mongo

Lo acabo de poner en inglés., 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 estaba en StackOverflow, pero la pondré acá de nuevo explicando como funciona. Continue reading

Posted in es, programacion | Leave a comment

Add a key to all items on a MongoDB collection

Again, I am posting this because it took me more than expected to find this easy answer. I found it on StackOverflow, but I will repost and explain here. Continue reading

Posted in en, programacion | Leave a comment

Sepia images with Django, Python and Sorl-thumbnail

Meet Sorl-sepia, a Sorl engine backend (PIL only so far) to turn your images into sepia tones. See the README file for instructions. Continue reading

Posted in django, en, programacion, Python | Leave a comment

Install PIL with Jpeg support on Ubuntu Oneiric 64bit

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. Continue reading

Posted in en, geek, programacion, Python | Tagged , , , | 5 Comments

UnicodeEncodeError on Django uploaded files

This has been an error that’s been bugging me for months. For some reason in production settings only in the production server only, whenever a user uploaded a files with a non ascii filename, I’d get this error UnicodeEncodeError: ‘ascii’ … Continue reading

Posted in django, en, programacion, Python, tech, web | Leave a comment

CSS3 gradients in Webkit

I’m just writing this to record a shorthand answer to a doubt I had. Old format Webkit gradients only support percentage color stops Recently, Webkit added support for standards CSS3 gradients, so your syntax will be the same for different … Continue reading

Posted in css, en, html, programacion, web | Tagged | Leave a comment

Mogrify using too much memory

I wanted to shrink pictures a folder with thousands of files. They were unnecessarily huge. So I made a script to resize them. Imagemagick’s mogrify takes all the RAM it can in the system to handle huge files, making the … Continue reading

Posted in en, geek, linux, programacion, tech | Tagged | Leave a comment

What I’m doing to the pictures I upload anywhere

$ mogrify -fill white -pointsize 16 -annotate +20+20 ‘If you\’re seeing this picture in Facebook, the person who uploaded it is an ass’ -thumbnail 800×800 -quality 75 picture.jpg

Posted in en, geek, programacion | Tagged , , | Leave a comment

Learning jQuery 1.3

Right after finishing my review on the Django template development book I got contacted again by the Packt folks to do the same for the Learning jQuery 1.3 book. I was most pleased with the request. Now, this book has … Continue reading

Posted in en, geek, javascript, programacion, tech, web | Tagged , , | Leave a comment

Generating Javascript Widgets with reversed URL endpoints in Django

I just read Elf Stenberg’s solution on how to serve static Javascript with reversed URLs in Django, I was going to leave this as a comment but I better explain it here When developing Django Widgets that require Javascript interaction … Continue reading

Posted in django, en, geek, javascript, programacion | Tagged , | 1 Comment