Thursday, August 12, 2010

23 Hours

For six weeks, I'll be on the other side of the world for a training course in booming Bangalore, India. Upcoming on this blog is the chronicle of those adventures. This is part 1 of a multipart series.

The trip itself was a rather uneventful 23 hours, but I felt the need to document it for both my own sake the potential interest of future TWU participants. I lost track of how many time zones I flew through. It was sunny when I left Chicago and sunny 8 hours later in Frankfurt. We arrived in Bangalore at 12:20 in the morning.


Most of it is already a blur at this point, but a few things that still stand out:


  • wondering if it was just coincidence a flight attendant named "Stickler" who maintained a perfect hairdo and uniform throughout the flight
  • thinking the $300 "upgrade" to economy plus is a laughable overcharge when checking in
  • thinking the $300 upgrade to economy plus is an incredibly good deal five hours in
  • "So you're traveling to India for work? How long have you been with this company?"
    "It's my second day"
  • wishing Mercedes would win the bus contract for the Chicago Transit Authority
  • admiring the smart and efficient use of the inclined plane in Frankfurt security
  • the immigration officer not believing my picture or my signature was me, asking me to sign something in front of him...which I'd gladly do all day, because my signature is pretty awesome.
  • Bangalore International Airport isn't much different from O'Hare. This shockingly huge ad appeared in both:

The real adventure begins on the way to the office from the airport. More on that here soon...

Sunday, June 6, 2010

Paperclip Plugin Dependency for Ruby on Rails

Paperclip is an awesome plugin for Rails. There are already at least two great tutorials out there on the subject, but both neglect to mention installing the dependency ImageMagick. On a related note, how awesome has MacPorts become lately?



Install ImageMagick


Macintosh


If you have MacPorts installed...

sudo port install imagemagick


Debian/Ubuntu Linux


sudo apt-get install imagemagick


You can test everything installed okay with the which identify command. If it returns a location, you're good to go with these excellent tutorials:


Thursday, May 6, 2010

Initial Git Push to RubyForge (Xbee Project)

Recently I became part of a team that is beginning to do quite a bit of work in Ruby. As a group committed to open-source, we immediately gave back in the form of a Ruby Gem. Our gem is called Xbee for Ruby and is focused on reading incoming data from the Xbee RF microcontroller. It's very low-level and exciting stuff.



Joining RubyForge is easy. Pushing to your Git repository is not. There is some documentation, but it is sparse and makes things difficult for people that are brand new to ssh public keys. So let's go through the steps from the beginning:



  1. Head to RubyForge.org and click the New Account link at the top of the page

  2. Once signed up, log into your email account and confirm

  3. Now that you're logged in, you can register a project by clicking the Register Project link near the top of the screen

  4. Fill in the requested details of your project: full name, purpose, pick a license, description, unix name, and choose Git as your SCM

  5. Once your project is approved, you're ready for your first commit...and this is where it gets tricky for a newcomer. Click the My Account link near the top of the page

  6. Scroll to the very bottom of the page and in the Shell Account Information section, click the Edit Keys link.

  7. If you're on Mac or Linux, fire up the Terminal and enter ssh-keygen -t dsa -C "your_email@email_provider", preferrably using the email address you've configured Git with.

  8. Terminal will prompt you for a place to save the newly generated keys. It automatically suggests ~/.ssh/id_dsa, and for most uses I'd say this is more than fine.

  9. So now you've created two files in your ~/.ssh/ directory. Open the public key file with your favorite text editor like so: vi ~/.ssh/id_dsa.pub

  10. Select all of the file, including ssh-dss and the email address you added and copy

  11. Head back to the RubyForge window you still have open and paste your public key in the box

  12. Click the update button and be prepared to wait until the top of the hour for your key to be added

  13. If you haven't done so already, head to the folder where your gem files are stored and initialize your Git repository with git init and commit everything with git commit -a -m "initial add"

  14. Next you'll want to add the remote RubyForge repository with git remote add origin gitosis@rubyforge.org:my_project.git

  15. Finally the last step! If the top of the hour has passed since you added your public key to RubyForge, you should be ready to push to the remote repository with git push origin master:refs/heads/master. Done!



A little more difficult than we would have liked, but we did get there eventually and now it's quite easy.