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

Friday, February 5, 2010

How to change title of Google site page

If you create a page in a Google site and then decide you need to change the title of the page (i.e. the <title> element), there doesn't seem to be a straight forward way to do it. Here's what I found:
  1. Click on More Actions/Page Settings
  2. Select Show Page Title and Save
  3. Now select Edit Page
  4. The title of the page should be at the very top, simply edit it to what you want it to be.
  5. Save the page.
  6. The title should now be changed.
  7. Disable Show Page Title under More Actions/Page Settings.

Saturday, January 23, 2010

Backing up my Delicious bookmarks

I use Delicious for all my web bookmarks. I like it because it lets me tag bookmarks, write notes about them, and also access them easily from all my browsers and computers. Bookmarking pages to Delicious is easy thanks to an add-on for Firefox and a bookmarklet for other browsers.

While I've never had a problem with Delicious, like all services in the cloud, I do like to make a personal backup of my data. Deilcious makes this easy with a nice HTTP API. So I wrote a python script to pull down all my bookmarks as a xml file. I just run it as a cron job every night and it makes copy of all my bookmarks. This way if Delicious ever drops off the face of the earth, it may take some work, but I know I can reconstruct all my data.