Best irssi script EVER

Updated: Download the newest version (2.5.urmom) here.

After adding yet another user to my ignore list in irssi I realized that the channels started getting a little too quiet. Instead of silently ignoring public messages from ignored users I decided to redact their messages instead. The code for redacted_ignore.pl is:

#!/usr/bin/perl

use strict;
use Irssi;

use vars qw($VERSION %IRSSI);

$VERSION = "0.000000001";
%IRSSI = (
authors => 'Blaine Fleming',
contact => 'blaine@selfishman.net',
name => 'redacted_ignore',
description => 'script to redact public messages from ignored users',
license => 'GPL',
url => 'http://selfishman.net',
changed => '2009-11-03',
changes => 'FIRST POST!'
);

Irssi::theme_register(['redact', "{msgnick \$0}" . ""]);

sub do_urmom_in_public {
my ($srv, $msg, $nick, $addr, $tgt) = @_;
$srv->printformat($tgt, MSGLEVEL_PUBLIC, "redact", $nick)
if $srv->ignore_check($nick, $addr, $tgt, $msg, MSGLEVEL_PUBLIC);
}

Irssi::print("redact public messages from ignored users") ;

Irssi::signal_add_first("message public", "do_urmom_in_public") ;

This script is also available for download from here.

To use it just ignore users normally using '/ignore user'.


History meme

I've noticed several other people showing their most frequently used shell commands so here it is from a few of my systems.

One of my spamtraps that publishes all the data to a webpage at http://www.spameatingmonkey.net :

selfishman@spamtrap:~$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head
137   vi
46   ls
39   exit
29   /etc/init.d/qpsmtpd
27   cd
25   dig
23   tail
23   sudo
16   mysql
13   ps

The system that creates the SEM fresh domains list:

selfishman@spammonkey2:~$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head
109   vi
85   ls
35   dig
23   screen
23   rm
20   ./prep-name-zone.pl
17   cd
14   exit
13   cp
10   ./test.sh

Finally, my primary testing and development system:

selfishman@rabidmonkey1:~$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head
72   ls
60   vi
49   time
40   cd
34   exit
29   sudo
24   cat
17   ./john
13   gcc
12   crontab

I don't remember running JTR that often!


Problem with Dell Inspiron 1501 keypress every second

Passmark\'s Keyboard Test on Inspiron 1501

Update: Pull the power cord and battery and let it sit for a while.  You may need to remove the BIOS battery (located under the keyboard) as well. It turns out this was the fix that I accidentally used when ripping apart the laptop trying to figure out the problem.

My primary laptop is a Dell Inspiron 1501 (cheap, I know) and a couple months back it started registering a key being pressed every second. Exactly every second. This made simple things like alt-tabbing through a list of programs difficult as it would cause the alt-tab windows to close. Copying and pasting from a command prompt was almost impossible with less than a second to do it. Programs and dialogs were opening behind other windows, sometimes behind their own parent. Various flavors of linux would even show the '=' key being pressed. The final problem that got me to look into it was when I was doing remote access using VNC to an old Windows 2000 Pro system at the Livingston-Park County Public Library. I clicked on a file and instantly I started getting harassed by Windows to delete the file as the 'delete' key was registering. After a few quick clicks and keystrokes I got out of that and opened up the log I wanted to view. To my surprise the log was being eaten one character every second.

(more…)


Next Page »