This little Rubyism is something that I use frequently for debugging my objects. I add a method to every object to show only the interesting methods. What do I mean by interesting methods?
Read the rest of this entry »
This little Rubyism is something that I use frequently for debugging my objects. I add a method to every object to show only the interesting methods. What do I mean by interesting methods?
Read the rest of this entry »
I recently had a very repetitive configuration file that needed creating. There were approximately 50 config blocks of 10 lines each with only the host name changing with each block. So I decided to take a shortcut and do it in Ruby using ERB templates. This is so easy and literally save me hours worth of work.
Read the rest of this entry »
This is kind of a tip of the day, but I just think its cool so I am sharing it with everyone. And being a recent convert to Git and the fact that I have to use Subversion at my place of work, I find myself constantly doing things like this out of habit.
Well now I can do that (although it may not be a good idea) with git alias:
Now st and ci are git aliases for status and commit respectively.
I work with a few repositories at any given time. And during that time, I typically have multiple branches created for each repository. I figured that it would make my life easier if I knew which branch and/or repository I was working in. Luckily, very little hackery is required here since the git distribution already comes with such a tool. (Note: If you didn’t build Git from source, then you may not have this file.)
Read the rest of this entry »