Emacs Lisp

; Emacs Lisp

I have been playing around with the lisp integrated into emacs, rather than one that you bring up with slime and run alongside emacs.  Of course the first big difference is that so much is tied to how you call the function, pass it variables, and what it does.  Many if not all of the games are written in emacs lisp and you can go to help, read about them, and then pull up their lisp source.

sumacheck – downloads patches from IBM and send email

Suma (smitty suma) is a pretty cool automated patch downloader for AIX. I tweaked it a little bit to send me emails only when it finds something new. Just put this in cron and don’t worry about the cron setup through suma itself.

#################################################################
# Title      :  sumacheck - Goes to IBM and gets new patches
# Author     :  John Rigler
# Date       :  01-13-2009
# Requires   :  ksh
#################################################################

/usr/suma/bin/suma -x -a RqType=Latest -a Action=Download \
 -a Repeats=n  > /tmp/$$.sumafile

grep SUCCEED /tmp/$$.sumafile > /tmp/$$.sumasuccess

if [[ $? -eq 0 ]]
 then
   mail -s "New Packages from IBM" userid@company.com \
   < /tmp/$$.sumasuccess
  fi
 
 rm /tmp/$$.sumafile /tmp/$$.sumasuccess
 

Daniel Drake, libusb 1.0 and fprint

A while back I got a microsoft fingerprint reader, hooked it up, became frustrated with it and then installed Ubuntu. Well It turns out that work is in progress to deal with it. So far a fingerprint_demo program exists and can support it with this extra driver: http://www.qrivy.net/~michael/temp/ . The guy that runs this site is Michael Crusoe who says he is a System Administrator who also helps the BioMetrics Industry. Rock on System Admins!!! The temp part of his url is a little scary, but whatever.

So after getting the fingerprint reader demo working, I looked further and found that Daniel Drake is not working on fingerprint reader support but also a new version of libusb. Here is his blog: Reactivated.net

Script to tell me what hosts are down in a list

#! /usr/bin/ksh
#################################################################
# Title      :  pinghosts - Returns status of all hosts
# Author     :  John Rigler
# Date       :  01-09-2009
# Requires   :  ksh
#################################################################



grep -v "^#" $1 | while read HOSTNAME # Only read uncommented lines
  do
    # Execute the ping once and wait 2 seconds
    ping -c 1 -w 2 $HOSTNAME  2>&1 1>/dev/null
    if [[ ! $? -eq 0 ]]
    then
        echo "$HOSTNAME down"
    fi
  done