Wednesday, October 26, 2011

Key Remapping on Mac

I started typing in Dvorak some 2 years ago.  I've been curious over the years and I read a post by a friend that made me finally make the jump.  Stop Typing Like a Spider by Dave South.

I bought stickers to put on my keyboard and convinced my wife to switch as well.  It took about a month before I felt comfortable typing in Dvorak and for the most part I think it was a really good switch.  My fingers don't get as tired typing as they once did.   My biggest gripe was the cut/copy/paste keys moved. I recently looked into Colemak, which looks actually better and keeps the placement of the shortcut keys.  I'm not sure I want to switch right now, but perhaps soon in the future. See Wikipedia  and http://colemak.com/ for more information.

That brings me to the reason for the title of this post:

I recently got a mac book pro and put an OWC Solid state drive in it with a data doubler insert. (this lets me have two drives in my macbook a SSD, which is fast, and a normal HD for space.)  It works like a charm.  There are a few downsides, I don't have a disk drive internally and Mac DVD Player does not like that.  And my Eject key is now worthless.  So as a good keyboard hacker, I wanted to re-purpose that key.  Along with the fact that I wanted to remap a few other keys.  I ran into a little tool for Macs called KeyRemap4MacBook.  It works on all macs.  It let me remap my eject key to a forward delete key, which I use all the time.  It also re-maps a slew of other key combinations.  I took the Colemak layout design and got rid of my caps lock key and now have delete there.  It's still not habit, but the tool to remap keys was very cool and rather complete as far as I'm concerned. 

I've had problems with parallels and the Dvorak keyboard layout and looked into remapping them with something different than the system preferences layout.

Thursday, February 10, 2011

Logitech Revolution MX

So, I love hardware and get all sorts of excited when I gen new stuff.

Anyway, a year ago, I bought a Logitech Revolution MX Laser mouse. It was awesome, fit my hand well. I programmed two of the thumb buttons to be copy and paste so that I could move text around with only my mouse. It was very nice.

The last few months I had my left mouse clicker fail on me. Turns out that it's a common problem. The clicker would do a double click action when I only clicked it once. For the most part this isn't a problem, but in my email program it would open a new window with my email instead of just showing me the preview and open files instead of just selecting them in explorer. It was annoying and got worse as I kept using the mouse.

So, I did the normal trouble shooting, tested it on other computers, did a web search etc. Logitech has good reviews for customer support, so I called in about it and was very pleased. The person on the other end of the phone was knowledgeable and very polite. After talking to me about the trouble shooting steps and having me try a few things I hadn't previously done, he said he would initiate an RMA.

A week later I got the label in an email, printed it out, taped it on a box with the mouse inside and sent it off. Another week later, I got the newer Performance MX. I have extra mice so I just used a backup while I waited for it to come. It didn't have the thumb buttons I was used to, which was disappointing, but it did come with the unifying micro USB receiver, nice. The speed scroll wheel is better designed with a mechanical switch instead of a software based switch. It also has the newer "Dark Field" technology for better tracking. I haven't noticed a big improvement, but I don't mouse on glass either.

Overall, I'm very pleased with the feel of the mouse. It is shaped a little differently than the older one, but still nice in my hand and it glides very nicely. I haven't figured out how to do the copy paste thing yet how I like it. There are extra buttons on the mouse I could use. Maybe, I'll make a post when I get that figured out. Logitech's control panel has gotten better as well with better configuration settings.

Overall a great mouse, and especially as a "free" upgrade. Thank you Logitech for an awesome warranty.

Tuesday, December 7, 2010

Bootcamp 3.2 Update "Boot Camp Services Setup failed".

I downloaded the BootCamp updater for Bootcamp 3.2 from Apple's website. When I tried to run the installer, it completes it's initialization, then fails with a simple, and annoyingly short message: "Boot Camp Services Setup failed".

I got a similar message when updating to 3.1 when it came out.

Turns out that Apple's updater doesn't deal well with extra display drivers. I use VNC for work and it installs a video driver called Mirage Driver. I had to manually remove that driver in the
device manager Display Adapters section (I get there by right clicking "my computer" -> Properties. Then go to Hardware tab and open the first tool "Device Manager".) I've read that if there is anything other than the video card driver there, BootCamp installer will choke.

Hope it helps someone out there figure things out.

Thursday, October 21, 2010

I have been having a hard time seeing the difference between an 'a' and 'o' in my code recently and decided to find a different font. After searching around the Internet, I found Inconsolata. While looking for a good source I found a version with strait quotes that is quite pleasing.

You can read more about it on this site or just do a search for Inconsolata-dz:
http://nodnod.net/2009/feb/12/adding-straight-single-and-double-quotes-inconsola/


I also changed the theme of my Microsoft Visual to a dark background.

Both the font and the darker background make a huge difference to the readability and less eyestrain to code. I highly recommend spending a little time tweaking your dev environment so that is comfortable for you.

Friday, August 13, 2010

Adobe Unit Types.osax

I had a fun one today. I have been having random crashes and my Mac OS 10.6 application switcher and doc were crashing. So I pulled up the console log to see what errors I was getting and ... I have a ton of these:

osascript ... Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

Found a solution on this page: http://kb2.adobe.com/cps/516/cpsid_51615.html

essentially you have to download the 64 bit version of the adobe unit types.osax and save it to the right place.

Hopefully that fixes one of the errors!

Saturday, October 24, 2009

PostGIS template on macport postgresql84

We use postgresql and postgis for one of our websites we maintain: byways.org.

I use a mac with development environment installed via macports. I originally followed most of the instructions on: http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition

Today I did an update to postgresql 8.4 and it was messier than I had hoped. After running:
sudo port selfupdate
sudo port upgrade outdated


I waited about 3 hours to download and compile all my macports.

Then:

port install postgresql84 postgres84-server
at the end there are instructions to modify your path and launchDeamon as mentioned in the robby on rails post.


However - here is where it gets fun -- I uninstalled postgresql83-server and modified my path to point to 84 not 83. You have to re-boot to get the database up and running again with the appropriate path etc.

Then, I wanted to build me a template_postgis database as outlined here:
http://geospatial.nomad-labs.com/2007/12/16/template-postgis-database/

except they moved some files, and I had to run it like this:
$ psql template1
\c template1
CREATE DATABASE template_postgis WITH TEMPLATE = template1 ENCODING = 'UTF8';

-- next set the 'datistemplate' record in the 'pg_database' table for
-- 'template_postgis' to TRUE indicating its a template
UPDATE pg_database SET datistemplate = TRUE WHERE datname =
'template_postgis';
\c template_postgis
CREATE LANGUAGE plpgsql;
\i /opt/local/var/macports/software/postgis/1.4.0_1+postgresql84/opt/local/share/postgresql84/contrib/postgis.sql
\i /opt/local/var/macports/software/postgis/1.4.0_1+postgresql84/opt/local/share/postgresql84/contrib/spatial_ref_sys.sql

GRANT ALL ON geometry_columns TO PUBLIC;
GRANT ALL ON spatial_ref_sys TO PUBLIC;

-- vacuum freeze: it will guarantee that all rows in the database are
-- "frozen" and will not be subject to transaction ID wraparound
-- problems.
VACUUM FREEZE;


Restore my database from backup and away we go.

Hope this helps someone out there.

Tuesday, March 10, 2009

Error Fix: Server msg 18, level 16, state 1

Today I ran into one of those really annoying bugs, the kind you get right at the opportune moment you need the software to work and it doesn't.

This time I was trying to run my application that uses Microsoft's SQL Server 2000. I couldn't connect to the database for some reason.

From SQL Query Analyzer it said:

Unable to connect to server. Server msg 18, level 16, state 1. [Microsoft] [ODBC SQL Server Driver} [Shared Memory] SSL security error

From Enterprise Manager it said:

Unable to connect to server. Reason: SSL security error. ConnectionOpen (SECDoClientHandShake())...

Microsoft had a solution for the problem that said it was trying to use a certificate that wouldn't allow it to work. See: http://support.microsoft.com/kb/302409

However, that wasn't the solution I needed. After looking at some stuff for a while, I called my co-worker and he clued me into a possible solution.

We ran start->run application -> "MMC", then added a snap-in via File->Add/Remove Snap-in, click the button to add ..., then choose Certificate in the snap-in options. I chose Computer Account, then local computer, then it adds the snap in. Close the add form and the Add/Remove Snap-in form.

On the tree view of the MMC console - open Cerficates -> Personal -> Certificates. I had two certificates listed there. (remembering back when I did it, I accidentally created two when I ran selfssl.exe - a tool to create a development testing self signed certificate.) Apparently SQL Server has a tissy-fit when it finds more than one certificate.

I deleted one of the certificates after backing it up just in case I got the wrong one. Restarting my database server refreshed the certificate registration and did the trick. I'm up and running again. Grrr - I hate these one hour find a fix bugs that stop my flow of normal work, but thought I would put this down here so that others could perhaps benefit - even just myself when I do it again.