WP-Cache2 is a great way to speed up high-trafficked WordPress sites by caching their output as static pages. The only downside is that you have to turn off gzip compression in WordPress, which can actually make some pages slower to download. Wouldn’t it be great if you could have the best of both worlds? It appears that you can.

I think the problem was that with WP’s gzip turned on, it was caching the gzipped output. I edited wp-cache-phase1.php and put in the following:

if ( extension_loaded('zlib') ) ob_start('ob_gzhandler');

right above this line:

foreach ($meta-»headers as $header) {

And it seems to work beautifully. That caches the plaintext, but gzips the text before delivering on cached hits. Might work for people who can’t mess with server configuration files.

Today I am trying to use remote desktop back to my home pc (windows 7) and suddenly an error message pops up “Atbroker.exe application failed to initialize properly” and after I press Ok it will just be black screen. I try to login again multiple times, and the error still persists. Finally I try to press Ctrl + Alt + End and logoff myself then login again and the error is gone. I try to google around that the alternative solution will be press Ctrl + Alt + End and then choose task manager. This can also solve the problem.

Today I got my hands on the newly release Ubuntu 10.04 LTS and I decided to try to install it on my VMWare to check it out. The installation is a breeze. Then I reach the gdm login page and I try to type in my password to login. However no matter what I press on the keyboard the system got no response at all. I got no choice but to use the virtual keyboard (the little man in the circle) to type in my password. Don’t worry if you didn’t see the virtual keyboard when you first enable it, you just need to reboot the vm and it should appear. After you login just launch a terminal and edit the file /etc/default/console-setup then find the settings below:

XKBMODEL=”SKIP”
XKBLAYOUT=”us”
XKBVARIANT=”U.S. English”
XKBOPTIONS=”"

change it to settings below:

XKBMODEL=”pc105″
XKBLAYOUT=”us”
XKBVARIANT=”"
XKBOPTIONS=”"

Then just reboot your vm and your keyboard should be working fine on the gdm and you can disable the virtual keyboard.


I know that we can make the MSSQL Database online and offline using the management console GUI but how about using the T-SQL? It is actually not that difficult and should be more efficient too since we can write this into a script and provide more flexibility for the startup and shutdown process. Below is an example:

-- Create Test DB
CREATE DATABASE [myDB]
GO
-- Take the Database Offline
ALTER DATABASE [myDB] SET OFFLINE WITH
ROLLBACK IMMEDIATE
GO
-- Take the Database Online
ALTER DATABASE [myDB] SET ONLINE
GO
-- Clean up
DROP DATABASE [myDB]
GO

Recently when I open up my Microsoft Outlook 2007 and try to send an email, I received an error pop up saying there is a problem with
C:\Documents and Settings\xxx\Local Settings\Application Data\Microsoft\Outlook.pst and to run
scanpst.exe to fix it.

So I try to first launch the search for scanpst.exe but the search return without result. In the end I found the file in

C:\Program Files\Microsoft Office\Office12\scanpst.exe

I run the scanpst.exe and browse for the outlook.pst and it fix the error and I can run my outlook without problem.

Recently I was assigned to perform a data patch on the production database that involved account department and application team. The account department just provided me an excel file with pivot table and a long list of data. I need to figure out the table involve and relationship myself. What I learn from this task is try to prepare a sql cheat sheet first so sql command will be you least concern. Below are what I prepare for my own task on Microsoft SQL Server, yours might be different from mine depends on your task and DB used.

Read the rest of this entry »

About this blog

This is a place I create just for fun and to write down some experience and notes for myself. So feel free to enjoy and drop any comments you have. I had been employed as Programmer, System Analysts, System Administrator, DBA and Project Manager. I will share some of my case study here as well. Enjoy!

 

Calendar

July 2010
M T W T F S S
« May    
 1234
567891011
12131415161718
19202122232425
262728293031