Wednesday, April 6, 2011

Apple Mail losing all state

Seen this scenario a couple of times:
  1. Mac crashes
  2. Reboot and when Mail starts up, it's lost all of it's state and wants me to re-enter all my accounts information.
Fortunately, all my email is in IMap, so it's just a matter of restoring Mail's state about my IMap accounts. This is done by shutting down Mail, replacing ~/Library/Preferences/com.apple.mail.plist with a good copy from a backup.

Saturday, March 12, 2011

Adding a Tomato router as a Wifi extender

I recently moved into a house with a finished basement, which really puts a crimp into my ability to run cat5 ethernet where I want it. So, I needed some wifi extension and the ability to support some devices without wifi capability.

Since I'm using a Tomato router which supports WDS, I decided to add a second router and use WDS to turn it into an extender and a wired-to-wireless bridge.

I bought another Cisco/Linksys WRT54GL and installed Tomato 1.28. I basically did what I did last time, with a couple tweaks:

  1. I downloaded and unpacked the Tomato firmware.
  2. Since my home LAN is not the default network (192.168.1.0) I was able to connect my laptop to the new router via an ethernet cable and communicate with it directly without having it connected to the rest of my LAN. If you are using 192.168.1.0 for your LAN, you can do the same but you'll probably need to swap back and forth by turning your airport interface on and off, and disconnecting the ethernet cable.
  3. I skipped the factory reset and just did the upgrade. All went smoothly.
  4. After changing the password, under Basic/Identification I changed the router name and under Administration I changed the color scheme.
  5. I then followed the directions in the Tomato FAQ to set up WDS on both routers. The only hitch I had here is initially tried to use "WPA/WPA2 Personal" and "TKIP/AES" instead of "WPA Personal" and "AES" as the FAQ suggests and I couldn't get that to work. Following the directions exactly and things worked fine.

That's it - pretty darn easy. I've ordered a third WRT54GL to add a third repeater which I'll chain to the second to add another wired-to-wireless bridge. I expect that to go smoothly and will post when I've finished that.

Update 3/15: Added a third router, chained to the second and all is working well.

Monday, October 25, 2010

Fix stuck install on Android

Application updated and got stuck on "Installing..." - I couldn't cancel, reinstall, etc.

What worked for me was to follow the advice on this page and Uninstall Updates for the Market app (#1 on the page).

Saturday, October 23, 2010

Migrating from hg to git

So I had some stuff hosted by Google code using mercurial, but I mainly use git and I found going back and forth distracting, so I decided to move over to git. To do this I basically followed the guidance from this post and used the fast-export utility.

Thursday, August 19, 2010

git: Pushing a new branch back to an origin

OK, I know this is straight forward git stuff, but I just couldn't find a clear example anywhere. I cloned a remote git repository, created a new local branch and then wanted to push that branch back to the original remote repository (without merging it first).

First, I cloned a remote repository, e.g.:

git clone git@github.com:von/sandbox.git

Then I created a new branch locally and make changes in that branch:

cd sandbox

git checkout -b new-branch

edit && commit

Now I pushed the new branch back to the remote repository (i.e. origin) without merging it into the main branch (i.e. master). To do this, while on new-branch, just do a git push origin HEAD, i.e.:

git checkout new-branch

git push origin HEAD

Basically you are saying push to origin the current HEAD.

Thursday, February 18, 2010

Mapping control-click to right click in Windows VM on a Mac host

Problem: emulating a right click/control click in a Windows VM on a Mac host with Mac's one-button trackpad.

Quick work around: You can put two fingers on trackpad and click to simulate right click.

Cleaner solution as suggested by Muffin Research Labs is to use AutoHotKey to enable use of control-click to emulate right-click:
  1. Download and install AutoHotKey.
  2. Right click on contrl-left-remap.ahk and save to Windows VM.
  3. Double click on contrl-left-remap.ahk, while it will appear nothing happens you should now be able to control-click on things and Windows should behave like you right-clicked (e.g. you'll get the context menu if you click on a file).
  4. To have this persist past a reboot, copy contrl-left-remap.ahk to C:/Program Files/All Users/Start Menu/Programs/Startup