Archive for the ‘ Hacks ’ Category

Engineering Weight Loss

Wired’s HowTo wiki has a pretty good weight loss tip that goes straight to my usual argument on “bottom line” calories. I advocate that it does not necessarily matter what you eat, as long as you stick with moderation, and understanding calories-in should equal calories-out. Eat only what you can burn. I am not a Dr. I am not an expert… but it would be common sense that your body will burn only what it needs. The rest will go to fat, right?

The tip:

1. Multiply the pounds you want to lose by the number of calories in a pound of fat: 10 x 3,500 = 35,000.
2. Divide the total by the days you’ll diet: 35,000 ÷ 60 = 583.
3. Calculate your Basal Metabolic Rate 100 calories per pound of body weight
4. Calculate your calories expenditure from exercize
5. Then use the formula (BMR+Exercise)-diet=total allowed calories

It has some other useful info on there about tips to rediscover your full limit at meal time. I might try this just to see how it works:

Try this: One night, eat only half the amount of food on your plate. Wait 30 minutes, assess your feelings of satiation, and then wait 90. If you’re still not hungry, you’ve probably been overeating. Most people grossly overestimate the amount of food they need to feel full, says Dr. David Kessler, author of The End of Overeating. A sensible meal will keep you full for four hours, and a sensible snack, for two. Experiment with reducing your portion sizes, and serve yourself those meals on smaller plates or bowls.

vSphere 4.0 client bug with Windows 7 x64

I am running Windows 7 Enterprise x64, and I just deployed my first vSphere box into my production environment. I have a smattering of 3.5 boxes out there, and the previous client works just fine on Windows 7.

Not the vSphere 4 client. Piece of crap. Throws up errors on login:

Error Parsing the server “host ip” “clients.xml” file. Login will continue contact your system administrator.

The irony there is that I am the system administrator. Click ok… then:

The type initializer for “VirtualInfrastrcture.Utils.HttpWebRequestProxy” threw an exception.

Thankfully a quick Bing/Google search popped the answer from the VMware communities… it is all because of a single dll in .net framework that the client relies on.

Browse to the install directory of the client: C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\ and create a folder called “Lib”.

Obtain a system.dll file from a .net Framework 3.5sp1 install on a XP/2003 machine (found in %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\system.dll).

Copy the system.dll to the folder you created: C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib\system.dll

Then open the client app vpxclient.exe.config file and add a element with a development mode set to true within the bounds of the element (be sure to enclose each line in <>).

configuration
...
runtime
developmentMode developerInstallation="true"/
/runtime
/configuration

Then create a batch file to start up the app… like vpxclient.bat and put these lines in:
SET DEVPATH=C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib
"C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe"
exit

Start the client with the batch file… works like a champ.

Firefox video lag fix

In Firefox about:config, browser.sessionstore.interval change from 10000 to 120000 to stop video streaming lag, per here:

Many users, myself included, visit YouTube on an almost daily basis. Ever since Firefox version 2.0 implemented the session restore function, when you are watching a video on YouTube (perhaps on other video sites as well, I haven’t really tested that), you may notice a tiny freeze-up of the video every 10 seconds or so. This happens because the session restore is by default set to save all open tabs every 10 seconds. This is especially noticeable if you happen to have a lot of tabs open at once.

The quick fix for this problem, at least for my own sake, is to increase the time between each of the saves performed by session restore. By opening about:config in your Firefox address bar, then typing browser.sessionstore.interval in the filter box, you’ll see a value of 10000, which is in milliseconds. (Meaning your session is saved every 10 seconds.) I changed this to 300000, or every 5 minutes, as I don’t have the urgent need for tab restoration. If you feel like being more on the safe side, try increasing it to something a bit lower, say 120000, or every 2 minutes.

User Account Control Error in Vista x64 Enterprise

Try this weirdness on for size.

I was troubleshooting a bad application install on my Vista x64 box here at work a couple weeks ago, made a couple application-related registry deletions. Nothing major.

And UAC re-enabled itself. I started getting prompts for application use, scripts, etc.

The weird part?

Going into the User Accounts Control Panel applet, and UAC was deselected. Vista was saying that it was disabled, yet I was still getting prompts. I would select it, reboot, check and it was back to deselected. It was stuck on, yet the control panel was stuck with box unchecked (meaning it should have been off). No GPO for Vista on my domain, no overriding apps.

WTF?

So I ran msconfig, clicked the Tools tab, and launched the Disable UAC script. Rebooted.

Fixed.

Weird. Weird. Weird.

And I checked the registry after the boot (I should have checked it prior to see if the value was different), but after the reboot, the registry confirmed it was truly disabled.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA == 0 (disabled).

Another day, another Microsoft bug.

FasterFox and tweaking Firefox yourself

I was disappointed when I upgraded to Firefox 3 and found that one of my favorite extensions was killed. FasterFox was one of those tweaks that really made a difference in browsing speeds.

Then I stumbled across this today.

Reduce the amount of RAM Firefox uses for its cache feature

  1. Type “about:config” (no quotes) in the adress bar in the browser.
  2. Find “browser.sessionhistory.max_total_viewer”
  3. Set it’s value to “0“;(Zero)


Increase the Speed at Which Firefox loads pages

  1. Type “about:config” into the address bar and hit Enter.
    (Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.)
  2. Alter the entries as follows:
    • Set “network.http.pipelining” to “true”
    • Set “network.http.proxy.pipelining” to “true”
    • Set “network.http.pipelining.maxrequests” to some number like 10.
    • This means it will make 10 requests at once.
  3. Lastly, right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0“;.(Zero)
  4. This value is the amount of time the browser waits before it acts on information it receives. If you’re using a broadband connection you’ll load pages faster now.

Optionally (for even faster web browsing) here are some more options for your about:config (you might have to create some of these).

  1. network.dns.disableIPv6: set “false”
  2. “content.notify.backoffcount”: set “5“; (Five)
  3. “plugin.expose_full_path”: set “true”.
  4. “ui.submenuDelay”: set “0; (zero)

This little hack will drop Firefox’s RAM usage down to 10 Mb when minimized:

  1. Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
  2. Right Click in the page and select New -> Boolean.
  3. In the box that pops up enter “config.trim_on_minimize”. Press Enter.
  4. Now select True and then press Enter.
  5. Restart Firefox.

Installing HP Insight Management Agents on ESX server

Why there is not a definitive guide on the Internet I do not know. HP’s site for the install is horribly vague, and the VMware site is similarly vague, referencing the HP site.

Oh yeah that helps. Since I am not a linux geek by any measure, it was a bit frustrating. So I had to write my own. For anyone that happens to trip here from google, enjoy. These are written for the uninitiated.

Installing HP Insight Management Agents on ESX Server

In this case, I am using HP Insight Management Agents for VMware 8.1.0 (available here). I am also using ML370 G5 and DL380 G5 Proliant servers with VMware versions 3.0.1, 3.0.2, and 3.5 and a pre-existing HP SIM server running in my Windows Server environment.

(Click through for the full instructions)

Read more

Duplicate Calendar Items

I ran into a weird issue with my last cell phone… it duplicated (sometimes tripling or quadrupling) many recurring events. I had four Christmas Day events on Dec. 25, and three birthday reminders for my mom, etc. But I was having a hard time deleting them all without removing the ones I actually wanted to keep.

So in Outlook, I set my Calendar’s Current View to “By Category”. This handily sorted all the recurring events and duplicated events into a nice list sorted by Holidays and the like. I then just highlighted everything I didn’t want, including all the holidays, old events, stale recurring appointments, and then hit Delete.

Piece of cake.

Then I went back into Calendar options, and clicked the “Add Holidays” button to populate my calendar with the correct Holiday events.

I figured this would come in handy whenever someone wanted to clean up a calendar of never-ending recurring events. A easily selectable list makes managing multiple events a simple thing.

At least that’s what I like to think.