turn off modline support in vim

I can see a number of security issues with this feature turned on (on by default in Win versions)
set modelines=0
set nomodeline



HPUX verses Solaris

An SA's comparison of HP-UX verses Solaris: 
I'm still biased to HPUX, although this guy makes some compelling arguments: DTrace, p*/process command tools, hardware (path) identification, log rotation, shadow file, patch numbering.  especially the Dtrace and /usr/proc/bin tools.


ssh without being prompted for password

if you have public keys on most of your boxes but not all and are
running a script against all of them, but don't want the script to
just pause at the password prompt, then specify the
"PreferredAuthentications" option:

ssh -o PreferredAuthentications=hostbased,publickey

I couldn't get the PasswordAuthentication=no option to work, so the
above saved me


making skype portable

To make skype run on a usb flash drive or some other portable device follow the following:
  • First...Download the NEWEST version of Skype (Older versions won't work) and install it on any computer as normal.
  • Find the Skype.exe from where it was installed.
    (Usually C:\Program Files\Skype\Phone\Skype.exe )
  • Copy the Skype.exe file to any directory on your USB Drive
  • In that new directory create a directory called "data"
  • Now create a file (with notepad) called "skype.bat"
  • Edit the "skype.bat" file and place the following line there:
    skype.exe /datapath:"Data" /removable


    /tmp on Solaris 10

    On Sun Solaris 10, /tmp is a tmpfs type file system.  It is supposed to make reads/writes to the temp filesystem fast, but there are some caveats:

    Swap Space and the TMPFS File System
    The TMPFS file system is activated automatically in the Solaris environment by an entry in the /etc/vfstab file. The TMPFS file system stores files and their associated information in memory (in the /tmp directory) rather than on disk, which speeds access to those files. This results in a major performance enhancement for applications such as compilers and DBMS products that use /tmp heavily.
    The TMPFS file system allocates space in the /tmp directory from the system's swap resources. This means that as you use up space in /tmp, you are also using up swap space. So if your applications use /tmp heavily and you do not monitor swap space usage, your system could run out of swap space.
    Use the following if you want to use TMPFS but your swap resources are limited:
    Mount the TMPFS file system with the size option (-o size) to control how much of the swap resources TMPFS can use.
    If you are close to running out of swap space, you can use your compiler's TMPDIR environment variable to point to a larger, real directory.
    Using your compiler's TMPDIR variable only controls whether the compiler is using /tmp or not. It has no effect on other programs' use of /tmp.



    hyperlink formulas in excel

    to add a hyperlink formula in excel:
    where 'sheetname' is the name of the worksheet and
    'A999' is the the cell to link to
    the pound sign, # is _Necessary_


    allow control D keyboard sequence to work

    the EOF key (generally control D) gets trapped/ignored by the shell on some systems.  Here's how to turn that off:
    hit control-D
    server$ Use 'exit' to logout

    server$ set -o | grep ignoreeof
    ignoreeof        on

    server$ set +o ignoreeof

    server$ set -o | grep ignoreeof
    ignoreeof        off

    server$ hit cntl-D


    automatically adding ssh keys to known hosts file

    automatically adding host's ssh fingerprint to the known_hosts file:
    -o StrictHostKeyChecking=no
    ssh -o StrictHostKeyChecking=no SecretServername


    putty command sender

    Putty Command Sender:  http://www.millardsoftware.com/puttycs

    Sends keystrokes to putty windows.  Filters allow selection of putty sessions/windows to which the commands are sent.  You can exclude/include and use wildcards in the filter.  I don't think it supports regular expressions other than * and ?  Allows arrow keys, control characters, and a lot more.

    Be real careful when using this, experiment first on lab systems.

    how to add a bulk load of putty sessions

    add bunch of putty sessions.  This requires cygwin base install which includes the sed command.  Be sure to add \cygwin\bin to the path:
    create a "template" putty session with all the settings you want.  go into the registry and export the session: HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\session_name

    put a list of machine names in test.txt

    then in dos:

    for /f %a in (test.txt) do type m.reg | sed -e 's/Template_NAME/%a/g'>> all.reg

    These sessions can then be used in putty session manager or any of the other putty related tools.


    free SSH client for iPhone / ipod touch

    a truly free SSH client for the iphone or ipod touch:  "The Rove Mobile Admin Client" aka "Mobile Admin"; search for it in the app store.  Not too many features, but it's the only free SSH client I've seen for the itouch.


    disable password aging HP-UX

    HPUX password aging disable:

    passwd -x -1 user_id

    for i in user1 user2 user3
    passwd -x -1 $i


    differences trying to retain ownership/permissions on HP-UX and nfs

    on HP-UX (by default anyway), you can change ownership of a file as a normal, non-root user. This means you can do a cp -p to copy files retaining permissions and ownership on HP-UX file systems. However, if using NFS, be aware that the underlying NFS server's operating system controls privileges to file ownership. Therefore most Linux/Solaris/NAS boxes that are NFS servers and mounted on HP-UX, will not allow a successful cp -p for retaining ownership (or chown by a normal non-root user).

    Specifically it can be an issue on EMC Celerra NAS servers, but there's a way to change it:
    To change this behavior you can change the Celerra server parameter, rstchown to 0, the default is 1.

    Here's a copy someone posted: http://www.scribd.com/doc/6116381/Celerra-Network-Server-Parameters-Guide-5639-A03

    Sets restricted file ownership.0 = Allow the owner of a file to change the file ownership or group ID to any other owner or group because chown and chgrp follow the less restrictive POSIX semantics.1 = Allow only the superuser to change the owner of a file. The current owner can change the group ID only to a group to which the owner belongs.This parameter applies to NFS, but not to CIFS.


    how to determine if usb alfa awus036h is 500mw or 1 watt

    Ways to tell the difference between 500mw and 1W version of the awus036h:
    from: http://forums.remote-exploit.org/general-discussion/28841-how-test-alfa-awus036h-500mw-1w.html (forums appear to be down now)

    The Alfa 1000mW(1W) has a 1 in cased in a circle stamped on the front the 500mW does not
    shine light on LED, the PCB will be blue


    adding secondary IP interface and IP index number to APA

    just put the IP in netconf using the Physical PPA lan port (like normal), then when APA starts, it will bind it to the APA port

    if adding a secondary IP once APA is already running: bind it to the APA PPA (lan900)  as follows:
    ifconfig lan900:1 up

    HPUX routing and the ip_strong_es_model network tunable

    A "graypaper" on  understanding HP-UX routing including details on ip_strong_es_model tunable: http://www.mayoxide.com/presentations/Understanding_hpux_routing.pdf

    Best description of the ip_strong_es_model tunable via this ITRC link: http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1267461248860+28353475&threadId=1126880
    ip_strong_es_model is used when you want to configure multiple, physical NICs in the same IP subnet, and/or want the functional equivalent of per-source IP routes.


    truecrypt rescue disk on usb


    and to skip iso check use the /noisocheck or /n  switches on truecrypt or mount the ISO using a virtual cd driver

    contents of first link:
    Here is how:

    1. Format your USB stick from Windows: FAT, Quick, Default Allocation Size.

    2. Download Grub4DOS from: http://download.gna.org/grub4dos/
    Choose latest version. Here is the one I got: http://download.gna.org/grub4dos/grub4dos-0.4.4-2009-06-20.zip

    3. Download Grub Installer from: http://download.gna.org/grubutil/
    Choose latest version. Here is the one I got: http://download.gna.org/grubutil/grubinst-1.1-bin-w32-2008-01-01.zip

    4. Extract them on your hard disk. Run: grubinst_gui.exe

    5. Click DISK. Choose your USB stick. Go 2 boxes down and click REFRESH. On the PART list, choose "WHOLE DISK (MBR)". Make sure everything else is unchecked below.

    If it says something about --skip-mbr-test, type: "--skip-mbr-test" without quotes in EXTRA box.

    Click INSTALL. DOS box should pop up and tell you it transfered MBR.

    6. Copy: file "grldr" from your extracted files to your USB stick.

    7. Create a text file in the root of your USB stick and name it: menu.lst

    Put inside:

    find --set-root /tc.iso
    map --mem /tc.iso (hd32)
    map (hd0) (hd1)
    map (hd1) (hd0)
    map --hook
    root (hd32)
    chainloader (hd32)

    And save the file.

    8. Copy TrueCrypt Rescue Disk (the iso you created during system encryption) to root of USB and rename it to: tc.iso

    If you don't have the iso, go to TrueCrypt program: SYSTEM > CREATE RESCUE DISK... Follow hte prompts and copy that file to USB and rename it to tc.iso

    That is all.


    disable negative dns caching

    Sprint Novatal 2200 mifi devices seems to produce a lot of negative (unsuccessful) dns responses, so just disable the negative caching on windows XP.....



    eFax - Free trial - not really free

    eFax offers a "free" 30 day trial.  Though the signup process you are not told how many pages can be sent or received for free.....

    I got two charges for sending over 30 pages ($10 in overages).  When I went to cancel, they said they'd only refund the normal fee ($10).

    Decide for yourself if it's worth dealing with a company that isn't up-front with their terms......


    EMC ECC and Naviagent problems and fixes

    Cloning or renaming a system can have some consequences on EMC products like EMC Control Center/ECC  or Navisphere agent for Clarrion arrays:

    ecc fix:
    rm -rf /var/ECC
    cd /usr/ecc/exec && rm -f *.COMFILE *.comfile *.uid *.port *.lck

    Navisphere agent / Naviagent fix:
    stop naviagent and delete HostIdFile.txt:
    /sbin/init.d/agent stop ; rm /etc/log/*