Cool Japanese Pens
I recently bought a cool multi- pen for my Dad. I saw it at an art supply store and thought he would like it. I got him this one. Yasutomo Quad-Point Platinum
I found these as well, they look really interesting, and are alot less expensive.
zebra pens They both are multi-color pens with a included pencil.
list installed packages on ubuntu
Here is a nice snippet
Code:
dpkg –get-selections > installed-software
And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,
Code:
dpkg –set-selections < installed-software
followed by
Code:
dselect
Flyspy.com. 1
I’m one of the 4 people running [Flyspy.com](http://www.flyspy.com). It’s a pretty cool rails / php app that finds the best fare on flights.  The neat thing is, you choose a origin/destination and it shows you ALL the cheapest prices going out 60 days. It was a pretty tough problem programatically, airfares are basically priced by game theory. Every ticket is custom. We have millions of data points to ferret through constantly. The site is hosted on the Amazon EC2 cloud, aka "The big rack in the sky", another cool thing. It’s been fun learning the in’s an outs of that. I’ve lately been toying around with Erlang/CouchDB to store the json for the datapoints. CouchDB offers the scaling we will need, but it’s still beta, so I’m not really sure. One thing we have been trying to do for a long long time, is, as stupid as it sounds, a tagline. "whats the fairest fare of them all – Flyspy." that kind of stuff. Any help here would be appreciated.
waiting room
I’m in the waiting room at the hospital. New baby on the way. Soon will go in and watch the birth. The clock seems to have stopped.
hard link directories in osx and use dreamweaver with rails 2
I’m starting to use Netbeans and Dreamweaver for development of a new ruby on rails site I’m working on. Jruby for all the controllers and code, dreamweaver for design and templates. Netbeans is great for Jruby, it gives intellisense like autocomplete for ruby and easy navigation of your models and classes.
The design part wasn’t so easy. I’ve been using rails since v 0.65 or so, and have come to understand that when people can’t use a tool for a technology, they often say, the tools are for wimps. Don’t get me wrong, I’m all for good text editors, just not for graphic design. I can almost hear cave men saying that about the first farmers.
Dreamweaver and the Adobe tools are in my opinion the best tools for web design, and layout of pages. Sometimes, in the wrong hands the code they create is awful. It’s a tool, people misuse tools, get over it.
Dreamweaver doesn’t like rails. Dreamweaver expects sites to follow a certain pattern, Site root, Image directory, files which call the image directory are below the site root.
Rails doesn’t follow this pattern. It has an application root, with an {site-root}/app/views folder for the templates and all images/ stylesheets/ js in {site-root}/public.
As a result of this layout, dreamweaver will not show images / styles / proper links when designing templates for rails sites. In the past I got around this by creating, hack one off sites just for templates, then writing scripts to move all the code to the proper place in the rails app.
Today, I tried a different tack, Dreamweaver wont follow symlinks, it thinks they are a file. Hard linking in pre-leopard osx only works for individual files. But Leopard allows hard linking of directories, it just won’t expose this ability via bash, so a user will not be able to use this feature. OSX needs directory hard links for “time machine”.
Heres what I did.
I found some c code that overrides the osx features against hard links ( they can be bad and create infinite loops if you aren’t careful)
#include <unistd.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
if (argc != 3)
return 1;
int ret = link(argv[1], argv[2]);
if (ret != 0)
perror("link");
return ret;
}
save as hlink-dir.c
open terminal navigate to the location of the file and compile
enable root user - look up how to do that
gcc -o hlink-dir hlink-dir.c -Wall
chown root:wheel hlink-dir
chmod +x hlink-dir
mv hlink-dir /usr/local/bin
Now when you are logged in as root from terminal you type
hlink-dir Source-dir link-name
# you just created a hard linked directory
The Directories cannot be in the same folder, or the link won’t work.
Here’s the whole point of the story. From your rails {site-root}
cd {rails-site-root}
hlink-dir `pwd`/app/views `pwd`/public
open dreamweaver, create a new site and set the public directory to {site-root}/public. You are good to go. You can create the templates in dreamweaver, and the images from the site will actually show up in dreamweaver.
Thanks to Greg Miller for the hard link tip
EC2 ssh sftp fuse on OSX made easy 2
I’m deploying a cluster of servers on Amazon EC2 in my job, It’s a really cool technology. I’m setting up the servers to use puppet as an administration tool, but haven’t gotten very far in that yet. I am still at the configure the image stage.
One thing that really bugged me is this. I manage the AMI instance and the EBS volumes using the Elastifox plugin for firefox. There are command line tools too, but a gui is way easier here. One of the cool features in the gui is when you right click on an AMI instance and hit “Connect to Public DNS Name”, elasticfox will open a terminal and ssh to that server automaticly.
I then would copy the new for-this-session-only AMI dns name, Open my SFTP client and paste it in, set up the public key and connect. This last step sucks, It takes 30 seconds minimum every time, 10-20 times a day. I modified the script provided with elastifox, to work with the great google project MacFUSE which mounts SFTP Volumes just like drives in OSX finder. Now I right click on an instance, it opens SSH and mounts the drive for drag and drop ease.
Here’s what I did.
This site provided alot of help for me
Install the Elasticfox Firefox plugin. Read the Documentation
Click the Tools button in Elasticfox.
Enter your data in the blue highlighted area.

#add this code
-e 'on run argv' -e 'tell app "System Events" to set termOn to (exists process "Terminal")' -e 'set cmd to "mkdir /Volumes/" & item 3 of argv & ";sshfs -C -o idmap=user -o uid=502 -o gid=20 -o allow_other " & item 2 of argv & "@" & item 3 of argv & ":/ /Volumes/" & item 3 of argv & " -oIdentityFile=" & item 1 of argv & ",reconnect,noappledouble,ping_diskarb,follow_symlinks,noreadahead,volname=" & item 1 of argv & ";ssh -L10000:localhost:10000 -L3307:localhost:3306 -L8081:localhost:8080 -L3080:www2.flyspy.com:80 -L4849:localhost:4848 -i " & item 1 of argv & " " & item 2 of argv & "@" & item 3 of argv & ";"' -e 'if (termOn) then' -e 'tell app "Terminal" to do script cmd' -e 'else' -e 'tell app "Terminal" to do script cmd in front window' -e 'end if' -e 'tell app "Terminal" to activate' -e 'end run' ${key} ${user} ${host}
#NOTE you have to replace the uid and gid number with YOUR OSX uid and gid.
To find these open up a terminal and type "id" (no quotes)
Install MacFuse
Once MacFuse is installed make a symbolic link in the terminal, the following code may not be pointed at the correct file, so double check it.
sudo ln /Applications/sshfs.app/Contents/Resources/sshfs-static-10.5 /usr/local/bin/sshfs
sudo ln /Applications/sshfs.app/Contents/Resources/sshnodelay.so /usr/local/lib/
Thats it! Right click on an ami, and ssh will open and Finder will mount the instance, via ssh.
If you need to set up tunnels ( for mysql admin and such ) modify the command and add the ssh tunnel “-L3307:127.0.0.1:3306” between “ssh -i”. Then use your admin tool and connect up to localhost:3307
If Volumes dont show up, on desktop: check show connected servers on desktop in the Finder Preferences.

Search all craigslist telecommute jobs 3
I recently got a new job, it’s pretty cool.
While I was looking for work, I wrote this script. It searches all the craigslist cities in the USA, for telecommute gigs, then saves the result to one handy html page that you can link from.
If you want other countries, just add the 2 character iso country code to the script.
#! /usr/bin/env ruby
require 'rss'
require 'yaml'
require 'cgi'
# Allows open to access remote files
require 'open-uri'
# available iso codes are
# iso_codes = %w{AB AA AF SQ AM AR HY AS AY AZ BA EU BN DZ BH BI BR BG MY BE KM CA ZH CO HR CS DA NL EN EO ET FO FJ FI FR FY GD GL KA DE EL KL GN GU HA IW HI HU IS IN IA IE IK GA IT JA JW KN KS KK RW KY RN KO KU LO LA LV LN LT MK MG MS ML MT MI MR MO MN NA NE NO OC OR OM PS FA PL PT PA QU RM RO RU SM SG SA SR SH ST TN SN SD SI SS SK SL SO ES SU SW SV TL TG TA TT TE TH BO TI TO TS TR TK TW UK UR UZ VI VO CY WO XH JI YO ZU}
########## change these parameters
@iso_codes = %w{ us }
query = ARGV.join(" ")
##################################
def look_for_job(query)
iso_codes = @iso_codes
city_list = []
# This gets a list of the current craigslist cities for the iso country code
iso_codes.each do |iso|
cities = open("http://geo.craigslist.org/iso/#{iso}").read()
reg = cities.scan(/http:\/\/.*?\//)
#delete these links from the geo pages
del = %w{http://www.w3.org/ http://www.craigslist.org/ http://www.craigslist.org/ http://en.wikipedia.org/ http://forums.craigslist.org/}
res = reg - del
city_list += res
end
# this gets the jobs then writes an html file out linking them
jobs = {}
query = CGI::escape(query)
# Turned threading off, it was overwhelming craigslist and they throttled the results
# threads = []
city_list.each do |city|
# threads << Thread.new(city_ea) do |city|
# What feed are we parsing?
rss_feed = "#{city}search/jjj?query=#{query}&addOne=telecommuting&format=rss"
# Variable for storing feed content
rss_content = ""
# Read the feed into rss_content
begin
open(rss_feed) do |f|
rss_content = f.read
end
puts rss_feed
# Parse the feed, dumping its contents to rss
rss = RSS::Parser.parse(rss_content, false)
# Output the feed title and website URL
if rss.items.length > 0
jobs[city] = rss.items
end
rescue Exception => e
end
# end
end
# threads.each {|thr| thr.join }
@outstuff = File.open('jobs.html','w+')
jobs.keys.sort.each do |city|
jobs[city].sort!{|a,b| a.title<=>b.title}
jobs[city].each{ |e| @outstuff.write("#{city}--<a href='#{e.link}'>#{e.title}</a><br />\n") }
end
@outstuff.close
puts "done"
end
if ARGV.length == 0
puts "\n\nUSAGE: craigslist_rss_query.rb your job keywords\n
the result is saved as jobs.html in the same directory\n\n"
else
look_for_job(query)
end
It goes to 11, the new apple audio update.
I’ve been having trouble with my new macbook pro, specifically the audio sounds fuzzy ( there was lots of back ground static ) at low volumes. The audio quality was also way below the last MacBook I had. Apple just updated the airport extreme card, and my audio problems went away.
There is still static at low volumes, the strange thing about it is that the static is constant loudness, no matter what volume the macbook is set to. On my ipod shuffle ( the best ipod for sound quality ), the static is only noticeable at extreme volumes when there is silence in the song.
The random r2 d2 like beeps are still there, but much muted.

The only strangeness with the audio change is the volume levels, It is LOUD now, go to a concert and hear a deaf rock-star play loud. I have to watch the volume settings or my ears will blow when I get mail. I can’t wait to test out some of my more power hungry headphones, maybe they will work with the laptop without a preamp now.
Death
I just found out that an ex-coworker of mine died, suicide. Christopher Mark Leighton-Brooder, I was looking him up to chat about some web stuff, dead. Weird. He worked at Dow Jones when I worked there, less than a year ago, and left all of a sudden, don’t know why, I’m guessing it wasn’t voluntary. Stress wreaks havoc a person. It’s too late to send condolences, It happened in May, he was a really nice guy and will be missed.

Command prompt here on OSX 1
One of the things i miss from the Windows powertoys collection while in osx, is the command prompt here app. In windows once this tool was installed, right click from a directory, and the shell opens, you in that directory.
I found a solution for osx. It’s a chunk -o- applescript http://jo.irisson.free.fr/?p=59. Download the file, and drag it into the Finders top button bar.
When you press it, a terminal window will open and cd you to your finders window.
If you want to open finder from terminal, type: open .