Code and Unix tips
All code here is licensed under the GPL, if not noted otherwise.
updatebackground.sh - a
small utility to display a new background every now and then - can
run a program and/or pick a random weighted file to display.
picknewbackground.sh -
used by above to randomly select a picture or program.
.update-backgroundrc -
rc file to put in your home directory for above programs - make
sure it is acutally named .update-backgroundrc
colorgrep - I got used to things
like colordiff (and hooking that into cvs to get cvscolordiff),
and I decided that grep needed a color flag too. It can highlight
lines that match, highlight the actual match within each line that
matched, or just highlight only each match within each line.
weather - a small utility that
displays the weather in an australian city in a small gnuplot
window at the bottom of your screen. Change the internal URL to
point to the Bureau of Meteorology webpage for your city, and it
displays the last 72 hours, as well as keeping a permanent history
for later perusal - see the yearly trends! (screenshot here)
progressbar - A progressbar
that accepts input from stdin, and outputs either to a Gtk based
app, if Gtk-perl is available. Gtk-perl and Timer::Hires are both
recommended, but this will still function without them). Needs mycommon.pm but only because it
defines max/min. Just define these yourself, and you are happy (or
place mycommon.pm in @INC).
mycat - A perl program that can
transparently cat a text/gzip/bzip2 file. It can also exit a
specific exit code if it is text, to tell caller that the file is
a text file and can be open directly (so caller can then make use
of seek, and doesn't need to read through an external program
slowing things down). Needs mycommon.pm for the actual zcat
routine. Place in @INC, and you are away.
mailoops - A perl program that
mails any oops or bugs, that are sent to /var/log/syslog. Put in
/usr/local/bin, and then install init.d/mailoops in /etc/init.d as
appropriate (and set up the relevant links in /etc/rc*.d), to
start mailoops automatically at boot. Newer kernels automatically
decode the oops traces, so you don't need a separate ksymoops
utility anymore. This program runs through the current log, so you
will get any oopses that happened any number of boots ago, as long
as it is in the current log - just in case the oops caused a crash
and reboot. It automatically includes a minute of context on
either side of the error. It could be trivially modified to look
for other strings that just oops or bug, so you could detect
conditions appropriate to your system - only tested on debian
though (other systems probably use /var/log/messages instead of
/var/log/syslog - just change the relevant line)
genface.sh - a small utility used
to generate x-faces for Unix news and mail clients.
xemacs - xemacs dot files and
configuration files that may or may not include usefull things.
nfs-bind.txt - Using NFS and bind
mounts to their full advantage, so you can apt-get upgrade on a
very small RAM machine.
Fortran: Bits and pieces of fortran
routine I find useless^H^H^H^Hful.
Back home....
- Tim Connors
Last modified: Tue Dec 21 14:15:17 EST 2004