Archive for the ‘Linux’ Category

Fedora 9: Firefox 3.0b5 & flash fix

Tuesday, May 20th, 2008

Well, my flash plugin in Fedora 9 wasn’t working. Besides that, I was getting a strange “s” website being looked up for when I started Firefox.

After days of debugging, I just went to: System > Preferences > Personal > Preferred Applications and selected “Firefox” instead of “Custom”, which I didn’t set in the first place.

After this, Firefox worked fine again! Just wanted to post it so, if you’re having the same problem, you know… and I don’t forget!

Cómo instalar detox en Fedora 8

Sunday, May 11th, 2008

detox es una gran utilerí­a que sirve para quitarle toda la porquerí­a a los nombres de tus archivos.

O sea, como tu sabes, en GNU & Linux, los espacios son un poco difí­ciles de manejar, además, como los nombres son “Case Sensitive”, probablemente te gustarí­a, como a mí­, tener todo en minúsculas y con nombres “seguros”.

Bueno, detox te da todas estas opciones, no solo cambiar de iso-8859-1 a utf-8, sino, además, cambiar todo a minúsculas y quitar espacios y otros caracteres no seguros.

Para poder instalar esta herramienta tan útil, solo hay que hacer lo siguiente:

  1. Instalar flex: su -c ”yum install flex”
  2. Descargar detox de: http://sourceforge.net/projects/detox/
  3. Crar un directorio llamado “builds” en tu $HOME: mkdir ~/builds
  4. Entrar a tu directorio de construcción: cd ~/builds
  5. Descomprimirlo: tar -xjf ~/detox-1.2.0.tar.bz2
  6. Entrar al directorio descomprimido: cd detox-1.2.0
  7. Configurar el paquete para compilar: ./configure
  8. Compilar: make
  9. Instalar: su -c ”make install”

Con estos pasos, podrás instalar esta gran utilerí­a y disfrutar de los beneficios que otorga!\

Chécate la página del creador en: http://detox.sourceforge.net/

GNU & Linux unity

Sunday, December 9th, 2007

I have been wondering…

What would happen if all of us, GNU & Linux users would unite as a Community? I mean, I understand that we, the FLOSS Community, are one already… but a real one?

I know this might sound a bit harsh but, I don’t see much of a unity on IRC Channels nor Forums. We like to argue and rant about which is the best distro and what software rules over the other.

I understand we only express opinions when we say “KDE is better!”, “GNOME rules!”, “Viva Gentoo!” and stuff… We, usually, miss the words “I think that…”

I would like to see, not only a Community, but a Unified Community!

This movement has gotten so far; so much improvement has been made! All of these done, one and a thousand times, reinventing the wheel, which is one of the purposes of the Open Source Community… code reuse!

Can we really unify our groups? Can all the distros work towards the same goal?

What if the software; the development was made in favor of all distros? I know Red-hat/Fedora, as well as the communities around these, invest a lot in of time and resources on helping the individual apps be better by submitting patches, participating directly in the development and perfection of all the apps included in these distros.

I’d like to see more of this. I’d like to notice that Fedora’s efforts work to benefit Ubuntu and Debian; that Gentoo’s patches are made in a generic way so the rest of us benefit; that the Ubuntu forums are not so specific for this distro and more general…

I don’t know what a more unified Community would be capable off.

I’ve dreamed of 5-10 major distros providing, as they are now, a base to make great jump starts.

Wouldn’t it be wonderful if you had 5 major distros and, with the proper tools, be able to modify/re-edit them so I could provide this distro’s “edition” and maintain compatibility with the base distro? Ubuntu and Fedora, that I know of, are working this way.

It would be great if all the resources and power invested in maintaining sooooo many distros would be invested in these 5-10 distros! We would advance even faster!

Independent distro maintainers! Please! Work towards standardizing! Reuse what is made! Join forces and we will prevail!

Bash: Como encodear tus archivos .wav a .mp3 con lame y el CLI

Friday, December 7th, 2007

He aquí un bash script que ayuda a convertir tus archivos .wav a .mp3.

Dependencias

  • lame

cd /path/a/tus/archivos/wav && for file in *.wav; do lame -h -b 192 --cbr "$file" "${file%.wav}.mp3"; done

Gedit y su Modelines plugin

Tuesday, August 28th, 2007

Estoy muy contento ya que hice un gran descubrimiento en gedit!

Si conoces a algún old-school coder linuxero, habrás observado que muchos de ellos prefieren no usar tab para indentar. O acaso será me ha tocado escucharlos quejarse mucho de ellos? Sepa la goma!

La cosa es que siempre se han quejado de que, como los tabs son un espacio indefinido, pueden llegar a desfigurar el código.

Por ejemplo, si tu defines, en vim, una anchura de 8 espacios para tus tab, el código hecho con 2 o 4 columnas en mente sobrepasará la barrera de las 80 columnas y eso desfigurará el código ya que, en la mayoría de los casos, lo wrappeará. Esto es pecado para algunos programadores de C.

Bueno, pues lo único que sé es que descubrí algo, y seguramente muchos de ustedes ya lo sabían, acerca de gedit.

En vim, emacs y kate, existe un método para forzar ciertos valores a ciertas opciones, éstos se llaman Modelines. En mi caso, voy a usar algunos modelines de vim para poner un ejemplo.

Digamos que escribiste tu código y lo indentaste para que quedara precioso! Lo hiciste teniendo una configuración de 4 columnas por tab. Bueno, pues a la hora que Piotr, de Russia, donde prefieren 8 columnas por , abra tu código, dirá: “Malditos mexicanos, porrr eso nadie quierrre leerrrr su código, hijos de su mamushka!!” ya que tu código se habrá desfigurado en su monitor.

Para evitar esto, lo que haces es poner unas lineas al final, en las cuales definiras un espacio de 4 columnas para tus tab. Esto hará feliz a Piotr y mantendrá el código de los mexicanos en alto nombre!

Un ejemplo real:

Archivo sin modlines para tí
<?php

if ( $x = 123456 ) {
world_destruction( $x );
} else {
echo ‘Due to a mistype or something else, your password verification returned an error. I’m sorry, world destruction will need to wait.’;
}

?>

Archivo sin modlines para Piotr
<?php

if ( $x = 123456 ) {
world_destruction( $x );
} else {
echo ‘Due to a mistype or something else, your password verification returned an error. I’m sorry, world destruction will need to wait.’;
}

?>

Archivo con modlines para tí
<?php

if ( $x = 123456 ) {
world_destruction( $x );
} else {
echo ‘Due to a mistype or something else, your password verification
returned an error. I’m sorry, world destruction will need to wait.’;
}

/*
vim: set ts: 4
vim: set wrap
*/

?>

Archivo con modlines para Piotr
<?php

if ( $x = 123456 ) {
world_destruction( $x );
} else {
echo ‘Due to a mistype or something else, your password verification
returned an error. I’m sorry, world destruction will need to wait.’;
}

/*
vim: set ts: 4
vim: set wrap
*/

?>

Estas líneas de código, en caso de que no lo puedas ver así, definirán un espacio de 4 columnas por tab y activarán la función “wrap”. Esto podrá ser leido por vim y por Gedit, siempre y cuando actives el plugin correspondiente.

Para mayor información en las opciones disponibles, ve a:

# vim: http://vimdoc.sourceforge.net/htmldoc/options.html#modeline
# emacs: http://www.delorie.com/gnu/docs/emacs/emacs_486.html
# kate: http://www.kate-editor.org/article/katepart_modelines

NOTA:
Al tiempo de escritura de este artículo, gedit solo soporta las siguientes opciones:

# vim: et, expandtab, ts, tabstop, wrap, y textwidth
# emacs: tab-width, indent-tabs-mode y autowrap
# kate: tab-width, indent-width, space-indent, word-wrap y word-wrap-column

Favor de consultar la documentación de gedit
Este artículo fue basado en la versión: gedit 2.18.2