January 2009 Archives

2009-01-31 16:38:03

Geballte Kompetenz

Heute Nachmittag, gegen ca. 16.00 Uhr kam die schreckliche Wahrheit ans Licht: Jede von Google indexierte Seite kann ihren Computer beschädigen!!!1elf
Wer das Ganze verpasst hat, kann glücklicherweise immer noch auf die nun folgenden Screenshots zurückgreifen. *g*

google web
foobar x-haui


Posted by haui | Permanent Link | Categories: misc

2009-01-12 23:37:15

Graphical notifications for centerim

Using centerim's external configuration file makes it pretty easy to get notified about incoming messages. However, if you would add something like the following to your ~/.centerim/external, you'd be informed about *every* single incoming message, which doesn't make much sense, at least not in my eyes....

%action  notification
event msg
proto all
status all
options nowait

%exec
#!/bin/bash
#msg=`cat`
nick=$(head -n 1 $CONTACT_INFODIR/info)
echo "new message from $nick"  | dzen2 -bg red -fg white -p
To deal with this problem, I wrote two small perl scripts: centerim_notify.pl & offline.pl.
The first one caters for the notifications and stores the screen name of your IM-buddy in a hidden file (~/.centerim/.seen) so you won't get notified again. The latter removes a chat partner from the list, when he logs off.
So, here's how to use it:
  1. Save both scripts to ~/.centerim/scripts/ and make them executable (chmod +x ...)
  2. Put the following into your ~/.centerim/external:
    %action  notification
    event msg
    proto all
    status all
    options nowait
    
    %exec
    #!/bin/bash
    nick=$(head -n 1 $CONTACT_INFODIR/info)
    ~/.centericq/scripts/centerim_notify.pl "$nick"  
    
    %action offline 
    event offline
    proto all
    status all
    options nowait
    
    %exec
    #!/bin/bash
    nick=$(head -n 1 $CONTACT_INFODIR/info)
    ~/.centericq/scripts/offline.pl "$nick"
    
  3. Create a bash alias that deletes the "seen-file" everytime you launch centerim:
    echo "alias centerim='rm -f ~/.centericq/.seen && centerim -o'" >> ~/.bashrc
    
  4. Run centerim!
Requirements: dzen2, perl and centerim ;-)

Posted by haui | Permanent Link | Categories: linux, scripts

2009-01-02 21:30:18

yaydl 0.9.0a

Time for another update - yaydl 0.9.0a is now capable of reading URLs from STDIN, permitting shell commands like the following one:

yaydl.pl --stdin < file_containing_multiple_urls

Additionally, I fixed some minor bugs affecting the routines for vimeo/metacafe/google.



Posted by haui | Permanent Link | Categories: projects