Wink Saville’s Blog

July 5, 2009

Autoconf

Filed under: linux,What I learned today — Tags: , — wink @ 5:48 pm

While starting a protobuf compiler I learned a little about autoconf. First it complains about version the protobuf code was using automake 1.10.1 and I had 1.7.9. so I upgraded to automake using “sudo apt-get install automake1.10″. Of course this upgraded my automake to 1.10.2 which still didn’t work.The solution was to run autoconf from the path/to/protobuf-2.1.0 but that didn’t work until I used “sudo apt-get libtool” to get the latest libtool. This uses the configure.ac and then generated Makefile.in from the Makefile.am.

Apple keyboard delete to right key remapping

Filed under: linux,What I learned today — wink @ 1:56 pm

Had some trouble getting the small aluminum keyboard to do a delete to the right. But with the help of this post I got it workings. Basically you need to create a .xmodmap file in your home directory with with the keycode of the key that you want to be Delete in this case 169 is for the “eject” button:

keycode 169 = Delete

Also by adding to .xmodmap:

keycode 133 = Alt_L MetaL

keycode 134 = Alt_R MelaR

You can map the command keys to Alt left and right respectively. You can use the “xev” program to determine the keycodes.

June 13, 2009

Viewing an old version of a file in git

Filed under: What I learned today — wink @ 8:03 am

Use “show” command, but you need to use the full path from the root of the git repo to the file, otherwise you’ll get an error such as below. This same error happens if there is any other error in the parameter, for instance a miss-spelling:

$ git show HEAD:hxy
fatal: ambiguous argument ‘HEAD:hxy’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions

Anyway, to look at a particular file use can use git log to see the various revisions:

$ git log –pretty=oneline -3 help.c
746c221ad063854e23661f6898c002c8726f5dad git wrapper: also use aliases to correct mistyped commands
277cd4c4bd8cca31395846fc80ea28bf2cd4ddf2 Merge branch ‘ar/autospell’
f0e90716d47b429284702b75425a247c9fc41adb Add help.autocorrect to enable/disable autocorrecting
$ git show f0e90716d47b429284702b75425a247c9fc41adb:help.c

To see the current version you’d could use the the first entry.


$ git show 746c221ad063854e23661f6898c002c8726f5dad:help.c

To see the previous version use the second sha1:


$ git show 277cd4c4bd8cca31395846fc80ea28bf2cd4ddf2:help.c

I wonder if there is a simple syntax to get a particular revision such as:


$ git show REV^:help.c

May 30, 2009

Full screen mode on Mac os x X11 – command-option-A to switch

Filed under: What I learned today — wink @ 6:35 am

When in X11 full screen mode use Command-option-A to switch to back to mac apps. Also command-option-esc will bring up the Mac task list and allow you to switch to other tasks.

Powered by WordPress