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.

Sunday, November 29, 2009

VirtualBox Harmony remote programming disconnects

Trying to program my Harmony remote from WinXP inside of VirtualBox, I kept getting disconnect errors. Poking around, I found these directions (last four paragraphs of the post) for setting up a filter in the virtual machine configuration so that it automatically connects the USB device (the problem apparently is the remote disconnects when rebooting and without the filter, the virtual machine can't find it then).

Sunday, November 8, 2009

Roku N1000 and Linksys EZXS55W equals network woes

Updated 3/13/2010: I've become convince the Linksys in question was just flakey and this was nothing specific to the Roku.

I recently moved my Roku N1000 Netflix streamer from one room to another. On hooking it up I found it performed horribly. Took minutes to start streaming a movie and then it would frequently "hiccup" and have to re-buffer.

Long story short, looks like it just didn't get along with the Linksys EZXS55W 5-port switch I had there. Switch seems to work fine with everything else, so I just swapped it with another switch (different Linksys) and all was good.