# languages

I’ve been always curious about sounds, particularly those that can be spoken. I also had the luck of growing in a multilingual environment (Spanish, French, English) I’ve discovered through the years that:

• A language is one of the most representative elements of any culture.
• Translation is only a functional lie, to understand what you are reading, you must learn the language.
• Bad accent and bad grammar are not issues to communicate, you will improve with practice.
• Vocabulary must be huge, even if you are not fluent in a particular language, you should be able to say all body parts.
• If you want to learn a new language, it’s always better if you have a human partner.

As an example, I write this blog in English, it is not perfect, but it allows me to communicate.

# python socket

i needed to send automagic answers using a telnet connection to my VoD server in order to achieve a little less shocking home Vod experience for news users, beta testers, friends.

The code can by optimized, and needs handling error exceptions.

By some obscure reason, indentation is not working. I;m sorry for this.

 import sys from telnetlib import Telnet from time import sleep

############################ ## INSTALL this in your PC # ############################

#set up your own data, see the setupify.sh script #for additional info serverHost = '192.168.0.13' serverPort = 4212 #you shouldn't need the change this serverPassword = 'videolan' + '\r\n' serverDown = 'shutdown' + '\r\n' serverLoad = 'load /home/<your_user>/vod-setup' + '\r\n' data = True #don't you dare...



vlc = Telnet( serverHost, serverPort ) sleep(3) #some sleeps are made only for waisting your time print vlc.read_very_eager() sleep(1) #some sleeps are made to wait for the server (fine tuning) print vlc.read_very_eager() vlc.write(serverPassword) sleep(1) print vlc.read_very_eager() print "type x to exit, l to load setup file" while data != "x":     data=raw_input('send to vlc: ')     if data == 'x':         try:             vlc.write(serverDown)             sleep(2)             print vlc.read_very_eager()             exit()         except EOFError:             print "connection to VoD server closed by user\nBye!"     elif data == 'l':         vlc.write(serverLoad)     else:         instruction= data + "\r\n"         vlc.write(instruction)         sleep(1)         print vlc.read_very_eager() 

# the OSes

why pay for something that is too complicated and will finally not work?
why buying Chinese tools? (In previous both cases I’m talking ’bout the cheap ones)
why hiring Chilean workers?
None of this will work, and it is usually a little bit more expensive that it was calculated.

Then, that’s when you decide to go for the big American expensive, energy eager, top hardware, obsolete technology muscle car that will run flawlessly for 30 years unless you forgot fueling it (every Wednesday).
Why buying an American OS that is crap? And expensive! and that will run flawless until you turn on your computer.
For almost the same money you can by a true OS that is as sexy as an OS can be, and it works, and it’s American too.
If all of this is too expensive, instead installing pirate Windows copies, tell you geek friends to install Linux (there is an aberration called Ubuntu (Ooh-boohn- tooh) that works out of the box, you can even choose you desktop environment painlessly.
so, why?
because everybody else does?

# #!/bin/bash

I love the quick and dirty concept when you apply it over solid foundations.
This brings me to the magic world of bash scripts.

Just to warm up things, to break the ice and offer you a coffee,
here’s one of my favorite one:

 for i in $( ls *.{mp3,avi,mov,flv,ogg}) do echo "media file:$i" done 

This will show al the mp3, avi, mov, flv, ogg files in the current directory

# the p.bass

Music that’s not relevant, old Brit bands that no one listens to. Canadian bands that were not a commercial success. Talented and misunderstood musics, particularly the discrete ones, playing the discrete instrument, the underlying force under the volcano. This is my tribute to all bassist that made it.

# images in a report

Today I found (for the second time in my life) a LaTeX package that allows to handle images in common formats as jpg or png. I’m talking about graphicx.

The prepare a delicious salad, do the following:

• Start using you favorite TeX editor (Texmaker, Kile, vi)
• Choose you favorite packages

Then once all is mixed thoroughly :

• \includegraphics[scale=0.5]{image.png}

Of course, it is up to you to set the image name and scale. This package has lots of option which you will find if you google.

Here’s the code, you need an image named LaTeX_logo.png or adapt the code.
 \documentclass[12pt]{report} \usepackage[pdftex]{graphicx} \title{\LaTeX} \date{}

 \begin{document} \maketitle{} \LaTeX can be easily used to insert images and to manage size, rotation, effects. \begin{itemize} \item image \includegraphics[scale=0.3]{LaTeX_logo.png} \item small image \includegraphics[scale=0.1]{LaTeX_logo.png} \item rotated image \includegraphics[angle=45, scale=0.1]{LaTeX_logo.png} \item effect \reflectbox{\includegraphics[scale=1, scale=0.1]{LaTeX_logo.png}} 

\end{itemize} \end{document} 
Here you can donwload the pdf generated basic.pdf

# photography

I’m the proud owner of a Panasonic Lumix DMC FZ28. I don’t take photography serious, it’s just for fun. I’m glad to introduce some of my friends (pict comes from the FZ28):

# fin swimming

since October I’ve been swimming using fins. Same pool, same people, but now I’m focusing in underwater techniques, apnea and the use of a pair of fins. I would really like if some physics genius ever falls on this site a corrects me, but if I can go THAT faster underwater, this means that my muscles are using much more energy than when I swim without fins.

.htaccess example file:

 AuthType Basic AuthName "password required" AuthUserFile /home/tatico/magicword Require user files AuthType Basic AuthName "password required" AuthUserFile /home/user/magic_word Require user files

 

then, a little leap back in time and you will create the magic_word file

htpasswd -c /home/user/magic_word files
where the arguments are the path and the user “files”

have a nice day 😀

# arduino

I consider myself a fan of the arduino board. I’ve been playing around for about a year and I have found only satisfaction from this very serious toy.

Now I’m working with PWM, to goal is to control the acceleration of a RC car, to avoid rear wheel spinning when accelerating.

I will post the PWM code soon (which is -obviously- copy/pasted from the excellent arduino docs) and the electronics needed.