postIt

        Post-It sticky notes with PasteBin sense

  • 4:57 am on June 15, 2011 | 0 | # |
    Tags: ,

    tcpdump default truncate to 68 bytes snapshot length (snaplen). Use -s 0 to capture all packet length

    tcpdump -s 0 -w /tmp/my240.dump -i eth1 port 2000
     
  • 1:52 pm on February 12, 2011 | 0 | # |
    Tags: , ,

    Unix time conversion

    $ EPOCH=1297515579843
    $ echo $EPOCH | cut -c1-10
    1297515579
     
    $ echo $EPOCH | cut -c1-10 | awk '{print strftime("%c",$1)}'
    Sat 12 Feb 2011 07:59:39 PM WIT
     
  • 4:26 am on January 4, 2011 | 0 | # |
    Tags:

    Read CSS padding clockwise:

    padding:25px 50px 75px 100px;
    shorthand property for:

      top padding is 25px
      right padding is 50px
      bottom padding is 75px
      left padding is 100px

    padding:25px 50px 75px;

      top padding is 25px
      right and left paddings are 50px
      bottom padding is 75px

    padding:25px 50px;

      top and bottom paddings are 25px
      right and left paddings are 50px

    padding:25px;
    all four paddings are 25px

     
  • 7:50 am on December 27, 2010 | 0 | # |
    Tags: , , ,

    WordPress shortcode-escape trick:

    [ to replace "["
    ] to replace "]"

    Remember not to switch from html editor when using it

     
  • 3:55 am on December 16, 2010 | 0 | # |
    Tags: ,

    Remove OpenOffice recovery file


    /home/username/.openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu

    Delete the above

     
  • 8:47 pm on October 21, 2010 | 0 | # |
    Tags: ,

    Check Solaris package source:

    # /usr/sbin/pkgchk-l -p /usr/ucb/ps
    Pathname: /usr/ucb/ps
    Type: linked file
    Source of link: ../../usr/lib/isaexec
    Referenced by the following packages:
            SUNWscpu
    Current status: installed
     
  • 1:00 pm on October 21, 2010 | 0 | # |
    Tags: , ,

    Solaris MD5 checksum
    digest -a md5 -v /path/to/file
    Referenced to the following package: SUNWcsu
    This is an alternative to md5sum that is available in the Solaris 10 companion CD

     
  • 8:04 am on October 21, 2010 | 0 | # |
    Tags: ,

    Wireshark filter out watchdog (DWR/DWA) and CER/CEA
    diameter and diameter.cmd.code != 280 and diameter.cmd.code != 257
    Filter out accounting request/answer (ACR/ACA) and destination IP
    diameter.cmd.code == 271 && ip.dst == 10.201.63.37

     
  • 5:06 am on October 6, 2010 | 0 | # |
    Tags: , ,

    Check route/gateway in Solaris

    # netstat -rn
     
    Routing Table: IPv4
      Destination           Gateway           Flags  Ref     Use     Interface
    -------------------- -------------------- ----- ----- ---------- ---------
    default              192.168.40.1         UG        1          0
    192.168.40.0         192.168.40.91        U         1          2 e1000g2
    224.0.0.0            192.168.40.91        U         1          0 e1000g2
    127.0.0.1            127.0.0.1            UH        1          0 lo0

    If no /etc/defaultrouter set (file not exist), booting will set no default gateway as

    # netstat -rn
     
    Routing Table: IPv4
      Destination           Gateway           Flags  Ref     Use     Interface
    -------------------- -------------------- ----- ----- ---------- ---------
    192.168.40.0         192.168.40.91        U         1          2 e1000g2
    224.0.0.0            192.168.40.91        U         1          0 e1000g2
    127.0.0.1            127.0.0.1            UH        1          0 lo0
     
  • 9:08 am on August 9, 2010 | 0 | # |
    Tags: , ,

    Logging in to console and boot entering non-cluster mode (with -x argument) in a Sparc machine

    $ ssh 192.168.4.200 -l admin
    Password:
    Waiting for daemons to initialize...
    Daemons ready
    Sun(TM) Integrated Lights Out Manager
    Version 3.0.2.50
    Copyright 2008 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
     
    sc> console -f
    Enter #. to return to ALOM.
    {0} ok boot -x
    Boot device: /pci@0/pci@0/pci@2/scsi@0/disk@0,0:a  File and args: -x
    SunOS Release 5.10 Version Generic_139555-08 64-bit
    Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
    Use is subject to license terms.