26
Oct 10

Augmented Reality

An example of augmented reality on the web.

Print this pattern, or download it to your phone, show it in front to the camera and enjoy!


09
Apr 10

WordPress: Actualización automática con SSH

Si el hosting en donde tienes instalado WP solo te permite acceso por SSH, puedes seguir disfrutando de las ventajas del plugin de actualización automática de wordpress y de esa forma ahorrar mucho tiempo en mantenimiento de tu sitio.

PASO 1:

Lo primero que necesitas es tener instalado la libreria de SSH para PHP, aquí explican como hacer eso.

PASO 2:

Ingresa a la cosola de servidor y ejecuta el siguiente comando:

[sourcecode language=”shell”]
$ ssh-keygen</pre>
[/sourcecode]

Este programa te va a preguntar donde quieres guardar el archivo que contiene las keys, puedes dejar el valor por defecto que por los general es /home/usuario/.shh/id_rsa, luego te preguntara por un passphrase, el ual puedes dejar en blanco para este propósito.

Luego debemos crear un archivo de autorización con los permisos requeridos de la siguiente forma:

[sourcecode language=”shell”]
$ cd ~/.ssh
$ cp id_rsa.pub authorized_keys
$ cd ~/
$ chmod 755 .ssh
$ chmod 644 .ssh/*
[/sourcecode]

PASO 3:

Luego necesitas ingresar estas lineas en tu archivo wp-config.php, cambiando los valores de acuerdo a la informacion generada en el paso dos

[sourcecode language=”php”]
define(‘FS_METHOD’, ‘direct’); // ‘ssh’ is also an option, but did not work for my setup
define(‘FTP_BASE’, ‘/opt/local/nginx/html/domain.com/’);
define(‘FTP_CONTENT_DIR’, ‘/opt/local/nginx/html/domain.com/wp-content/’);
define(‘FTP_PLUGIN_DIR ‘, ‘/opt/local/nginx/html/domain.com/wp-content/plugins/’);
define(‘FTP_PUBKEY’, ‘/home/username/.ssh/id_rsa.pub’);
define(‘FTP_PRIKEY’, ‘/home/username/.ssh/id_rsa’);
define(‘FTP_USER’, ‘username’);
define(‘FTP_HOST’, ‘your-domain.com:22’);</pre>
[/sourcecode]

Recuerda asegurate de que wordpress tenga permisos de escritura y lectura en las carpetas afectadas en el moento de actualización (p.e la carpeta de plugins) Si no quieres usar el método de claves emparejadas, puedes usar esta línea en el archivos wp-config.php

[sourcecode language=”php”]
define(‘FTP_PASS’, ‘password’);
[/sourcecode]


14
Jul 09

Solving “Security error accessing url” in FLEX

Hi.

During the developing process of my improved widget for Flex viewer I start getting a weird error accessing a RSS feed .

After a couple of hours trying to figure out what the problem was a got the solution.

When the Flash Player try to access a resource in a server, it first look for a file called crossdomain.xml which has the security policies for the site we are accessing.

In order to solve the problem, I got into my wordpress blog and added a crossdomain.xml which content is as follow:

[sourcecode language=”xml”]

<?xml version="1.0"?>

<cross-domain-policy>

<allow-access-from domain="*"/>

</cross-domain-policy>

[/sourcecode]


13
Jul 09

Create Apache Alias in XAMPP for Mac

Apache is a web server software which explanation could be find here.

Usually you would like to build web applications using PHP and MYSQL. However many people don’t like the manual installation of apache, the php module for apache and the Mysql database. For those (like me) there are software that include all this programs in a package. I am using XAMPP for MAC.

When you install XAMPP you should place your applications in the httdoc folder inside the Xampp folder. However many times you would like to place a web application outside the default “htdocs” folder, for example you would like to use a web application located inside you /Users//Documents/.

To do that so, you would need to create an alias inside you httpd.conf file on xampp.

  • Open the file /Applications/xampp/etc/httpd.conf in a text editor.
  • Add these lines to the end of the files. (change the name of the alias for the web application that suits better for you)

[sourcecode language=”bash”]
Alias /myapplication /Users/your_mac_username/Documents/your_web_application_path
<Directory "/Users/your_mac_username/Documents/your_web_application_path">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
[/sourcecode]

Alias Apache Mac

Then comes the tricky part:

Now if you try to use your website with the alias (http://localhost/myapplication)

You will get a message like this:

“You don’t have permission to access /xampp/index.php on this server.”

You need to tell apache to use your username to access the resources in your computer (This is not recommendable on production servers)

  • Open the file /Applications/xampp/etc/httpd.conf in a text editor.
  • Search after and change the next lines

[sourcecode language=”bash”]
<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User nobody
Group admin
</IfModule>
[/sourcecode]

Change the user name to your Mac username (the one you user to login in you computer, so the code should look this this:

[sourcecode language=”bash”]
<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User your_mac_username
Group admin
</IfModule>
[/sourcecode]

Restart the Xampp service (restart apache) and now you should be able to access your web application using http://localhost/myapplication.

I have to thanks to “Aaron Wolf” because his post about creating virtual host on Xampp using apache was very useful.

I hope this can be useful for some of you


03
Jul 09

Which album is that song?

Something you have a mass inside you music program, and then you decided to organize the music, It is it kinda of de-infoxification process.

I recommend this website to get the information of your song. Here you can get everything you could need to tag your music.

Cheers!


03
Jul 09

Identify Music automatically

I saw in my old sony ericsson celphone, a could feacture that allows the user to record from the microphone part of a song and then the program will identify the information related to that song. It is almost magic.

The application is called TrackID and what it does is that is samples the “waveform fingerprint” of the song and queries the Gracenote database to get the song’s info.

I got an application that do something similar but from the computer, it is called Tunatic, it is great. It samples a song using the microphone in the computer and tries to identify which song it is.

Great isn’t it?

This is how it looks like

This is how it looks like