23.12.09

Edita los posts de las aplicaciones en tu Facebook

Primero explicaré algo, en internet, hay programas que funcionan en un servidor y programas que funcionan localmente. De estos últimos es de los que nos aprovecharemos puesto que si Facebook 'pregunta' a nuestra computadora qué es lo que va a postear, ¿por qué no decirle lo que nosotros queramos?

Instrucciones

  • Primero que nada necesitamos Firefox
  • También necesitamos el addon para Firefox llamado Firebug
  • Una vez instalados vamos a nuestra aplicación y esperamos a que nos pida Publicar
  • Entonces damos clic al ícono de Firebug que se encuentra en la esquina inferior derecha de Firefox
  • Se nos abrirá una ventana, ahí debes ubicar y seleccionar el div llamado js_buffer, y una vez seleccionado damos clic en Edit
  • Buscamos la parte que queramos editar (ya sea dirección de imágenes, texto, etc)
  • Ponemos lo que queramos
  • Y damos clic en Publicar. Ahora en el Live Feed y en tu Perfil encontrarás el post que has editado.

Normalmente las aplicaciones lo harán todo por parte del cliente (javascript) pero ocasionalmente te encontrarás con aplicaciones mejor hechas que te lo harán más difícil mas no imposible. Es cuestión de encontrar las variables y tal.

Editing the posts from the applications in Facebook

First of all I'll explain you something. On the internet there's two kind of programs, those who works in a server and those who works locally, from the last kind is where we'll take advantage because if Facebook 'asks' to our computer what's going to post why can't we say what we want?

Instructions

  • First of all we need Firefox
  • Also we need the Firefox addon called Firebug
  • Once installed open the application and wait until it asks us to Publish
  • Then we click on the Firebug icon which is on the lower right corner of Firefox
  • A new window will be open, there you have to seek and select the div called js_buffer, once selected we click on Edit
  • We search on the part we want to edit (an image address, text, etc, it doesn't matters)
  • We type what we want
  • And then we click on Publish. Now the Live Feed and your Profile has the edited post.

Normally applications will make everything from the client side (javascript) but sometimes you'll find some better made applications which make things harder but not impossible. Just find the variables and such.

Labels: , , ,

13.12.09

Virus en tu USB Pen Drive

Siempre que comparto mi USB con compañeros o amigos me regresaban ésta con diferentes virus que luego tenía que borrar. Así que debía encontrar una manera de protegerme un poco.

Mi teoría era que con un autorun.inf creado por mí (que no se pudiera borrar) detendría un poco estos virus, ¿por qué? porque normalmente los virus utilizan estos archivos auto ejecutables para activar programas ya con extensión EXE. ¿Que no voy a detener a todos los virus así? Puede que sea cierto, pero la gran mayoría sí.

Lo que encontré fue que funcionaba si a una carpeta le ponía de nombre autorun.inf, sí, con todo y la extensión. Y una vez creada hacer una carpeta que no pudiera borrarse desde Windows, y para esto debía hacerlo con Línea de Comando.

Instrucciones

  • Crea una carpeta llamada autorun.inf en el directorio raíz de tu USB Pen Drive.
  • Fíjate qué letra tiene la unidad de tu USB, por ejemplo F:
  • Da clic en el Botón Inicio y presiona Ejecutar...
  • Escribe CMD en la ventana que se abre
  • Escribimos entonces lo siguiente línea por línea (recuerda que de EJEMPLO mencioné que mi unidad era F):
    F:

    cd autorun.inf

    mkdir .\con\
  • Listo, ahora trata de borrar la carpeta autorun.inf de tu USB y si no puedes significa que tu dispositivo es ahora un poco más seguro.

USB Pen Drive's viruses

All the time I share my Pen Drive with my workmates or friends when they give it me back there's always viruses I have to erase. So I had to find a way to make it more secure.

My theory was that with an undeleteable autorun.inf made by myself I would stop a bit those viruses, why? because normally viruses use this kind of files for executing hidden software with an EXE extension. Will I stop the whole viruses with this? No, but I'll stop the most of them.

What I found was that with a folder named autorun.inf, yeah, extension included, with an undeleteable by Windows folder inside made by a Command Line I would do the job.

Instructions

  • Make a folder called autorun.inf on the Root Directory from your USB Pen Drive.
  • Check the letter for the Unit, example F:
  • Click on the Start Button and press Run...
  • Type CMD on the popup window
  • Now type the next code Line by Line (also remember I mentioned F: as the unit EXAMPLE):
    F:

    cd autorun.inf

    mkdir .\con\
  • Done, now try to erase the folder autorun.inf from your USB and if you can't it means your dispositive is a bit more secure.

Labels: , ,

10.12.09

Intercambiar Idiomas en las Entradas

Hola, mi primer post será acerca del diseño en Blogspot. La razón es que cuando pensaba en crear un Blog tenía la idea de hacerlo en dos idiomas, español e inglés, pero sin molestar a las personas con dobles cuadros de texto o cosas por el estilo. Mi solución, un botón en javascript que comparto con ustedes.

Formato de las Entradas

Primero hay que dar formato a cada una de las entradas (o sólo aquellas que desees) y colocar su contenido en DIVS bajo una clase: "lanEsp" para español, "lanEng" para inglés.

<div class="lanEsp">
Hola Mundo!
<div>

<div class="lanEng">
Hello World!
<div>

Botones para intercambiar idiomas

Los botones son simples links que llaman a un javascript en lugar de una dirección

<a href="javascript:mostrar('espanol');">Español</a>
<a href="javascript:mostrar('ingles');">English</a>

Javascript

Una vez que tienen formato cada uno de los posts (por esto es que decidí hacer este script desde un principio) y que tenemos nuestros botones se crean el Javascript y un pequeño estilo CSS. Si sabes Javascript puedes resumirlo, yo me dedico al diseño y no a la programación así que puede haber código de más.

<script type="text/javascript" language="JavaScript">
function mostrar(identificador)
{
  var principal=document.getElementById("content");
  var misdivs=principal.getElementsByTagName("div");
  
  if(identificador=="espanol")
  {
    if(misdivs.length > 0)
    {
      for(i=0; i<misdivs.length; i++)
      {
        if(misdivs[i] != null)
        {
          if(misdivs[i].className=="lanEng")
          {
            misdivs[i].style.visibility="hidden";
            misdivs[i].style.position="absolute";
          }
          if(misdivs[i].className=="lanEsp")
          {
            misdivs[i].style.visibility="visible";
            misdivs[i].style.position="static";
          }
        }
      }
    }
  }
  
  if(identificador=="ingles")
  {
    if(misdivs.length > 0)
    {
      for(i=0; i<misdivs.length; i++)
      {
        if(misdivs[i] != null)
        {
          if(misdivs[i].className=="lanEsp")
          {             misdivs[i].style.visibility="hidden";
            misdivs[i].style.position="absolute";
          }
          if(misdivs[i].className=="lanEng")
          {
            misdivs[i].style.visibility="visible";
            misdivs[i].style.position="static";
          }
        }
      }
    }
  }
}
</script>

CSS

Ahora ponemos un poco de CSS para que no se muestre por default uno de los dos idiomas. En mi caso elegí esconder por default el español.

<style type="text/css">
.lanEsp {
  visibility:hidden;
  position:absolute;
}
</style>

Eso es todo, un script que busca en el div "content" todos los divs. Y dependiendo de la clase los mostrará u ocultará.

Como dije antes, no me dedico a la programación pero funciona. Si conoces mejores métodos no dejes de compartirlos o señalar las deficiencias de mi script.

Toggling Languages in Posts

Hi, mi first post will be about the Blogspot design. The main reason is I was thinking about creating a blog in two different languages, english and spanish, but without bugging the visitors with double text boxes or such things. My solution, a javascript button which I share with you.

Entries Format

First of all you have to give a special format for each of the entries (or only those those that you want) and put the content under a DIV with a class: "lanEsp" for Spanish, "lanEng" for English.

<div class="lanEsp">
Hola Mundo!
<div>

<div class="lanEng">
Hello World!
<div>

Toggling Languages Button

Buttons are simple links which call to a javascript instead an URL

<a href="javascript:mostrar('espanol');">Español</a>
<a href="javascript:mostrar('ingles');">English</a>

Javascript

Once each post has the format needed (that's why I choose making the script since the beggining) and we have our buttons it's time for making the Javascript and small CSS style. If you know Javascript optimize it, I'm a designer and not a programmer so I'm sure there should be some redundant code in there.

<script type="text/javascript" language="JavaScript">
function mostrar(identificador)
{
  var principal=document.getElementById("content");
  var misdivs=principal.getElementsByTagName("div");
  
  if(identificador=="espanol")
  {
    if(misdivs.length > 0)
    {
      for(i=0; i<misdivs.length; i++)
      {
        if(misdivs[i] != null)
        {
          if(misdivs[i].className=="lanEng")
          {
            misdivs[i].style.visibility="hidden";
            misdivs[i].style.position="absolute";
          }
          if(misdivs[i].className=="lanEsp")
          {
            misdivs[i].style.visibility="visible";
            misdivs[i].style.position="static";
          }
        }
      }
    }
  }
  
  if(identificador=="ingles")
  {
    if(misdivs.length > 0)
    {
      for(i=0; i<misdivs.length; i++)
      {
        if(misdivs[i] != null)
        {
          if(misdivs[i].className=="lanEsp")
          {             misdivs[i].style.visibility="hidden";
            misdivs[i].style.position="absolute";
          }
          if(misdivs[i].className=="lanEng")
          {
            misdivs[i].style.visibility="visible";
            misdivs[i].style.position="static";
          }
        }
      }
    }
  }
}
</script>

CSS

Now we add the CSS style so we will show one of the languages only by default. In my case I picked English for default language.

<style type="text/css">
.lanEsp {
  visibility:hidden;
  position:absolute;
}
</style>

And that's all, a script which search the whole divs under the div named "content" and depending of the class they will show or hide.

As I said before, I'm not a programmer but the script works. If you know better methods please share them or pick my mistakes on my script.

Labels: , , , ,

Primer Entrada

Qué lástima que borré el verdadero primer post, quise editar la foto (que ya no se veía) y lo perdí.

Bueno, pues bienvenidos, en este blog pondré cosas como tips de computadoras, de html y alguno que otro trabajo de ilustración o fotografía.

First Entry

What a shame I lost the real first post, I wanted to edit the picture (which wasn't online anymore) and I lost it.

Well... welcome, in this blog I'll add stuff like computer's tips, html's tips and some occasional illustrations or photography.

Labels: