Save host config for ssh on mac

The most simple way to save host configurations for easy ssh’ing from Terminal on mac:
Add host entries to ~/.ssh/config file

This file doesn’t exist by default so you can easily create the file and add your host shortcuts.

For example, if you’d like to be able to type

user$> ssh MyHost

instead of ssh

Create the config file and add the following line:

Host MyHost
Port 22
User myUser

English word list for solving Jumble puzzle

I’ve been playing around with the iPhone SDK, and decided on a “Jumble Solver” as my first as a good learning project. It’d include a whole bunch of objective C and general programming concepts – Recursion, delegation, Interface builder, inheritence, sqlite.

My general approach was to build a decision tree with the available characters in the jumble, and compare the leaf nodes with an english dictionary. Finding a sqlite database of words … or rather a list of words was really hard. I stumbled upon a word list in text format found at the national puzzle solvers website. To dump that into a database I used the following simple ruby script. You’ll notice I limited the words to less than 7 characters. The search algorithm is n! complexity so limiting the jumble to 7 characters proved optimal performance. :

require ‘sqlite3.rb’“WordDatabase.sql”)‘words.txt’).readlines

word_list.each do |word|
if word.length <8
db.execute(“INSERT INTO words (word) VALUES (?)”, word.chomp)