February 2009

How to set ThinkPad's brightness in linux (raw command)

Reference: http://www.thinkwiki.org/wiki/LCD_Brightness

Full brightness
echo 100 > /proc/acpi/video/VID1/LCD0/brightness

Totally Dim
echo 20 > /proc/acpi/video/VID1/LCD0/brightness

Note: brightness value must be in this set [20, 30, 40, ... 100]

Common Practice: PHP Programming

  • เรียก exit() หรือ die() ทุกครั้งหลังจากสั่ง header('Location: ...'); เพื่อ redirect ทันที (แต่ถ้ายังต้องการการ execute คำสั่งต่อไปจนจบ ก็ไม่จำเป็นต้อง exit)

VMware ESXi shell command

Reference from vim-cmd of VMware ESX Server 3i 3.5.0 build-123629

Get help: vim-cmd help or vim-cmd -h

Guest VM control command

Commands available under vmsvc/:
acquiremksticket          get.configoption          power.off                 
connect                   get.datastores            power.on                  
convert.toTemplate        get.disabledmethods       power.reboot              
convert.toVm              get.environment           power.reset               
createdummyvm             get.filelayout            power.shutdown