Facebook plugin for Pidgin
By kenglish
Today, I installed the Facebook Plugin for Pidgin. Pretty basic, just downloaded the .deb file and double clicked on it.
One caveat was that I had the Pidgin MusicTracker plugin enabled and this caused Pidgin to crash when I set up my Facebook account. The MusicTracker can be disabled for selected acocunts and it must be disabled for Facebook. The solution was to disable MusicTracker, setup the facebook account and go back re-enable MusicTracker and disabling it for Facebook.

Ruby on Rails: Override singularize, pluralize.
By kenglish
It took me a while to figure this out but it’s really a no brainer.
I was getting:
>> "biodatabases".singularize => "biodatabasis"
To fix this, I edited config/initializers/inflections.rb and added:
ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'biodatabase', 'biodatabases' end
I know this is in the docs somewhere but I put in on my blog so I don’t forget.
Weekly Aggregate for March 23-27
By kenglish
‘Jaunty Jackalope’ Ubuntu springs into beta
Sounds like some good new features for my OS of choice. Full details here.
Java: Coming Soon to Google’s App Engine
Sladd got me all excited about App Engine last year. However, we quickly discovered that coming from Rails, using Python (Django or Pylons) is like going back to FoxPro. If Google’s App Engine allows Java, we can use JRuby instead of this ridiculous hack for Sneaking Ruby Through Google App Engine (and Other Strictly Python Places.)
Open Bio Google Summer of Code
If you are student and jobless, apply to Google Summer or Code. I’ve heard great things about it.
ReQall Goes Pro: Smarter Task Management for the iPhone
Geo-based tasks and task reminders. This was Tyler’s idea and these guys stole it. That’s the downside of being jacked into the Matrix: others can read your thoughts.
Php Women
I would have never switched to Ruby if I knew that chicks dig PHP. They need to add a Personals section. I could relate to “Experiences of a conference virgin” because, sadly, I too am a conferences virgin.
Sansa SlotMusic for $20.
Screw you, Ipod Shuffle! Seriously, this thing could be a good audio book buddy.
blast notes
By kenglish
Create db from fasta file:
formatdb -p F -i EST_Clade_A.fasta -n EST_Clade_A
This will create a 3 files: EST_Clade_A.nhr, EST_Clade_A.nin, EST_Clade_A.nsq. If you omit the -n option, it will create EST_Clade_A.fasta.nhr, EST_Clade_A.fasta.nin, EST_Clade_A.fasta.nsq
Blast example:
blastall -p blastn -i EST_Clade_C_1.fasta -d EST_Clade_A -e 25
Weekly Aggregate for March 16-20
By kenglish
I’m gonna try to post a running commentary on tech news once a week….
What IBM might gain by buying Sun Microsystems
Interesting article. Too bad we have Dells and Apples everywhere. I’d like to see a demographic breakdown of who buys IBM and Sun servers. I would guess that people that came into the industry in the 70s and 80s are all over IBM while the early dot-commers from the 90s think that Sun is the bomb. Tools like me just want a Dell that they can throw Linux on. I know, I know: what about all those cool enterprise wide applications (that nobody knows how to use or install.)
Lenova’s new Pocket Yoga
I could see it as a good roadside hacking device as long as it runs Linux. I like the name too. Honestly, I was expecting to a see a small version of my first Yoga instructor, Vanessa. She used to make us hold poses for 10-15 minutes at a time. A pocket version of her would really help with my posture.
Android vs IPhone 3.0 Showdown
The only way my blog will ever go viral is if I mention the iPhone. I’m not much of a smartphone guy but this a good read.
Rackable’s New Servers Like It Hot
It’s amazing where server technology is going. Check out this one, it can run at 104 degrees. Boom! I hope never have to set up another server. Just have some guy maintain these and I’ll access everything in the cloud.
Lending Club
Wow. Social Lending. This is a pretty neat concept. They only lend to people with FICA scores over 600 and claim to only have a 3% default rate.
config.gem: Unpacked gem ezcrypto-0.7 in vendor/gems has no specification file. Run ‘rake gems:refresh_specs’ to fix this.
By kenglish
Thanks to Giles, I finally found the answer to this problem.
Open config/environment.rb and add “Rails::VendorGemSourceIndex.silence_spec_warnings = true”
1 2 3 4 5 6 | RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::VendorGemSourceIndex.silence_spec_warnings = true |
You can put an awesome comment like this guy did:
http://gilesbowkett.blogspot.com/2009/03/configgem-unpacked-gem-whatever-in.html
Getting started with BioRuby and Ruby on Rails.
By kenglish
Started messing with Bioruby this week. I went through George Githinji’s excellent tutorial on his biorlated blog, Bio-graphics, BioSQL and Ruby on Rails part 1 and Bio-graphics, BioSQL and Ruby on Rails part 2. This is very helpful. Before you do the stuff below, read through his tutorial so you understand what’s going on. Here’s what I had to do to get it working:
Install the gems
I got started by installing the bio, bioruby gem.
sudo gem install bioruby sudo gem install bio
I discovered that the bio-graphics gem needs cairo. Here’s how to install it on Ubuntu. This had 50-something dependencies. I just sat back and let them install:
sudo apt-get install cairo-clock cairo-dock-dev libcairo-ruby libcairo2
I also had to install ruby support for pango:
sudo apt-get install -y libpango1-ruby
I installed bio-graphics and the cairo gem.
gem install bio-graphics cairoGeorge also uses rails_sql_views so I installed this:
sudo gem install rails_sql_views
As George warned in his blog, I had to comment out these lines in
unless Kernel.respond_to?(:gem) Kernel.send :alias_method, :gem, :require_gem end
in rails_sql_views(0.6.1). Mine was located in /usr/lib/ruby/gems/1.8/gems/rails_sql_views-0.6.1/lib/rails_sql_views.rb. I commented out lines 28-30.
Install the biosql_rails_example application
To get george’s app running, I cloned the biorelate repository into my /home/kenglish/workspace directory:
cd /home/kenglish/workspace git clone git://github.com/georgeG/biosql_rails_example.git
I edited the database.yml file and added my mysql infomration. You can create the database by hand as George explains but I put in the mysql root username and password in the database.yml file and ran:
rake db:create.
Install the biosql database schema
As George explains, I had to download the biosql schema and untared it. I created the tables like this:
cd /home/kenglish/downloads/ tar xzvf biosql-1.0.1.tar.gz cd biosql-1.0.1/sql mysql -uroot -p var_biosql_development < biosqldb-mysql.sql
I put these in the directory biosql-1.0.1/scripts and loaded them with the script load_ncbi_taxonomy.pl.
perl load_ncbi_taxonomy.pl --dbname var_biosql_development --dbuser root --host localhost --download
I don’t have any bio-related data so I downloaded the following files from the Ncbi ftp site (ftp://ftp.ncbi.nih.gov/pub/taxonomy/): gi_taxid_nucl.dmp.gz taxcat.tar.gz and taxdump.tar.gz.
Now I was able to run George’s Rails app! To be continued…
Running an individual shoulda context test
By kenglish
I’m suffering from serious CRS. Yesterday, I was wondering how to run my shoulda tests individually. My co-worker said “Just google for it.” I entered a google search term and the 4th or 5th result was a post by ME to the shoulda google group. This was the post: Can you controller context test just one test via the -n flag?
To reinforce the lesson, you can run a single context using a regular expression.
context "on GET to :show for first record" do setup do get :show, :id => 1 end should_assign_to :sweater should_respond_with :success should_render_template :show end
Although, you need to put quotes around the regular expression or the command line interpreter mistaked the spaces for separate arguments:
ruby test/functional/sweater_controller_test.rb -n "/show for first record/"
Using gitk
By kenglish
Just installed gitk. Very nice…. Here’s how to install it on Ubuntu:
apt-get install gitk
Awesome git resources:
I hope this post has been helpful.



March 30th, 2009