Posts

How to Change Environment Variable Using Registry Key

See kb104011 You can modify user environment variables by editing the following Registry key: HKEY_CURRENT_USER \ Environment You can modify system environment variables by editing the following Registry key: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Environment Note that any environment variable that needs to be expanded (for example, when you use %SYSTEM%) must be stored in the registry as a REG_EXPAND_SZ registry value. Any values of type REG_SZ will not be expanded when read from the registry. Note that RegEdit.exe does not have a way to add REG_EXPAND_SZ. Use RegEdt32.exe when editing these values manually. However, note that modifications to the environment variables do not result in immediate change. For example, if you start another Command Prompt after making the changes, the environment variables will reflect the previous (not the current) values. The chan...

Speed Up Windows 7 Shutdown

Install Microsoft Windows Performance Toolkit and run the following the collect performance data xbootmgr -trace shutdown -noPrepReboot -traceFlags BASE+DRIVERS+CSWITCH+POWER -resultPath C:\trace After restart, extract shutdown related information from the trace xperf /tti -i "shutdown_BASE+DRIVERS+CSWITCH+POWER_1.etl" -o shutdown_info.xml -a shutdown

Skype Video on Ubuntu

Logitech USB: $ lsusb ... Bus 001 Device 004: ID 046d:08d9 Logitech, Inc. QuickCam IM/Connect Bus 001 Device 005: ID 046d:c31d Logitech, Inc. Bus 001 Device 006: ID 046d:c05b Logitech, Inc. It works with v4l2 sudo gstreamer-properties But Skype 2.2Beta failed to show video. The workaround: LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype

MacBook Pro F11 and F12 on Ubuntu 11.10

After installation, all function keys work out of box except for F11 and F12, which are used for mouse emulation by default. To get those keys back: sudo apt-get remove mouseemu

Online Booking Is Safe

Mahmoud al-Mabhouh, one of the founders of the Izz ad-Din al-Qassam Brigades, was recently found dead in his hotel room in Dubai. Dubai authorities stated they were ruling the death a homicide and according to BBC : Investigators have also discovered that 14 of the suspects had used credit cards issued by MetaBank - a small bank based in the US state of Iowa - to book hotel rooms and pay for air travel.

In-Memory DB, H2 and Python

Our log data is sent to a log server which then saves it in a PostgreSQL database. To prevent the database from growing too large, we periodically remove data older than 24 hours from the database and save it for future query. However, queries on the remaining data is still not fast enough for realtime monitoring. Besides, the vacuum process of PostgreSQL fails to handle gracefully the large number of deletes and slows down our system significantly when it runs. I'd like to replace the whole logging system with a Hadoop-based system. But right now, I need something that can be up and running in 2 to 3 days and has no or minimal impact on the rest of the system. The log server would save all log data into log files. At the same time, it runs a embedded in-memory database that has the most recently log data for our realtime monitoring applications to query. Of the final choices of in-memory databases in H2 , HSQLDB and Apache Derby , I decide to go with H2. Since our monitor...

Setting up BandLuxe C179 on Karmic

I've recently signed up with Singtel's mobile broadband, which uses a BandLuxe C179 HSDPA USB modem. Hers's how I set it up on Ubuntu 9.10: Download Linux driver from http://www.bandrich.com. The file name of the download "C270-Eee-PC_Linux-driver.zip" suggests it's intended for C270. The product id in bandluxe.fdi is wrong, change it to: <match key="usb.vendor_id" int="0x1a8d"> <match key="usb.product_id" int="0x1009"> The kernel module option.ko that comes with the driver doesn't work with 2.6.31 kernel. And we don't need it anyway, so comment out its installation from eeepc3g.sh: #echo "Backup file option.ko" #cp -v ${MODDIR}/kernel/drivers/usb/serial/option.ko ./option-eeepc.ko #echo "Add support of Bandluxe Data Card" #cp -v option-bandluxe.ko ${MODDIR}/kernel/drivers/usb/serial/option.ko Install the driver: $ sudo ./eeepc3g.sh $ sudo modprobe option Plug in the modem. $ lsusb...