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 with NodeJS and ExpressJS, … [Read more…]
I published to github [mailclient](https://github.com/aesptux/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, for example: # create message … [Read more…]
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(max_size)*1.10):
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 dontusethisname # change ownership to mysql … [Read more…]
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 has proved to be … [Read more…]
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 as root.
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.
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 following command: # grub2-mkconfig > /etc/grub2.cfg … [Read more…]
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 take sometime. Converting to 320kbps MP3 … [Read more…]
More simple than it may seems. It will take care of adjusting months and days automatically: **Working with days:** // My date Y-m-d $mydate = “2012-05-06″; //Adding five days $newdate = date(“Y-m-d”, strtotime($mydate. ” +5 days”)); // Substracting five days $newdate = date(“Y-m-d”, strtotime($mydate. ” -5 days”)); **Working with weeks:** // My date Y-m-d $mydate … [Read more…]