These are a few of my hacks. I am posting them in the hope that they will be useful. As with anything free, there are no warranties of any kind. The ones you are most likely to find useful are tcptee and xtctl.

22Feb00: Sorry for the recent breakage. My home directory moved recently and symlinks had to be updated.


attach Get attach.sh

This shell script will try to find packages and add them to your path. Probably only useful within the UNLV College of Engineering.

When called as attach.sh name, it will search for (in order):

/local/name/bin
/commercial/name/bin
/local/anything/bin/name
/commercial/anything/bin/name

When a match is found, it prints out commands to update your PATH and MANPATH. The output is meant to be eval'd, so for example:

% alias attach='eval `attach.sh $*`' # CSH
$ attach () { eval `attach.sh $*`; } # Bourne(-ish) Shells

cdp

This is what I use for a CD player on FreeBSD.

cdp () { cdcontrol -f /dev/acd0c $* }

I guess I just don't know what I'm missing with the big graphical ones. And some people actually write curses CD players thinking they are minimalists. Usage:

  1. Track list:
    [~]0$ cdp i
    Starting track = 1, ending track = 15, TOC size = 124 bytes
    track     start  duration   block  length   type
    -------------------------------------------------
        1   0:02.00   3:35.50       0   16025  audio
        2   3:35.50   3:12.00   16025   14250  audio
        3   6:45.50   3:47.12   30275   16887  audio
        4  10:30.62   3:29.43   47162   15568  audio
        5  13:58.30   3:23.47   62730   15122  audio
        6  17:20.02   3:41.43   77852   16468  audio
        7  20:59.45   3:23.17   94320   15092  audio
        8  24:20.62   4:12.23  109412   18773  audio
        9  28:31.10   3:06.15  128185   13815  audio
       10  31:35.25   2:33.47  142000   11372  audio
       11  34:06.72   4:08.20  153372   18470  audio
       12  38:13.17   3:56.40  171842   17590  audio
       13  42:07.57   2:35.58  189432   11533  audio
       14  44:41.40   3:14.22  200965   14422  audio
       15  47:53.62   2:32.64  215387   11314  audio
      170  50:24.51         -  226701       -      -
              
  2. Play the CD (or a specific track):
    [~]0$ cdp 1
    [~]0$ cdp n
  3. Get the important information the GUI ones display:
    [~]0$ cdp s
    Audio status = 17, current track = 5, current position = 1:25.03
    Media catalog is inactive
    Left volume = 10, right volume = 10
              
  4. Pause/Unpause:
    [~]0$ cdp pa     # pause
    [~]0$ cdp r      # resume
              
  5. Stop (good thing I don't do this much, that's a whole 8 characters to type counting Enter! [of course, I could have called it `c' instead of `cdp' I guess...]):
    [~]0$ cdp sto
              

zurl Get handle_zurl.gz

A Zephyr hack for the truly lazy. This is a Perl5/Tk script with embedded POD documentation. The manpage is actually the main bit, since it tells you how to set up Zephyr to run the (trivial) script.

[Screenshot]


jargon2html.pl Get jargon2html.pl.gz

This was my first substantial Perl program. It does a pretty good job of converting the Jargon File to HTML. You can look at my online copy. Note that there is absolutely no human post-processing involved. That may not seem like a big deal, but take a look at the entry for ASCII art (for example), which most automatic converters slaughter. If you want to help out, find a something that didn't work right and email me.


rwho.sh Get rwho.sh

Instead of the usual broadcast method of handling the rwho command, we use a client-server approach here. The rwho server used to be an ULTRIX machine, which had a nice rwho that would allow you to specify a list of users, and limit output to them uses. After the rwho service was moved to NetBSD, this functionality was lost. Since I got tired of typing ``rwho | grep ^person'' real quick (like the second time), I made this script. It actually uses ``egrep '(^person1|^person2|...)''', so you can use it for multiple people.


tcptee Get tcptee.tgz

Hack that I never finished, but have found extremely useful anyway. Here's the help:

	 Usage: tcptee [options] <local port> [remote host <remote port>]
	 options are:
	   -h, --help                        show this help
	   -q, --quiet                       supress ALL output
	   -w, --windows                     open xterms for server and client
	   -x [file], --translation[=file]   turn on translation
         
If you call it with only a local port, then it will accept connections on that port and allow you to type at whatever is connecting. It's been used in that more for example to play web server while screwing around with various clients. If you call it with a local port and ``remote'' host/port, whenever it accepts a connection on the local port, it will connect it to the remote port on the remote host, and allow you to watch the client and server talk to each other. This is useful for figuring out what a random client or server actually does.

There are 3 translation modules currently:

default.xlt
This one will passthough ``printable'' characters (see the file for what is considered printable), and replace non-printable characters with hex codes.
dots.xlt
Like default.xlt, but prints dots instead of hex codes.
telnet.xlt
Decodes telnet commands, but it's only partially there.

xtctl Get xtctl

So for some bizarre reason, there are people out there writing C programs (with autoconf and RPMs even) just to send tiny escape codes to XTerms. I wrote this (tiny) Bourne Shell script to bring some balance to the world. Here's what it can do:

         xtctl v0.1415927 - slumos@cs.unlv.edu
         usage: xtctl [--help] [<command> <args> [<command> <args> ...]]
             command   args
             title     <window title>
             n         <icon name>
             name      <window title/icon name>
             fg        <foreground color>
             bg        <background color>
             cr        <cursor color>
             hc        <highlight background color>
             mfg       <mouse foreground color>
             mbg       <mouse background color>
             fn        <font name>
             size      <width> <height>
             move      <x> <y>
             raise
             lower
             iconify
             restore
             fullr
             softr
          these are only known to work with Eterm:
             icon      <path to icon file>
             pix       <background file>
       
Some options only work with more recent versions of XTerm, or other *Term(s). There's also a get option which is undocumented because I don't know whether my method is reasonably portable, and not all of the options work yet. I think it has the potential to do some fun (but probably not useful) things. Examples:
       [~]1$ xtctl get csize    # Window size in characters
       80 50
       [~]0$ xtctl iconify; sleep 1; xtctl get state restore get state
       iconified
       open
       

$Id: index.html,v 1.2 2000/01/24 01:58:11 slumos Exp $
Steve Lumos <
slumos@cs.unlv.edu>