Script to download wallpapers from facets.la [HTML Parsing]

Through this tweet https://twitter.com/justinmaller/status/436645591884759040/ I finally found what wallpaper was @MKBHD using. At a first glance I loved all wallpapers, I wanted every single one. There are a lot, so downloading one at a time it was going to be a painful task, so I…

READ MORE

Lath. A real time webchat with LaTeX support.

Lath is a real-time minimalistic webchat with LaTeX support (I know the name is not the best, it comes from LaTeX + Math). Rooms are predefined, and right now there are three: Calculus, Discrete Mathematics and Logic, because it is focused to CS students (based in Spain courses). Lath is built…

READ MORE

Mail client: An easy smtplib wrapper.

I published to github mailclient, a wrapper for the standard smtplib and email libraries. Smtplib and email are no fun to work with, for example if you want to attach a file, you have to import the right MIMEType. I built this wrapper to make sending emails with Python easier…

READ MORE

Fix yum error TypeError: can't multiply sequence by non-int of type 'float'

I ran into this bug which prevented me to update yum packages, and after a quick search, this helped to fix it: # vim /usr/lib/python2.7/site-packages/urlgrabber/grabber.py Go to line 1539, with vim you can use :1539 Replace the line with this: if cur > (float…

READ MORE

Quick tip: MySQL disallow database creation which certain name

If we want to prevent a name to be used as a schema name, it is pretty easy to accomplish: # move to your mysql data folder, default /var/lib/mysql cd /var/lib/mysql # create an empty folder with the desired name mkdir dontusethisname # set permissions to 000 chmod 000…

READ MORE

How to deploy django with nginx + gunicorn

Django is a great web framework and we have several ways to deploy it in production. You can use apache too for example, but for django my favorite is nginx + gunicorn. Nginx is a well-known player and it will be used as front-end. Gunicorn is not as well-known, but it…

READ MORE

Fix pulse audio problems Fedora 17.

With this release, I have been having some pulse audio problems. Sometimes I do not have sound while playing ┬áSpotify, Rhythmbox or any other desktop player. After a research, it is usually fixed with this three lines (not always): rm -rf ~/.pulse pulseaudio --kill pulseaudio -vvvvv Do not run it…

READ MORE

How to remove ati propietary drivers. Fedora.

I wanted to give it a shot, and installed ATI propietary driver. It did not ended well. Gdm could not start, it stucked after loading services. To remove it: # yum remove kmod-catalyst* xorg-x11-drv-cata* I will not try them again. …

READ MORE

Fix bug: Fedora 17 does not shutdown. Kernel Panic.

If you upgraded from Fedora 16 to Fedora 17, you may get an error when shutting down the system. This happens because the kernel is the same, and grub2.cfg does not get the Fedora 17 kernel, but it is installed, although not recognized. To fix this just run the…

READ MORE

Convert m4a files to mp3 with this script.

Some of my library was in m4a files, which I have problems to play, furthermore I prefer having everything in mp3 format. So I wrote the following script: echo "Dependencies: mplayer and lame" if [ $# -lt 1 ]; then echo "Usage: sh m4a2mp3.sh '/path/to/files'" else echo "This could…

READ MORE