Friday, January 21, 2011

MySQL fix some phone numbers

This is long and convoluted, but basically, it takes unknown inputs of phone numbers from a table:
5551212
555-1212
212555-1212
212-555-1212


and makes them all
2125551212


select Concat(if(length(PhoneNumber)< 10, "212", ""), replace(PhoneNumber, "-","")) FROM AddressBook;

update addressbook set PhoneNumber=Concat(if(length(PhoneNumber)< 10, "212", ""), replace(PhoneNumber, "-",""));

Wednesday, December 29, 2010

Evernote works well with WINE

Installed Evernote on WINE, and it seems so far to be pretty stable and works well enough to grab my information.

Saturday, December 11, 2010

Set up Harmony Remote for Motorola VIP-1216

We just installed Prism from CenturyLink. I just wanted to post something how easy it was (should have been) to convert my Harmony H659 remote to control the Motorola VIP-1216.

If you remember nothing else, "No, I don't have the original remote". Don't try learning it. Don't try guessing from the remote brand. I did this and was extremely frustrated.

You really just have to load your Harmony software, connect your remote, add the device (Video Recorder -> PVR), choose Motorola as a brand, and VIP-1216 as the model. Next, "No, I don't have the remote"! Next/Done, but then go to the Activities tab (watch TV?) and add the Motorola VIP-1216 to the TV.



Now, what functions will you not have immediately that you may want to add to the display?
Certainly, you won't have all the direct input power/mode buttons at the top. But if you have a Harmony remote, you understand why those aren't necessary. If you have an errant device in the wrong on/off state, you'll use Help to get it back in sync, though if it you're having constant issues, you may want to verify the remote is controlling that device properly in the Harmony software.

Other buttons: "On Demand", "Recorded TV", "Learn" (Not needed), "Back" (Probably unnecessary as there are other buttons that can do it), "Go Interactive" (May never use), TV/Exit to "TV (again, may never use). Certainly you can add those to the display of the Harmony if you want them.


Monday, November 29, 2010

The Calorie Lie followup

Almost a year ago, I wrote about The Calorie Lie, how calories in themselves were useless as a measurement.

Now, Weight Watchers has concurred with my findings. OK, not really *my* findings, but they have changed their "Points" system to reflect that food isn't made of calories, it's made of "macronutrients."

The best part of learning how to eat right is to not be focused on how much you're eating, but how well you're eating.

You don't have to go vegan to lose weight. Just moderate. Put less on your plate and don't eat it all. Don't eat a midnight snack. As I say, "I can eat anything I want, just not all of it!"

May good choices be yours!

Tuesday, November 9, 2010

vmware server make isos from Microsoft Volume License exe

Some things I learned:
  • the default logon and password of VMware infrastructure web access is the one you use to log on to your workstation/server
  • An iso you want to map to a CD in vmware server must at least be in the Virtual Machines location.
  • Microsoft .exe files from Open License should be extracted before made into an iso.
  • nlite is the easiest way to make a bootable iso from disk 1.
  • use your favorite iso maker to make an iso of disk 2 (ashampoo is a free option)
  • Internet Exporer (or Firefox) is necessary at least initially for the Remote Console
  • ctrl-alt-insert sends ctrl-alt-delete
  • Windows 2003 Server forgets the AMD PCNET adapter after upgrading to SP2. Copy the windows.iso file from the VMware directory to the Virtual Machines directory and mount it via CD to install VMware tools

Sunday, November 7, 2010

How to run an application on resume from standby

or sleep mode...

Should work for Vista or Windows 7:
click the Start menu
type in Task Scheduler and run it
On the right, Create Task
Give it a name
(Run only when user is logged in is good and important)
click Triggers
Begin the task On an event
Log: System
Source: Power-Troubleshooter
Event ID: 1

if it's network related, you may want to
[x] Delay Task for 30 seconds

click Actions
add the parameters that will run your application on resume

click Conditions
If you're on a laptop/notebook, you may wish to uncheck
[x] Start the task only if the computer is on AC power

If it's network related, you'll want to check
[x] Start only if the following network connection is available

click Settings
if it's network related, you may want to check the "if task fails", restart every 1 minute up to 3 times.

click ok.
Test it

What would you want to use this for?

I'd use it to reconnect my ssh link if my laptop went to sleep, especially if I'm using it for tunneling.

Blog Archive