Category Archives: Uncategorized

Creating script with arguments and options

  while getopts ":pq:" optname
    do
      case "$optname" in
        "p")
          echo "Option $optname is specified"
          ;;
        "q")
          echo "Option $optname has value $OPTARG"
          ;;
        "?")
          echo "Unknown option $OPTARG"
          ;;
        ":")
          echo "No argument value for option $OPTARG"
          ;;
        *)
        # Should not occur
          echo "Unknown error while processing options"
          ;;
      esac
    done

Start/Stop/Reset/Reboot ESX 5x VM from command line

To power on a virtual machine from the command line:

  1. Get VM ID with the command:
    1
    
    vim-cmd vmsvc/getallvms
  2. Check the power state of the virtual machine with the command:
    1
    
    vim-cmd vmsvc/power.getstate <vmid>
  3. Power-on/Restart/Reset/Poweroff using:
    1
    2
    3
    4
    
    vim-cmd vmsvc/power.on <vmid>
    vim-cmd vmsvc/power.off <vmid>
    vim-cmd vmsvc/power.reset <vmid>
    vim-cmd vmsvc/power.reboot <vmid>

Center NextGen Gallery

If you need to center a NextGen Gallery (I don’t know why there isn’t a feature in there somewhere about this) go to NextGen Gallery -> Other Options -> Styles -> Show Customization Options and add the text below:

1
2
3
4
5
6
7
.ngg-galleryoverview {
text-align:center;
}
.ngg-gallery-thumbnail-box {
float:none !important;
display:inline-block;
}

Hello world!

I finally decided to start this blogging business…

I wanted it for a long time, but couldn’t get myself to start. But today, although it wasn’t even close to a usual day, i managed to squeeze in the installation an configuration of the blog. It’s not fully configured, but at least it’s something. I will get the site looking good and with all the extensions working, but it will take a little time.

In the mean time… Happy surfing the WorldWideWeb! 🙂