jci's blog

Earthquakes can't stop the rock

Escrito el 06/29/08 11:35:01 pm por jci

Escrito el 03:25:13 am por jci

Time for some nut shell commands

Categories: Web Link Blog

jci@zaphod:~$ mkdir test
jci@zaphod:~$ chmod 000 test
jci@zaphod:~$ cd test
bash: cd: test: Permission denied
jci@zaphod:~$ chmod 500 test
jci@zaphod:~$ cd test
jci@zaphod:~/test$ ls
jci@zaphod:~/test$ cd ..
jci@zaphod:~$ chmod 400 test
jci@zaphod:~$ cd test
bash: cd: test: Permission denied
jci@zaphod:~$ chmod 100 test
jci@zaphod:~$ cd test
jci@zaphod:~/test$ ls
ls: cannot open directory .: Permission denied
jci@zaphod:~/test$ cd ..
jci@zaphod:~$ chmod 500 test
jci@zaphod:~$ chmod 400 test
jci@zaphod:~$ cd test
bash: cd: test: Permission denied
jci@zaphod:~$ ls test
jci@zaphod:~$ touch test/test
touch: cannot touch `test/test': Permission denied
jci@zaphod:~$ chmod 700 test
jci@zaphod:~$ touch test/test
jci@zaphod:~$ chmod 400 test
jci@zaphod:~$ ls test
ls: cannot access test/test: Permission denied
test
jci@zaphod:~$ cd test
bash: cd: test: Permission denied
jci@zaphod:~$ touch test
jci@zaphod:~$ ls test
ls: cannot access test/test: Permission denied
test
jci@zaphod:~$ chmod 400 test
jci@zaphod:~$ ls test
ls: cannot access test/test: Permission denied
test
jci@zaphod:~$ ls test
ls: cannot access test/test: Permission denied
test
jci@zaphod:~$ chmod 600 test
jci@zaphod:~$ ls test
ls: cannot access test/test: Permission denied
test
jci@zaphod:~$ touch test/file
touch: cannot touch `test/file': Permission denied
jci@zaphod:~$ chmod 700 test
jci@zaphod:~$ touch test/file
jci@zaphod:~$ ls test
file test

Is this a bug or a feature? Looks like a damn featured bug to me...

Me habria encantado ir a la GUADEC, pero no tengo el que, el por que, el como y el cuando.
Suerte a Claudio y a Pedro que van para alla. Saluden al resto del GNOME crew, de nuestra parte.

"I seem to be having this tremendous difficulty with my lifestyle. As soon as I reach some kind of definite policy about what is my kind of music and my kind of restaurant and my kind of overdraft, people start blowing up my kind of planet and throwing me out of their kind of spaceships!"
Conversacion de hoy por telefono. Srsly.

780 views » Send feedback »

Escrito el 06/26/08 10:44:43 pm por jci

Escrito el 02:39:05 pm por jci

Escrito el 06/24/08 08:20:09 pm por jci

Just picture for a second you want something out of a bad situation

Categories: Web Link Blog

Niños!

Han estado en la oportunidad de que no quieren borrar a alguien de su lista de contactos, les manda mensajes extraños y les quita demasiado tiempo para responder una idiotez del mismo porte que manda?

Pues bien, su amigo Python puede ser de gran ayuda!

Leer la API de pidgin para Dbus puede ser perjudicial para su salud...pero bueh, 20 minutos de lectura, unos cuantos golpes en la cabeza para reajustar las neuronas y programar MAL en Python usando Dive into Python puede ayudar su resto.

Behold!

import re
import dbus, gobject
from dbus.mainloop.glib import DBusGMainLoop

def my_func(account, sender, message, conversation, flags):

        lista = ["jci@reallife.com", "somedullname", "restrained"]
        # reemplace con sus cuentas favoritas
        global a
        a  = 1
        bus = dbus.SessionBus()
        obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
        purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")

        for recip in lista:
                if re.match(recip,sender):        
                        if a == 1:
                                a = 0
                                purple.PurpleConvImSend(purple.PurpleConvIm(conversation), \
"Please, speak to the hand.")
                                # reemplace con su mensaje favorito
                        else:
                                a = 1


a=0
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()

bus.add_signal_receiver(my_func,
                        dbus_interface="im.pidgin.purple.PurpleInterface",
                        signal_name="ReceivedImMsg")

loop = gobject.MainLoop()
loop.run()

Cuentenle a sus amiguitos! Sea el alma de los asados! Impresione a las chicas!
Las pilas se venden por separado.

"No one can help me," intoned Marvin.
"Yes, sir, well ..."
"Not that anyone tried of course."

-- D. Adams, "The Restaurant at the End of the Universe"

Update : Me acabo de dar cuenta de un bug mas que evidente. El que responda primero, con la respuesta correcta (sorry, mis amiwis del planeta GNOME estan descartados por default), tiene premio. Si, premio.

894 views » 4 feedbacks »

Escrito el 06/22/08 01:22:05 am por jci

:: Next >>

Acerca de este glob

On the Sixth Day, there was a Running Man looking for a Predator to stop a Raw Deal with a Commando. Only True Lies were said. But nao, Junior is about to get Twins, with the help of a Kindergarden Cop. That will be the Terminator of all struggles.

Archives