wp-cache and wordpress 2.5

Tried to enable wp-cache on word press tonight. Seems that the option to disable the gzip compression is missing from the settings/misc page. So to disable it (so you can enable wp-cache), I had to do the following:

1. Find the option number of the gzipcompression option in your wordpress table:

select * from wp_options where option_name='gzipcompression';

2. Update the option value to 0 (it is probably 1 now), use the option_id number you got from the first command:

update wp_options set optionvalue='0' where option_id='41';

Your gzipcompression should be disabled now and you should be able to enable wp-cache.

Weird survey

Tonight I got a survey from E-Rewards. Started taking it and it delt mostly with Cable tv. Then all of the sudden this question pops up:

Not sure what this had to do with cable television, but when I checked all of the items in the first column, it then said I was not eligible to finish the survey.. Guess they only wanted smelly people?

How to calculate yesterday

I was working on a shell script last night and needed to calculate the value for yesterday. I did not have access to GNU date, so using that is out of the question. All I could use was what was available to me in a default install of Solaris 10. So I decided to use Perl as such (note that the YESTERDAY should all be on one line):

YESTERDAY=$(perl -e '@y=localtime(time()-86400);
printf "%04d%02d%02d",$y[5]+1900,$y[4]+1,$y[3];$y[3];')

What this will do is store the value of yesterday in a shell variable called YESTERDAY
Now I have not done perl in a long while so here is an explanation of what it does:
1. Runs the perl function time which will find the current time, then subtract 86400 from it (24 hours).
2. Next it is run through the localtime function which creates an array that has the following values:

Array Element Value
0 Seconds
1 Minutes
2 Hour
3 Day of Month
4 Month of year (0=January)
5 Year (starting at 1900)
6 Day of week (0=sunday)
7 Day of Year (0..364 or 0..365 if leap)
8 Is Daylight savings time active

So in my little script above, we are looking for fields 5, 4 and 3. I add 1900 to the value of 5 (in this case 5 = 108). I add 1 to the value of 4 to get the current month (3+1 = 4 = April). The values are then pushed through printf so that we have a 4 digit year with leading 0’s, a 2 digit month with leading 0’s and a 2 digit day with leading 0’s. So the value of my YESTERDAY variable will now show 20080418.

Hope this helps some one else.

No wonder it is cold outside

This week the weather has went from 77 degrees to 40… I think it is beause Com(pression)cast has actually done something good… They finally made the local broadcast channels that are in clear QAM show up on the channel numbers they should be. So instead of using 108.2201 for the local NBC affiliate, now you just have to use 11.1 which makes much more sense. Now if they would just make the rest of the channels in the clear it would really make my day.

One year anniversary

Hard to believe that this past week was my one year anniversary of working at my new job. A ton of things have happened in that one year, both good and bad, both work and personal related. Just wonder what the next year will bring. Time sure does fly any more. It seems to get faster and faster every year now.