AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090522140438.2e9700c0@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<rendell.fong@onstor.com>,<dl-development@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 22 May 2009 14:05:57 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Rendell Fong <rendell.fong@onstor.com>, dl-development@onstor.com
Subject: pointers to some of my toolz
Message-ID: <20090522140557.37aa6d43@ripper.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

I was going to send this to just Rendell, but then I figured, hey, why
not everyone?  Heck, they all have a [DELETE] key ~:^)

Feel free to copy these to your own directory and use/modify at will:

in ~andys/bin, you can find such things:

-rwxr-xr-x    2up-c
-rwxr-xr-x    2up-txt

these format plain text or C code for non-broken 2-up printing style
output in postscript which can be piped directly to lpr (here at
onstor) or saved to a file and viewed with gv command or similar.

-rwxr-xr-x    backup-home.sh

back up home directory on mightydog to local disk

-rwxr-xr-x    bc-g1r10-off
-rwxr-xr-x    bc-g1r10-on
-rwxr-xr-x    bc-g7r9-off
-rwxr-xr-x    bc-g7r9-on
-rwxr-xr-x    bc-offon-g1r10
-rwxr-xr-x    bc-offon-g7r9
-rwxr-xr-x    bc-offon-plez
-rwxr-xr-x    bc-plez-off
-rwxr-xr-x    bc-plez-on
-rwxr-xr-x    bcoff2
-rwxr-xr-x    bcoffon
-rwxr-xr-x    cg-g8r10-off
-rwxr-xr-x    cg-g8r10-on
-rwxr-xr-x    cg-offon-g8r10
-rwxr-xr-x    cg-offon-plez
-rwxr-xr-x    cg-plez-off
-rwxr-xr-x    cg-plez-on

these all turn on or off or cycle the power to various lab machines
edit before using, please!  yes, your machine has to be specially set
up for remote power operation.

-rwxr-xr-x    cleanup.sh

no freakin idea what this does.  what does "clean" mean?

-rwxr-xr-x    convert_real_to_seconds

the output of the "time <cmd>" command includes [real] [user] and [sys]
times.  this script converts the [real] part from minutes and seconds
to seconds

-rwxr-xr-x    debdiff-true

compares the contents of two .deb package files.  even has a huge usage
message.  dang.

-rwxr-xr-x    diff-2-kernel-trees

sounds self explanatory

-rwxr-xr-x    grep-opened-files.sh

greps for a pattern only in the files you have open in perforce; feature
laden even.  takes a changelist as an argument.

-rwxr-xr-x    grep-tag

this is the one that greps just the tag field of a tags file in your
current directory

-rwxr-xr-x    header_tree 

non-working script that is supposed to lay out the include hierarchy
of a C or .h file, by following all the nested includes, skipping
duplicate includes and whatnot.  currently broken, but once mostly
worked.  takes "-I <directory" arguments just like the C compiler, and
the last argument is the name of a file to start with.

-rwxr-xr-x    kcscope

run cscope, but with kernel-useful options, including assuming that
your cscope files have already been created and are up to date.

-rwxr-xr-x    p4changes

list your open perforce change lists, including the first part of the
checkin comment

-rwxr-xr-x    p4havenot.sh

try to help you identify files that are NOT under perforce control in a
particular hierarchy.  useful if you have a program that creates files
behind your back that you have to gather up and get into perforce,
like git.  arguments and options of find; outputs list on stederr.

-rwxr-xr-x    p4revert_unchanged.sh

takes a changelist, and removes the files in it that are not actually
changed.  largely not needed as newer version of perforce seems to have
closed the bug where this option wasn't perfectly handled every time

-rwxr-xr-x    review-new-script.sh

the famous and useful review script

-rwxr-xr-x    review-old-script.sh

version of the review script that is better at reviewing changelists
that have already been checked in.  hence the 'old' name.

-rwxr-xr-x    review-script.sh

some old version of the review script that should likely be deleted

-rwxr-xr-x    scale-factor.sh

helps you calculate the scale factor for an operation performed once in
single threaded mode and once in multithreaded mode.  guaranteed to be
perfectly correct under all circumstances. ~:^)

-rwxr-xr-x    tgrep

a version of grep-tag that tries to print out the matches for your RE
along with the file name that tag was found in.  can be kinda useful
if your RE finds a lot of matches because you can easily identify and
eliminate matches that map back to driver files and so forth that have
nothing to do with your query.  probably should be combined with
grep-tag in some useful way.

-rwxr-xr-x    xcapture.sh

will capture a jpeg screenshot of a window in X.  requires several
specific packages be installed on your machine.  but is very handy.
outputs to the filename specified on the command line.

